mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:17:46 +00:00
Everywhere: Hook up remaining debug macros to Debug.h.
This commit is contained in:
parent
da69de1f1b
commit
eea72b9b5c
63 changed files with 458 additions and 287 deletions
|
@ -50,7 +50,7 @@ RefPtr<VMObject> AnonymousVMObject::clone()
|
|||
});
|
||||
}
|
||||
|
||||
#ifdef COMMIT_DEBUG
|
||||
#if COMMIT_DEBUG
|
||||
klog() << "Cloning " << this << ", need " << need_cow_pages << " committed cow pages";
|
||||
#endif
|
||||
if (!MM.commit_user_physical_pages(need_cow_pages))
|
||||
|
@ -311,7 +311,7 @@ void AnonymousVMObject::range_made_volatile(const VolatilePageRange& range)
|
|||
|
||||
// Return those committed pages back to the system
|
||||
if (uncommit_page_count > 0) {
|
||||
#ifdef COMMIT_DEBUG
|
||||
#if COMMIT_DEBUG
|
||||
klog() << "Uncommit " << uncommit_page_count << " lazy-commit pages from " << this;
|
||||
#endif
|
||||
MM.uncommit_user_physical_pages(uncommit_page_count);
|
||||
|
@ -364,7 +364,7 @@ size_t AnonymousVMObject::mark_committed_pages_for_nonvolatile_range(const Volat
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef COMMIT_DEBUG
|
||||
#if COMMIT_DEBUG
|
||||
klog() << "Added " << pages_updated << " lazy-commit pages to " << this;
|
||||
#endif
|
||||
m_unused_committed_pages += pages_updated;
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
*/
|
||||
|
||||
#include <AK/BinarySearch.h>
|
||||
#include <AK/Debug.h>
|
||||
#include <AK/ScopeGuard.h>
|
||||
#include <Kernel/Process.h>
|
||||
#include <Kernel/VM/AnonymousVMObject.h>
|
||||
|
@ -34,7 +35,7 @@
|
|||
|
||||
namespace Kernel {
|
||||
|
||||
#ifdef VOLATILE_PAGE_RANGES_DEBUG
|
||||
#if VOLATILE_PAGE_RANGES_DEBUG
|
||||
inline LogStream& operator<<(const LogStream& stream, const VolatilePageRange& range)
|
||||
{
|
||||
stream << "{" << range.base << " (" << range.count << ") purged: " << range.was_purged << "}";
|
||||
|
@ -65,7 +66,7 @@ bool VolatilePageRanges::add(const VolatilePageRange& range)
|
|||
return false;
|
||||
add_range.was_purged = range.was_purged;
|
||||
|
||||
#ifdef VOLATILE_PAGE_RANGES_DEBUG
|
||||
#if VOLATILE_PAGE_RANGES_DEBUG
|
||||
klog() << "ADD " << range << " (total range: " << m_total_range << ") -->";
|
||||
dump_volatile_page_ranges(m_ranges);
|
||||
ScopeGuard debug_guard([&]() {
|
||||
|
@ -139,7 +140,7 @@ bool VolatilePageRanges::remove(const VolatilePageRange& range, bool& was_purged
|
|||
if (remove_range.is_empty())
|
||||
return false;
|
||||
|
||||
#ifdef VOLATILE_PAGE_RANGES_DEBUG
|
||||
#if VOLATILE_PAGE_RANGES_DEBUG
|
||||
klog() << "REMOVE " << range << " (total range: " << m_total_range << ") -->";
|
||||
dump_volatile_page_ranges(m_ranges);
|
||||
ScopeGuard debug_guard([&]() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue