mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 20:28:11 +00:00
LibJS/JIT: Make generating GDB images opt-in
Since generating GDB image can be expensive, it is disabled by default and can be activated by setting the `LIBJS_JIT_GDB` environment variable.
This commit is contained in:
parent
f0b984567a
commit
706710fa13
1 changed files with 6 additions and 1 deletions
|
@ -6,6 +6,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <AK/FixedArray.h>
|
||||
#include <AK/OwnPtr.h>
|
||||
#include <AK/Platform.h>
|
||||
#include <LibJIT/GDB.h>
|
||||
|
@ -3764,7 +3765,11 @@ OwnPtr<NativeExecutable> Compiler::compile(Bytecode::Executable& bytecode_execut
|
|||
compiler.m_output.size(),
|
||||
};
|
||||
|
||||
auto gdb_object = ::JIT::GDB::build_gdb_image(code, "LibJS JIT"sv, "LibJS JITted code"sv);
|
||||
Optional<FixedArray<u8>> gdb_object {};
|
||||
|
||||
if (getenv("LIBJS_JIT_GDB")) {
|
||||
gdb_object = ::JIT::GDB::build_gdb_image(code, "LibJS JIT"sv, "LibJS JITted code"sv);
|
||||
}
|
||||
|
||||
auto executable = make<NativeExecutable>(executable_memory, compiler.m_output.size(), mapping, move(gdb_object));
|
||||
if constexpr (DUMP_JIT_DISASSEMBLY)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue