1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 12:37:45 +00:00

Kernel+LibC: Add sys$perf_register_string()

This syscall allows userspace to register a keyed string that appears in
a new "strings" JSON object in profile output.

This will be used to add custom strings to profile signposts. :^)
This commit is contained in:
Andreas Kling 2021-08-11 20:28:29 +02:00
parent 00b11d7577
commit 4657c79143
7 changed files with 43 additions and 0 deletions

View file

@ -120,6 +120,8 @@ public:
void add_process(const Process&, ProcessEventType event_type);
KResult register_string(FlatPtr string_id, NonnullOwnPtr<KString>);
private:
explicit PerformanceEventBuffer(NonnullOwnPtr<KBuffer>);
@ -130,6 +132,8 @@ private:
size_t m_count { 0 };
NonnullOwnPtr<KBuffer> m_buffer;
HashMap<FlatPtr, NonnullOwnPtr<KString>> m_strings;
};
extern bool g_profiling_all_threads;