mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-12 13:21:57 +00:00
Kernel+Profiler: Capture metadata about all profiled processes
The perfcore file format was previously limited to a single process since the pid/executable/regions data was top-level in the JSON. This patch moves the process-specific data into a top-level array named "processes" and we now add entries for each process that has been sampled during the profile run. This makes it possible to see samples from multiple threads when viewing a perfcore file with Profiler. This is extremely cool! :^)
This commit is contained in:
parent
ea500dd3e3
commit
5e7abea31e
Notes:
sideshowbarker
2024-07-18 21:45:59 +09:00
Author: https://github.com/awesomekling
Commit: 5e7abea31e
11 changed files with 223 additions and 102 deletions
|
@ -488,16 +488,10 @@ static bool procfs$pid_perf_events(InodeIdentifier identifier, KBufferBuilder& b
|
|||
auto process = Process::from_pid(to_pid(identifier));
|
||||
if (!process)
|
||||
return false;
|
||||
|
||||
InterruptDisabler disabler;
|
||||
|
||||
if (!process->executable())
|
||||
return false;
|
||||
|
||||
if (!process->perf_events())
|
||||
return false;
|
||||
|
||||
return process->perf_events()->to_json(builder, process->pid(), process->executable()->absolute_path());
|
||||
return process->perf_events()->to_json(builder);
|
||||
}
|
||||
|
||||
static bool procfs$net_adapters(InodeIdentifier, KBufferBuilder& builder)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue