-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
HostingEventSource uses EtwSelfDescribingFormat instead EtwManifestFormat #30584
Comments
Thanks for contacting us. |
Done via #30629 |
Should they be EtwSelfDescribingFormat anyway? From dotnet/runtime#27621 (comment)
and dotnet/runtime#27621 (comment)
|
If I understood correctly, as long as we don't have non-primitives types emitted we should be okay. Re-opening this issue to verify that is indeed what's happening |
Other than comments in dotnet/runtime#27621 (comment) saying The docs do also suggest Self Describing is preferred? https://docs.microsoft.com/en-us/windows/win32/tracelogging/trace-logging-about
|
Will open issue in dotnet/runtime |
Raised issue dotnet/runtime#49410 |
I should have mentioned my motivation for making the change in the first place was your linked investigation. Assuming we move manifest generation in to source generator., there's no startup penalty or penalty on every invocation of WriteEvent (with ETW, EventPipe is always self-describing anyways). |
Priority was dropped on it 😢 dotnet/runtime#43390 (comment) |
Unfortunately, I'm aware (and the instigator😅). Manifest generation is still a possibility, but it's the serializer/de-serializer generation that definitely not happening |
A whole lot of startup going into generating EventSource manifests and Guids etc for a standardish ASP.NET Core app with ApplicationInsights, e.g. this is https://themesof.net/ Couldn't fit it all on one screen, here's the rest |
Have you measured the per using System.Diagnostics.Tracing;
for (var i = 0; i < 10000; i++)
{
MyEventSource.Log.MyEvent();
}
internal class MyEventSource : EventSource
{
public static readonly MyEventSource Log = new MyEventSource();
// public MyEventSource() : base("MyEventSource", EventSourceSettings.EtwManifestEventFormat)
public MyEventSource() : base("MyEventSource", EventSourceSettings.EtwSelfDescribingEventFormat)
{ }
[Event(1, Level = EventLevel.LogAlways)]
public void MyEvent()
{
WriteEvent(1);
}
} |
@cijothomas As an FYI, you might be interested in ApplicationInsights contribution to the Startup profile. Based on the outcome of this conversation, you might be interested in copying whatever we end up doing here |
For https://themesof.net/ looks like 27 |
No, would be interesting to see the difference |
Thanks for contacting us. |
@shirhatti Can you please update the issue with current state and re-milestone as appropriate? |
Unfortunately, this slipped through the cracks for 6.0. Given that the expectation is that in 7.0, we have source generators for manifest generation, it is highly unlikely that we'd want to revert this change. As such, I'm closing this issue despite knowing there is small impact on process start time for 6.0 |
HostingEventSource
,HttpConnectionsEventSource
, andConcurrencyLimiterEventSource
used theEtwSelfDescribingFormat
instead of theEtwManifestFormat
. SurprisinglyKestrelEventSource
does not not have the same issue.It looks like this change was inadvertently introduced as part of a previous change when switching to a different EventSource ctor that changed the behavior.
I haven't profiled this, but I assume there should be some minimal overhead observed on every
WriteEvent
call when ETW is enabled. This doesn't impact EventPipe profiling scenarios.To quote @josalem
A simple fix would be
The text was updated successfully, but these errors were encountered: