diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-02-10 11:37:59 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-02-10 11:37:59 +0100 |
commit | 9860e550478eb867aacd4e5acd1f71c48fe8eafd (patch) | |
tree | 08dd5cf052bfe97bb29d6e219fd301c8f0d1c62f | |
parent | 5e8d6b1bf407ab011c4201289a9ea08b253bab60 (diff) | |
download | serenity-9860e550478eb867aacd4e5acd1f71c48fe8eafd.zip |
Kernel: Put page fault logspam behind PAGE_FAULT_DEBUG.
-rw-r--r-- | Kernel/MemoryManager.cpp | 6 | ||||
-rw-r--r-- | Kernel/i386.cpp | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/Kernel/MemoryManager.cpp b/Kernel/MemoryManager.cpp index 76dacee97c..6fcd5547d9 100644 --- a/Kernel/MemoryManager.cpp +++ b/Kernel/MemoryManager.cpp @@ -357,17 +357,23 @@ PageFaultResponse MemoryManager::handle_page_fault(const PageFault& fault) auto page_index_in_region = region->page_index_from_address(fault.laddr()); if (fault.is_not_present()) { if (region->vmo().inode()) { +#ifdef PAGE_FAULT_DEBUG dbgprintf("NP(inode) fault in Region{%p}[%u]\n", region, page_index_in_region); +#endif page_in_from_inode(*region, page_index_in_region); return PageFaultResponse::Continue; } else { +#ifdef PAGE_FAULT_DEBUG dbgprintf("NP(zero) fault in Region{%p}[%u]\n", region, page_index_in_region); +#endif zero_page(*region, page_index_in_region); return PageFaultResponse::Continue; } } else if (fault.is_protection_violation()) { if (region->m_cow_map.get(page_index_in_region)) { +#ifdef PAGE_FAULT_DEBUG dbgprintf("PV(cow) fault in Region{%p}[%u]\n", region, page_index_in_region); +#endif bool success = copy_on_write(*region, page_index_in_region); ASSERT(success); return PageFaultResponse::Continue; diff --git a/Kernel/i386.cpp b/Kernel/i386.cpp index dcee88e303..1336b8aa11 100644 --- a/Kernel/i386.cpp +++ b/Kernel/i386.cpp @@ -237,6 +237,7 @@ void exception_14_handler(RegisterDumpWithExceptionCode& regs) dword fault_page_directory; asm ("movl %%cr3, %%eax":"=a"(fault_page_directory)); +#ifdef PAGE_FAULT_DEBUG dbgprintf("%s(%u): ring%u %s page fault in PD=%x, %s L%x\n", current->name().characters(), current->pid(), @@ -245,6 +246,7 @@ void exception_14_handler(RegisterDumpWithExceptionCode& regs) fault_page_directory, regs.exception_code & 2 ? "write" : "read", faultAddress); +#endif word ss; dword esp; |