mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 02:54:54 +03:00
Kernel: Stop eagerly loading entire executables
We were forced to do this because the page fault code would fall apart when trying to generate a backtrace for a non-current thread. This issue has been fixed for a while now, so let's go back to lazily loading executable pages which should make everything a little better.
This commit is contained in:
parent
eaa9cf58f5
commit
77737be7b3
Notes:
sideshowbarker
2024-07-19 12:40:45 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/77737be7b3b
@ -109,7 +109,6 @@ CXXFLAGS += -nostdlib -nostdinc -nostdinc++
|
||||
CXXFLAGS += -I../Toolchain/Local/i686-pc-serenity/include/c++/8.3.0/
|
||||
CXXFLAGS += -I../Toolchain/Local/i686-pc-serenity/include/c++/8.3.0/i686-pc-serenity/
|
||||
DEFINES += -DKERNEL
|
||||
DEFINES += -DEXPENSIVE_USERSPACE_STACKS
|
||||
LDFLAGS += -Ttext 0x10000 -Wl,-T linker.ld -nostdlib
|
||||
|
||||
all: $(KERNEL) kernel.map
|
||||
|
@ -361,10 +361,6 @@ int Process::do_exec(String path, Vector<String> arguments, Vector<String> envir
|
||||
ASSERT(success);
|
||||
}
|
||||
|
||||
#ifdef EXPENSIVE_USERSPACE_STACKS
|
||||
region->page_in();
|
||||
#endif
|
||||
|
||||
OwnPtr<ELFLoader> loader;
|
||||
{
|
||||
// Okay, here comes the sleight of hand, pay close attention..
|
||||
|
@ -595,11 +595,9 @@ String Thread::backtrace_impl() const
|
||||
if (!symbol.address)
|
||||
break;
|
||||
if (!symbol.ksym) {
|
||||
#ifdef EXPENSIVE_USERSPACE_STACKS
|
||||
if (!Scheduler::is_active() && process.elf_loader() && process.elf_loader()->has_symbols())
|
||||
builder.appendf("%p %s\n", symbol.address, process.elf_loader()->symbolicate(symbol.address).characters());
|
||||
else
|
||||
#endif
|
||||
builder.appendf("%p\n", symbol.address);
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user