1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:38:11 +00:00

Kernel: Make it possible to have kmalloc() dump call stacks.

This can be enabled at any time using a sysctl:

    sysctl kmalloc_stacks=1

The stacks will go to the debugger output only.
This commit is contained in:
Andreas Kling 2019-04-15 23:58:48 +02:00
parent bc6ac1c2f2
commit d384c7815f
4 changed files with 14 additions and 0 deletions

View file

@ -1166,6 +1166,11 @@ ProcFS::ProcFS()
m_entries[FI_PID_exe] = { "exe", FI_PID_exe, procfs$pid_exe };
m_entries[FI_PID_cwd] = { "cwd", FI_PID_cwd, procfs$pid_cwd };
m_entries[FI_PID_fd] = { "fd", FI_PID_fd };
m_kmalloc_stack_helper.resource() = g_dump_kmalloc_stacks;
add_sys_bool("kmalloc_stacks", m_kmalloc_stack_helper, [this] {
g_dump_kmalloc_stacks = m_kmalloc_stack_helper.resource();
});
}
ProcFS::ProcFSDirectoryEntry* ProcFS::get_directory_entry(InodeIdentifier identifier) const