Profiler: Unbreak DisassemblyModel after shared library introduction

This was failing to take the library base address into account when
tallying up the samples at each instruction.
This commit is contained in:
Andreas Kling 2021-02-27 17:26:57 +01:00
commit 2f0ea9ae33
Notes: sideshowbarker 2024-07-18 21:52:33 +09:00

View file

@ -97,7 +97,7 @@ DisassemblyModel::DisassemblyModel(Profile& profile, ProfileNode& node)
auto insn = disassembler.next();
if (!insn.has_value())
break;
FlatPtr address_in_profiled_program = symbol.value().value() + offset_into_symbol;
FlatPtr address_in_profiled_program = base_address + symbol.value().value() + offset_into_symbol;
auto disassembly = insn.value().to_string(address_in_profiled_program, &symbol_provider);