-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Change default Etw mode to EtwSelfDescribingEventFormat from EtwManifestEventFormat #49410
Comments
Tagging subscribers to this area: @tarekgh, @tommcdon, @pjanotti Issue DetailsDescriptionThere is a startup cost from generating manifest data for Etw #49362 However is trying to optimizing it a wasted effort when it is an older format? e.g. Switching to EtwSelfDescribingEventFormat #49409 by default removes these allocations entirely and it probably the format where the effort to optimize should be focused? From #27621 (comment)
and #27621 (comment)
The docs do also suggest Self Describing is preferred? https://docs.microsoft.com/en-us/windows/win32/tracelogging/trace-logging-about
|
"breaking change for people using EventSource in manifest based scenarios" would mean software that writes events to Windows Event Log, as in #27002. |
For Windows 7 and Server 2008 R2 or earlier; however for them mainstream support ended on January 13, 2015 and Extended support ended January 14, 2020. Does .NET 6.0; not released for another 8 months, need to maintain compat with them? |
Doesn't Windows Event Log in Windows 10 still require the manifest-based format? IIRC, the self-describing format always uses channel 11 (so cannot distinguish between Admin and Operational channels) and assigns event IDs at run time (so you cannot define reliable triggers for the events). runtime/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/Statics.cs Line 24 in 60dc59b
|
Is that a pre-Windows 10 era artefact? https://docs.microsoft.com/en-us/windows/win32/api/traceloggingprovider/nf-traceloggingprovider-traceloggingchannel Though suggests some extra work is needed to update TraceLogging in dotnet/runtime rather than just flipping the enum
|
EventSource reads EventAttribute.Message and copies the text to the instrumentation manifest. The Message Compiler then generates the resources that can be linked into a DLL, registered with Windows Event Log, and displayed by Event Viewer. AFAIK, the self-describing event format does not include these messages. Hypothetically, it might be possible to generate and register the instrumentation manifest with the message strings but write the events themselves in the self-describing format. However, if the self-describing format uses event names rather than stable IDs, I doubt that Windows Event Log would be able to locate the correct event definitions in the manifest. Related links, although these are rather old and would not know if Windows Event Log has been improved since then: |
@benaadams - I see this has gone quiet for a few months, were you still pursuing this? I got the impression you and @josalem were trying to pursue source generators instead so maybe this was moot? |
Think it could possibility be breaking and source generators would reduce the cost; as would VS not listening to verbose events machine wide, which I think was a different issue |
Description
There is a startup cost from generating manifest data for Etw #49362
However is trying to optimizing it a wasted effort when it is an older format?
e.g. Switching to EtwSelfDescribingEventFormat #49409 by default removes these allocations entirely and it probably the format where the effort to optimize should be focused?
From #27621 (comment)
and #27621 (comment)
The docs do also suggest Self Describing is preferred? https://docs.microsoft.com/en-us/windows/win32/tracelogging/trace-logging-about
The text was updated successfully, but these errors were encountered: