mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-28 14:02:51 +00:00
Profiler: Use sequential serial numbers for profiling events
Previously Profiler was using timestamps to distinguish processes. However it is possible that separate processes with the same PID exist at the exact same timestamp (e.g. for execve). This changes Profiler to use unique serial numbers for each event instead.
This commit is contained in:
parent
af72b5ec82
commit
a607f13fc7
Notes:
sideshowbarker
2024-07-18 16:58:57 +09:00
Author: https://github.com/gunnarbeutner
Commit: a607f13fc7
Pull-request: https://github.com/SerenityOS/serenity/pull/7705
Reviewed-by: https://github.com/linusg
8 changed files with 125 additions and 47 deletions
|
@ -74,7 +74,7 @@ GUI::Variant SamplesModel::data(const GUI::ModelIndex& index, GUI::ModelRole rol
|
|||
return event.tid;
|
||||
|
||||
if (index.column() == Column::ExecutableName) {
|
||||
if (auto* process = m_profile.find_process(event.pid, event.timestamp))
|
||||
if (auto* process = m_profile.find_process(event.pid, event.serial))
|
||||
return process->executable;
|
||||
return "";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue