microsoft / Microsoft-Performance-Tools-Linux-Android

Linux, Android and Chromium Performance Tools built using the Microsoft Performance Toolkit. Cross-platform .NET Core + WPA GUI
MIT License
320 stars 34 forks source link

Include event domain in GenericEvent kind #69

Closed markkeinz closed 2 years ago

markkeinz commented 2 years ago

This followed out of investigating an issue with a .ctf trace that contains kernel and user space events. The generic events table did not show certain user-space events, and expanding some of the kernel event groups in the table led to a crash.

The issue seemed to be that the EventKind used in GenericEvents used only the event's ID as uniqueness criterium - however, these IDs are not unique across domains.

This change expands the dictionary key for EventKinds to include the domain from the event's context. It also introduces methods to get and register an event kind in order to hide the additional clutter introduced by having a tuple as dictionary key.