mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
Kernel+Profiler: Track lost time between profiler timer ticks
We can lose profiling timer events for a few reasons, for example disabled interrupts or system slowness. This accounts for lost time between CPU samples by adding a field lost_samples to each profiling event which tracks how many samples were lost immediately preceding the event.
This commit is contained in:
parent
8614d18956
commit
c41f13f10b
Notes:
sideshowbarker
2024-07-18 18:11:50 +09:00
Author: https://github.com/gunnarbeutner
Commit: c41f13f10b
Pull-request: https://github.com/SerenityOS/serenity/pull/7090
Reviewed-by: https://github.com/awesomekling
8 changed files with 30 additions and 11 deletions
|
@ -228,6 +228,7 @@ Result<NonnullOwnPtr<Profile>, String> Profile::load_from_perfcore_file(const St
|
|||
Event event;
|
||||
|
||||
event.timestamp = perf_event.get("timestamp").to_number<u64>();
|
||||
event.lost_samples = perf_event.get("lost_samples").to_number<u32>();
|
||||
event.type = perf_event.get("type").to_string();
|
||||
event.pid = perf_event.get("pid").to_i32();
|
||||
event.tid = perf_event.get("tid").to_i32();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue