Skip to content

Commit

Permalink
Kernel: Name perfcore files "perfcore.PID"
Browse files Browse the repository at this point in the history
This way we can trace many things and we get one perfcore file per
process instead of everyone trying to write to "perfcore"
  • Loading branch information
awesomekling committed Mar 1, 2020
1 parent 6fa5df7 commit 687b52c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Kernel/Process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3028,7 +3028,7 @@ void Process::finalize()
#endif

if (m_perf_event_buffer) {
auto description_or_error = VFS::the().open("perfcore", O_CREAT | O_EXCL, 0400, current_directory(), UidAndGid { m_uid, m_gid });
auto description_or_error = VFS::the().open(String::format("perfcore.%d", m_pid), O_CREAT | O_EXCL, 0400, current_directory(), UidAndGid { m_uid, m_gid });
if (!description_or_error.is_error()) {
auto& description = description_or_error.value();
auto json = m_perf_event_buffer->to_json(m_pid, m_executable ? m_executable->absolute_path() : "");
Expand Down

0 comments on commit 687b52c

Please sign in to comment.