Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing of new GC events #1758

Merged
merged 6 commits into from
Mar 27, 2023
Merged

Conversation

cshung
Copy link
Member

@cshung cshung commented Dec 2, 2022

This change performs the parsing of the new events introduced in dotnet/runtime#55888.

At a high level, here are the code changes:

  • Make the GenAware trace parsing more consistent with the manifest, in particular, I collapsed the GenAwareBeginTraceData and GenAwareEndTraceData into a single class GenAwareTemplateTraceData. These two classes are identical anyway. I also renamed the event GCGenAwareStart to GCGenAwareBegin to be consistent with the manifest as well.

My motivation for doing this change is to experiment with my idea at https://github.com/cshung/perfview/tree/private/trace-event-matcher. It is a prototype that I built to compare ClrTraceEventParser.cs with ClrEtwAll.man so that we can find holes in our event parsing logic. I have no plans to productize yet.

  • Introduce the new GCLOHCompact, GCFitBucketInfo, and GCSettingsRundown events. These events are newly introduced in .NET 6.

  • Parse the new V4 GCAllocationTick event that includes a new field named ObjectSize

  • Parse the new V4 GCGlobalHeapHistory event that includes an array of timestamps.

  • Add the missed PinnedObjectHeap enum value for the CreateSegment event.

  • Add the GC keyword to the default rundown keywords.

In addition to the events exposed on ClrTraceEventParser, we also expose the data through TraceGarbageCollector as public property and TraceGC as public fields (to be consistent with other fields).

This info is also reflected in the raw XML for the GCStat page.

@cshung cshung force-pushed the public/new-gc-events branch from fa7bd50 to bd9f54c Compare December 2, 2022 20:44
@cshung cshung force-pushed the public/new-gc-events branch from bd9f54c to 6539eb1 Compare December 14, 2022 19:55
@cshung cshung marked this pull request as draft December 14, 2022 19:57
@cshung cshung force-pushed the public/new-gc-events branch 5 times, most recently from 2f2d465 to 6c0019c Compare December 17, 2022 22:32
@cshung cshung changed the title Low-level parsing of new GC events Parsing of new GC events Dec 17, 2022
@cshung cshung marked this pull request as ready for review December 17, 2022 22:52
@brianrob
Copy link
Member

brianrob commented Jan 4, 2023

        sb.Append("/>");

I would expect the Count and Times to be written out here.


Refers to: src/TraceEvent/Parsers/ClrTraceEventParser.cs:6977 in 6c0019c. [](commit_id = 6c0019c, deletion_comment = False)

Copy link
Member

@brianrob brianrob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cshung, a few comments, but overall, looks good.

src/PerfView/GcStats.cs Outdated Show resolved Hide resolved
src/PerfView/GcStats.cs Outdated Show resolved Hide resolved
@cshung
Copy link
Member Author

cshung commented Jan 5, 2023

        sb.Append("/>");

Similarly, Times is an array, how exactly do we do that?


In reply to: 1370367894


Refers to: src/TraceEvent/Parsers/ClrTraceEventParser.cs:6977 in 6c0019c. [](commit_id = 6c0019c, deletion_comment = False)

@cshung cshung force-pushed the public/new-gc-events branch from 6c0019c to 70d63ae Compare January 6, 2023 17:13
Copy link
Contributor

@Maoni0 Maoni0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@brianrob brianrob merged commit 92801bd into microsoft:main Mar 27, 2023
@cshung cshung deleted the public/new-gc-events branch March 27, 2023 21:26
@cshung cshung mentioned this pull request Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants