Repository navigation
Intern Stack Definitions Once Per Usage Instead of Once Per Definition - #1136
Merged
Brian Robbins (brianrob) merged 1 commit intoMar 23, 2020
Merged
Conversation
Member
Author
|
cc: Maoni Stephens (@Maoni0), thanks for reporting this! |
Contributor
|
thanks so much for fixing this, Brian Robbins (@brianrob)! |
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.
ETW stacks are logged as a set of separate events which are then correlated with the data events that they correspond to. Construction of stacks and correlation with their data events occurs during
TraceLogcreation. There are "stack definition" events, and then references to the stack definitions. Stack references are 1:1 with their data events. Stack definitions are 1:N where N is the number of references to the stack. It is also important to know that stack definitions are not specific to a thread and do not contain the thread information as part of the stack. This is done during construction of theTraceLog.Prior to this change, the data structure that holds stack references assumed that all usages of a single reference came from the same thread. It appears this may have been true at one point, but is no longer true. To solve this problem, this change interns the stack for each entry in the list, which allows us to ensure that the stack frame that represents the thread is correct on each intern operation, and is then property correlated with its data event.