mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 01:37:39 +03:00
Kernel: Name perfcore files "perfcore.PID"
This way we can trace many things and we get one perfcore file per process instead of everyone trying to write to "perfcore"
This commit is contained in:
parent
6fa5df783b
commit
687b52ceb5
Notes:
sideshowbarker
2024-07-19 08:56:58 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/687b52ceb5e
@ -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() : "");
|
||||
|
Loading…
Reference in New Issue
Block a user