mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +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
Notes:
sideshowbarker
2024-07-18 11:35:55 +09:00
Author: https://github.com/gunnarbeutner Commit: https://github.com/SerenityOS/serenity/commit/f2eb759901f Pull-request: https://github.com/SerenityOS/serenity/pull/8225
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…
Reference in a new issue