Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

[3.1] Backport fixes to ETW/EventPipe events to enable GCDumps #27297

Merged

Conversation

josalem
Copy link

@josalem josalem commented Oct 18, 2019

Description

#27237

These two commits fix two issues preventing successful GCDump creation using events sent over EventPipe. PerfView has the ability to generate GCDumps (a collections of statistics about all objects on the heap) of a running process by turning on a specific set of keywords on the Microsoft-Windows-DotNETRuntime provider and analyzing the data. These are a powerful tool for triaging memory leaks and other flavors of memory issues.

ff37915 - This moves a function call to EtwCallbackCommon so that both ETW and EventPipe have the same behavior. OnKeywordsChanged modifies some global statics for type logging to cause the type cache to be emptied when a specific keyword is not enabled. Without clearing this type cache, type metadata events are not generated when GCs are triggered via EventPipe resulting in GCDumps that have no type information. Moving this to EtwCallbackCommon ensures that the type cache is correctly flushed like it was with ETW.

2a1a6cf - This fixes 3 events that were not being sent over EventPipe previously. Without these events, static, ccw, and rcw type metadata would not be present in GCDumps created via EventPipe.

Customer Impact

With these changes, customers will be able to collect GCDumps on Linux, Mac, and Windows by analyzing events sent over EventPipe as they could with ETW.

Regression

This is a discrepancy in the event parity between ETW and EventPipe (i.e., what events can be collected by what technology), but not technically a regression as this issue has existed since before 2.2.

Risk

Low - These changes are targeted to preserve ETW behavior without modifying any other logic.

CC @tommcdon @caslan

John Salem added 2 commits October 14, 2019 13:41
…Common to enable this same behavior in ETW and EventPipe. This unblocks parity for GCHeapDumps between ETW and EventPipe (dotnet#26270)
@MeiChin-Tsai
Copy link

approved for 3.1

@josalem josalem merged commit 89091b5 into dotnet:release/3.1 Oct 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants