mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:17:45 +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
8 changed files with 30 additions and 11 deletions
|
@ -53,6 +53,7 @@ struct [[gnu::packed]] PerformanceEvent {
|
|||
u32 pid { 0 };
|
||||
u32 tid { 0 };
|
||||
u64 timestamp;
|
||||
u32 lost_samples;
|
||||
union {
|
||||
MallocPerformanceEvent malloc;
|
||||
FreePerformanceEvent free;
|
||||
|
@ -77,7 +78,7 @@ public:
|
|||
|
||||
KResult append(int type, FlatPtr arg1, FlatPtr arg2, const StringView& arg3, Thread* current_thread = Thread::current());
|
||||
KResult append_with_eip_and_ebp(ProcessID pid, ThreadID tid, u32 eip, u32 ebp,
|
||||
int type, FlatPtr arg1, FlatPtr arg2, const StringView& arg3);
|
||||
int type, u32 lost_samples, FlatPtr arg1, FlatPtr arg2, const StringView& arg3);
|
||||
|
||||
void clear()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue