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

Incomplete rundown event metadata #96365

Open
verdie-g opened this issue Dec 30, 2023 · 2 comments
Open

Incomplete rundown event metadata #96365

verdie-g opened this issue Dec 30, 2023 · 2 comments
Labels
area-Tracing-coreclr enhancement Product code improvement that does NOT require public API changes/additions
Milestone

Comments

@verdie-g
Copy link
Contributor

verdie-g commented Dec 30, 2023

Description

While writing my own event pipe reader, I noticed that some event metadata have an empty event name and don't define any field descriptions. It seems like all these events are under the Microsoft-Windows-DotNETRuntimeRundown provider.

Reproduction Steps

Write a random .NET program, for example

while (true)
{
    await Task.Run(() => { });
    await Task.Delay(50);
}

and collect a trace, for example

dotnet trace collect -p $PID --providers='System.Threading.Tasks.TplEventSource:0x1:4'

Now if you look for the field strings in the nettrace file

$ grep -ao 'O.r.i.g.i.n.a.t.i.n.g.T.a.s.k.S.c.h.e.d.u.l.e.r.I.D' Test.exe_20231229_192905.nettrace
OriginatingTaskSchedulerID
OriginatingTaskSchedulerID
OriginatingTaskSchedulerID

$ grep -ao 'M.e.t.h.o.d.S.t.a.r.t.A.d.d.r.e.s.s' Test.exe_20231229_192905.nettrace

The field OriginatingTaskSchedulerID from an event of the TplEventSource provider is present but the MethodStartAddress field of the Microsoft-Windows-DotNETRuntimeRundown/MethodLoadUnloadRundown event is not.

Expected behavior

I'm expecting the nettrace file to self-contain all metadata to be parsed. Especially, all event metadata with their fields in the MetadataBlock objects so the events in EventBlock objects can be parsed.

Actual behavior

image

In my custom event pipe parser I can see that the Microsoft-Windows-DotNETRuntimeRundown events don't have an event name and field descriptors.

Regression?

No response

Known Workarounds

I think PerfView hardcodes the Microsoft-Windows-DotNETRuntimeRundown field descriptors instead of reading them from the nettrace file. This is not future proof in the case where a new version of an event is introduced.

Configuration

  • .NET 8.0
  • Windows
  • x64

Other information

No response

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Dec 30, 2023
@tommcdon
Copy link
Member

tommcdon commented Jan 2, 2024

@davmason

@tommcdon tommcdon added this to the 9.0.0 milestone Jan 6, 2024
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Jan 6, 2024
@tommcdon tommcdon added enhancement Product code improvement that does NOT require public API changes/additions untriaged New issue has not been triaged by the area owner and removed untriaged New issue has not been triaged by the area owner labels Jan 6, 2024
@verdie-g
Copy link
Contributor Author

Actually it appears that many events have the same issue

image

In this screenshot, only ProcessInfo and TaskWaitBegin have a non-empty name and field definitions. Event such as GCAllocationTick (id=10 from Microsoft-Windows-DotNETRuntime) has the issue.

@tommcdon tommcdon modified the milestones: 9.0.0, Future Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Tracing-coreclr enhancement Product code improvement that does NOT require public API changes/additions
Projects
None yet
Development

No branches or pull requests

2 participants