mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:27:43 +00:00
Kernel: Make sys$perf_register_string() generate the string ID's
Making userspace provide a global string ID was silly, and made the API extremely difficult to use correctly in a global profiling context. Instead, simply make the kernel do the string ID allocation for us. This also allows us to convert the string storage to a Vector in the kernel (and an array in the JSON profile data.)
This commit is contained in:
parent
56e84a63ca
commit
1e90a3a542
8 changed files with 24 additions and 24 deletions
|
@ -120,7 +120,7 @@ public:
|
|||
|
||||
void add_process(const Process&, ProcessEventType event_type);
|
||||
|
||||
KResult register_string(FlatPtr string_id, NonnullOwnPtr<KString>);
|
||||
KResultOr<FlatPtr> register_string(NonnullOwnPtr<KString>);
|
||||
|
||||
private:
|
||||
explicit PerformanceEventBuffer(NonnullOwnPtr<KBuffer>);
|
||||
|
@ -133,7 +133,7 @@ private:
|
|||
size_t m_count { 0 };
|
||||
NonnullOwnPtr<KBuffer> m_buffer;
|
||||
|
||||
HashMap<FlatPtr, NonnullOwnPtr<KString>> m_strings;
|
||||
NonnullOwnPtrVector<KString> m_strings;
|
||||
};
|
||||
|
||||
extern bool g_profiling_all_threads;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue