mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:17:45 +00:00
LibJS: Lazily collect stack trace information
The previous implementation was calling `backtrace()` for every function call, which is quite slow. Instead, this implementation provides VM::stack_trace() which unwinds the native stack, maps it through NativeExecutable::get_source_range and combines it with source ranges from interpreted call frames.
This commit is contained in:
parent
77dc7c4d36
commit
68f4d21de2
11 changed files with 96 additions and 46 deletions
|
@ -34,7 +34,7 @@ public:
|
|||
void run(VM&) const;
|
||||
void dump_disassembly(Bytecode::Executable const& executable) const;
|
||||
BytecodeMapping const& find_mapping_entry(size_t native_offset) const;
|
||||
Optional<Bytecode::InstructionStreamIterator const&> instruction_stream_iterator(Bytecode::Executable const& executable) const;
|
||||
Optional<UnrealizedSourceRange> get_source_range(Bytecode::Executable const& executable, FlatPtr address) const;
|
||||
|
||||
ReadonlyBytes code_bytes() const { return { m_code, m_size }; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue