mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:57:35 +00:00
Profiler: Use u32 when constructing InstructionData
When constructing values of the InstructionData type we assume that the event_count field is a size_t while it actually is a u32. On x86_64 this fails because those are different types.
This commit is contained in:
parent
dc3cc7368b
commit
f2eb759901
1 changed files with 1 additions and 1 deletions
|
@ -85,7 +85,7 @@ DisassemblyModel::DisassemblyModel(Profile& profile, ProfileNode& node)
|
|||
auto disassembly = insn.value().to_string(address_in_profiled_program, &symbol_provider);
|
||||
|
||||
StringView instruction_bytes = view.substring_view(offset_into_symbol, insn.value().length());
|
||||
size_t samples_at_this_instruction = m_node.events_per_address().get(address_in_profiled_program).value_or(0);
|
||||
u32 samples_at_this_instruction = m_node.events_per_address().get(address_in_profiled_program).value_or(0);
|
||||
float percent = ((float)samples_at_this_instruction / (float)m_node.event_count()) * 100.0f;
|
||||
|
||||
m_instructions.append({ insn.value(), disassembly, instruction_bytes, address_in_profiled_program, samples_at_this_instruction, percent });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue