mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00: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
3 changed files with 0 additions and 7 deletions
|
@ -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/
|
||||||
CXXFLAGS += -I../Toolchain/Local/i686-pc-serenity/include/c++/8.3.0/i686-pc-serenity/
|
CXXFLAGS += -I../Toolchain/Local/i686-pc-serenity/include/c++/8.3.0/i686-pc-serenity/
|
||||||
DEFINES += -DKERNEL
|
DEFINES += -DKERNEL
|
||||||
DEFINES += -DEXPENSIVE_USERSPACE_STACKS
|
|
||||||
LDFLAGS += -Ttext 0x10000 -Wl,-T linker.ld -nostdlib
|
LDFLAGS += -Ttext 0x10000 -Wl,-T linker.ld -nostdlib
|
||||||
|
|
||||||
all: $(KERNEL) kernel.map
|
all: $(KERNEL) kernel.map
|
||||||
|
|
|
@ -361,10 +361,6 @@ int Process::do_exec(String path, Vector<String> arguments, Vector<String> envir
|
||||||
ASSERT(success);
|
ASSERT(success);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef EXPENSIVE_USERSPACE_STACKS
|
|
||||||
region->page_in();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
OwnPtr<ELFLoader> loader;
|
OwnPtr<ELFLoader> loader;
|
||||||
{
|
{
|
||||||
// Okay, here comes the sleight of hand, pay close attention..
|
// Okay, here comes the sleight of hand, pay close attention..
|
||||||
|
|
|
@ -595,11 +595,9 @@ String Thread::backtrace_impl() const
|
||||||
if (!symbol.address)
|
if (!symbol.address)
|
||||||
break;
|
break;
|
||||||
if (!symbol.ksym) {
|
if (!symbol.ksym) {
|
||||||
#ifdef EXPENSIVE_USERSPACE_STACKS
|
|
||||||
if (!Scheduler::is_active() && process.elf_loader() && process.elf_loader()->has_symbols())
|
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());
|
builder.appendf("%p %s\n", symbol.address, process.elf_loader()->symbolicate(symbol.address).characters());
|
||||||
else
|
else
|
||||||
#endif
|
|
||||||
builder.appendf("%p\n", symbol.address);
|
builder.appendf("%p\n", symbol.address);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue