You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support TraceLogging formatting hints like TraceLoggingHexUInt32 #2436
It would be nice if PerfView used the display formatting hints that the C++ TraceLogging library lets you write. For example, there are hints to indicate that an integer value should hex formatted on display or that the value is a HRESULT. See the TraceLogging Wrapper Macros docs for the full list.
If the hints were used, this could be rendered like this:
value1ToLog="1" value2ToLog="0x8001"
For things like flags this can be easier to read at a glance. There are also common values that are represented in hex, like PCI IDs.
As best I can tell, this metadata gets attached to the each event via the EVENT_DATA_DESCRIPTOR struct with a Type of EVENT_DATA_DESCRIPTOR_TYPE_EVENT_METADATA.
In the copy of TraceLoggingProvider.h in the 10.0.26100.0 Windows SDK (\Include\10.0.26100.0\shared\TraceLoggingProvider.h), it looks like there's a description of how this metadata is serialized starting at line 2421 (a comment that starts with "This comment defines the TraceLogging encoding format.")
Christopher Warrington (@chwarr) this seems very reasonable. Would you be up for putting together a plan of execution for this? Seems like great copilot fodder. The one question in my mind is how these hints flow through to the events viewer - that's the thing that likely needs a bit of a plan.
Yes, I was able to get this working. PR #2443 has my proposed changes.
I flowed the hints through by adding a formatting hint enum to PayloadFetch. This avoided needing to have PayloadFetch track its inType and outType. I can switch to tracing inType and outType if you're prefer. Let me know in the PR.
Activity
brianrob commentedon Jun 19, 2026
Christopher Warrington (@chwarr) this seems very reasonable. Would you be up for putting together a plan of execution for this? Seems like great copilot fodder. The one question in my mind is how these hints flow through to the events viewer - that's the thing that likely needs a bit of a plan.
chwarr commentedon Jul 17, 2026
Yes, I was able to get this working. PR #2443 has my proposed changes.
I flowed the hints through by adding a formatting hint enum to PayloadFetch. This avoided needing to have PayloadFetch track its inType and outType. I can switch to tracing inType and outType if you're prefer. Let me know in the PR.
Support TraceLogging formatting hints (microsoft#2443)