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

Kernel: Add (expensive) but valuable userspace symbols to stacks.

This is expensive because we have to page in the entire executable for every
process up front for this to work. This is due to the page fault code not
being strong enough to run while another process is active.

Note that we already had userspace symbols in *crash* stacks. This patch
adds them generally, so they show up in /proc, Process Manager, etc.

There's room for improvement here, but the debugging benefits way overshadow
the performance penalty right now. :^)
This commit is contained in:
Andreas Kling 2019-07-27 12:01:14 +02:00
parent 7cd2e739f2
commit a79d8d8ae5
3 changed files with 13 additions and 1 deletions

View file

@ -350,6 +350,11 @@ int Process::do_exec(String path, Vector<String> arguments, Vector<String> envir
bool success = region->page_in();
ASSERT(success);
}
#ifdef EXPENSIVE_USERSPACE_STACKS
region->page_in();
#endif
OwnPtr<ELFLoader> loader;
{
// Okay, here comes the sleight of hand, pay close attention..