mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:27:34 +00:00
Profiler: Store event type as enum
Also check for the most common event type (sample) first instead of leaving it as the fallback. This avoids a lot of string comparisons while parsing profiles.
This commit is contained in:
parent
5a2ccbffc5
commit
7abf58ecaf
2 changed files with 45 additions and 19 deletions
|
@ -163,9 +163,22 @@ public:
|
|||
};
|
||||
|
||||
struct Event {
|
||||
enum class Type {
|
||||
Free,
|
||||
Malloc,
|
||||
Mmap,
|
||||
Munmap,
|
||||
ProcessCreate,
|
||||
ProcessExec,
|
||||
ProcessExit,
|
||||
Sample,
|
||||
Signpost,
|
||||
ThreadCreate,
|
||||
ThreadExit,
|
||||
};
|
||||
Type type {};
|
||||
EventSerialNumber serial;
|
||||
u64 timestamp { 0 };
|
||||
String type;
|
||||
FlatPtr ptr { 0 };
|
||||
size_t size { 0 };
|
||||
String name;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue