microsoft / perfview

PerfView is a CPU and memory performance-analysis tool
http://channel9.msdn.com/Series/PerfView-Tutorial
MIT License
4.06k stars 696 forks source link

Fix Surfacing of RelatedActivityID in Real-Time Session Dispatch #1980

Closed brianrob closed 6 months ago

brianrob commented 6 months ago

RelatedActivityID is stored in a GrowableArray as part of the TraceLog. When the event is pushed in to the realTimeQueue in order to dispatch it, the event is cloned. Cloning creates a new instance of TraceEvent, and allocates buffers that are owned by the new clone. When the event is dispatched, we are missing an assignment of myBuffer, which contains the RelatedActivityID. Assign myBuffer prior to dispatch so that the RelatedActivityID is correct.