mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:37:35 +00:00
ProfileViewer: Don't skip the innermost frame when loading profiles
We were skipping the innermost frame as a workaround for the kernel putting garbage data there. Now that the kernel puts the instruction poiner there, we can load the frame normally! :^)
This commit is contained in:
parent
b7ff3b5ad1
commit
a4006e19d7
1 changed files with 4 additions and 3 deletions
|
@ -144,10 +144,11 @@ void Profile::rebuild_tree()
|
||||||
else
|
else
|
||||||
node = &node->find_or_create_child(symbol, address, offset, event.timestamp);
|
node = &node->find_or_create_child(symbol, address, offset, event.timestamp);
|
||||||
|
|
||||||
node->add_event_address(address);
|
|
||||||
node->increment_event_count();
|
node->increment_event_count();
|
||||||
if (is_innermost_frame)
|
if (is_innermost_frame) {
|
||||||
|
node->add_event_address(address);
|
||||||
node->increment_self_count();
|
node->increment_self_count();
|
||||||
|
}
|
||||||
return IterationDecision::Continue;
|
return IterationDecision::Continue;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -217,7 +218,7 @@ OwnPtr<Profile> Profile::load_from_perfcore_file(const StringView& path)
|
||||||
}
|
}
|
||||||
|
|
||||||
auto stack_array = perf_event.get("stack").as_array();
|
auto stack_array = perf_event.get("stack").as_array();
|
||||||
for (ssize_t i = stack_array.values().size() - 1; i >= 1; --i) {
|
for (ssize_t i = stack_array.values().size() - 1; i >= 0; --i) {
|
||||||
auto& frame = stack_array.at(i);
|
auto& frame = stack_array.at(i);
|
||||||
auto ptr = frame.to_number<u32>();
|
auto ptr = frame.to_number<u32>();
|
||||||
u32 offset = 0;
|
u32 offset = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue