mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:07:34 +00:00
Kernel: Start work on full system profiling :^)
The superuser can now call sys$profiling_enable() with PID -1 to enable profiling of all running threads in the system. The perf events are collected in a global PerformanceEventBuffer (currently 32 MiB in size.) The events can be accessed via /proc/profile
This commit is contained in:
parent
b425c2602c
commit
ea500dd3e3
5 changed files with 91 additions and 23 deletions
|
@ -78,9 +78,15 @@ public:
|
|||
OwnPtr<KBuffer> to_json(ProcessID, const String& executable_path) const;
|
||||
bool to_json(KBufferBuilder&, ProcessID, const String& executable_path) const;
|
||||
|
||||
// Used by full-system profile (/proc/profile)
|
||||
bool to_json(KBufferBuilder&);
|
||||
|
||||
private:
|
||||
explicit PerformanceEventBuffer(NonnullOwnPtr<KBuffer>);
|
||||
|
||||
template<typename Serializer>
|
||||
bool to_json_impl(Serializer&) const;
|
||||
|
||||
PerformanceEvent& at(size_t index);
|
||||
|
||||
size_t m_count { 0 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue