refactor(event): Tagged event table - #733
Open
rabbitstack wants to merge 3 commits into
Open
rabbitstack wants to merge 3 commits into
rabbitstack wants to merge 3 commits into
Conversation
rabbitstack
force-pushed
the
event-type-refactor-and-event-table
branch
2 times, most recently
from
September 19, 2026 12:06
dd38e01 to
dbcdde1
Compare
Keeping a byte array for event identification came with a lot of hassle. Firstly, there is a performance impact in switch statements as Go can't jump-table GUID structures. The conversion from native ETW to our own event type depended on either the opcode or event ID, which have different types, uint8 and uint16 respectively. As an upcoming initiative, we're going to tackle a tracelogging provider that doesn't have either opcode or event ID. That would exacerbate the array-based event type alias. The aim of this refactor is to create a dense, integer-based type for the event identification and build an indexed event table to decouple the event metadata such as the name, description, source, or category, out of the main event. This paves the road for future optimizations, such as event pooling or array-based event parameters.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of this PR / why it is needed?
Keeping a byte array for event identification came with a lot of
hassle. Firstly, there is a performance impact in switch statements
as Go can't jump-table GUID structures. The conversion from native
ETW to our own event type depended on either the opcode or event ID,
which have different types, uint8 and uint16 respectively.
As an upcoming initiative, we're going to tackle a tracelogging provider
that doesn't have either opcode or event ID. That would exacerbate
the array-based event type alias.
The aim of this refactor is to create a dense, integer-based type for the
event identification and build an indexed event table to decouple the event
metadata such as the name, description, source, or category, out of the main
event. This paves the road for future optimizations, such as event pooling or
array-based event parameters.
What type of change does this PR introduce?
/kind refactor (non-breaking change that restructures the code, while not changing the original functionality)
/kind cleanup
/kind improvement
Any specific area of the project related to this PR?
/area telemetry
/area event
Special notes for the reviewer
Does this PR introduce a user-facing change?
The mmap events have been renamed to reflect the Windows API nomenclature and were categorized under the memory category.