diff options
author | Andreas Kling <kling@serenityos.org> | 2021-03-02 19:01:02 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-03-02 22:38:06 +0100 |
commit | 5e7abea31e447f234e18d933e3421fc204009fcc (patch) | |
tree | 93d2662dfffd7ed9b338af1d145899f20fa1201d /Kernel/FileSystem | |
parent | ea500dd3e31f531212af2e9a33ff40f26de48594 (diff) | |
download | serenity-5e7abea31e447f234e18d933e3421fc204009fcc.zip |
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! :^)
Diffstat (limited to 'Kernel/FileSystem')
-rw-r--r-- | Kernel/FileSystem/ProcFS.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/Kernel/FileSystem/ProcFS.cpp b/Kernel/FileSystem/ProcFS.cpp index 0a41328964..df7deae852 100644 --- a/Kernel/FileSystem/ProcFS.cpp +++ b/Kernel/FileSystem/ProcFS.cpp @@ -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) |