perfview icon indicating copy to clipboard operation
perfview copied to clipboard

UInt64 field added to ETW event with TraceLoggingValue is seen as long rather than ulong

Open ara-ayvazyan opened this issue 1 year ago • 1 comments

When adding a std::uint64_t field to an ETW event with TraceLoggingValue is seen as a long rather than ulong when using TraceEvent.PayloadByName.

I haven't checked if the same happens with other integer types and/or when using manifest-based event.

ara-ayvazyan avatar Aug 15 '24 21:08 ara-ayvazyan

Can you share example trace file (so it's faster to try it on my side)?

cincuranet avatar Aug 21 '24 08:08 cincuranet

Confirmed that this behavior is pervasive across TraceEvent. The type is selected here: https://github.com/microsoft/perfview/blob/1c22582c132ef7ea4733cb24ef75b04d319b52ce/src/TraceEvent/DynamicTraceEventParser.cs#L1374.

Given how pervasive this is, I am inclined to keep it as is, and ask that folks work around this by casting. If there are scenarios where this is a problem, we also have the new PredefinedDynamicTraceEventParser where you can explicitly implement the parser with the type that you prefer.

brianrob avatar Jun 06 '25 00:06 brianrob