vs-threading icon indicating copy to clipboard operation
vs-threading copied to clipboard

Low priority: ETW event ArgsMismatches

Open lifengl opened this issue 7 years ago • 0 comments

not a problem when ETW trace is not enabled.

But when I turn it on to investigate potential lock contentions, I notice contentions in the AsyncReaderWriterLock, but further investigating shows it is more artificial when I turn on ETW events.

It seems that ReaderWriterLockIssued event will run into some logic in EventSource to write args mismatches messages, and it runs into other lock contentions to get the resource string.

not sure why this logic is triggered, but some ETW function converts enum to int, but one doesn't. Can this possibly related?

Name Inc % Inc Inc Ct Exc % Exc Exc Ct Fold Fold Ct When
+ Microsoft.VisualStudio.Threading!ThreadingEventSource.ReaderWriterLockIssued 1.7 26.736 4 0.0 0 0 0 0 AAAAAAAAAAAAAAAAAAAAAo2_________
|+ mscorlib.ni!EventSource.WriteEventVarargs 1.7 26.736 4 0.0 0 0 0 0 AAAAAAAAAAAAAAAAAAAAAo2_________
| + mscorlib.ni!EventSource.LogEventArgsMismatches 1.7 26.736 4 0.0 0 0 0 0 AAAAAAAAAAAAAAAAAAAAAo2_________
|  + clr!GetResourceFromDefault 1.7 26.736 4 0.0 0 0 0 0 AAAAAAAAAAAAAAAAAAAAAo2_________
|   + clr!GetResourceStringFromManaged 1.7 26.736 4 0.0 0 0 0 0 AAAAAAAAAAAAAAAAAAAAAo2_________
|    + clr!MethodDescCallSite::CallTargetWorker 1.7 26.393 2 0.0 0 0 0 0 AAAAAAAAAAAAAAAAAAAAAo__________
|    |+ clr!CallDescrWorkerWithHandler 1.7 26.393 2 0.0 0 0 0 0 AAAAAAAAAAAAAAAAAAAAAo__________
|    | + clr!CallDescrWorkerInternal 1.7 26.393 2 0.0 0 0 0 0 AAAAAAAAAAAAAAAAAAAAAo__________
|    |  + mscorlib.ni!Environment.GetResourceStringLocal 1.7 26.393 2 0.0 0 0 0 0 AAAAAAAAAAAAAAAAAAAAAo__________
|    |   + mscorlib.ni!System.Environment+ResourceHelper.GetResourceString(System.String) 1.7 26.393 2 0.0 0 0 0 0 AAAAAAAAAAAAAAAAAAAAAo__________
|    |    + mscorlib.ni!System.Environment+ResourceHelper.GetResourceString(System.String, System.Globalization.CultureInfo) 1.7 26.393 2 0.0 0 0 0 0 AAAAAAAAAAAAAAAAAAAAAo__________
|    |     + clr!ReflectionInvocation::ExecuteCodeWithGuaranteedCleanup 1.7 26.393 2 0.0 0 0 0 0 AAAAAAAAAAAAAAAAAAAAAo__________
|    |      + clr!ExecuteCodeWithGuaranteedCleanupHelper 1.7 26.393 2 0.0 0 0 0 0 AAAAAAAAAAAAAAAAAAAAAo__________
|    |       + clr!DispatchCallSimple 1.7 26.393 2 0.0 0 0 0 0 AAAAAAAAAAAAAAAAAAAAAo__________
|    |        + clr!CallDescrWorkerWithHandler 1.7 26.393 2 0.0 0 0 0 0 AAAAAAAAAAAAAAAAAAAAAo__________
|    |         + clr!CallDescrWorkerInternal 1.7 26.393 2 0.0 0 0 0 0 AAAAAAAAAAAAAAAAAAAAAo__________
|    |          + mscorlib.ni!System.Environment+ResourceHelper.GetResourceStringCode(System.Object) 1.7 26.393 2 0.0 0 0 0 0 AAAAAAAAAAAAAAAAAAAAAo__________
|    |           + mscorlib.ni!RuntimeResourceSet.GetString 1.7 26.393 2 0.0 0 0 0 0 AAAAAAAAAAAAAAAAAAAAAo__________
|    |            + mscorlib.ni!RuntimeResourceSet.GetObject 1.7 26.393 2 0.0 0 0 0 0 AAAAAAAAAAAAAAAAAAAAAo__________
|    |             + mscorlib.ni!System.Collections.Generic.Dictionary`2[System.__Canon,System.Resources.ResourceLocator].TryGetValue(System.__Canon, System.Resources.ResourceLocator ByRef) 1.7 26.393 2 0.0 0 0 0 0 AAAAAAAAAAAAAAAAAAAAAo__________
|    |              + mscorlib.ni!System.Collections.Generic.Dictionary`2[System.__Canon,System.Resources.ResourceLocator].FindEntry(System.__Canon) 1.7 26.393 2 0.0 0 0 0 0 AAAAAAAAAAAAAAAAAAAAAo__________
|    |               + ntoskrnl!? 1.7 26.393 2 0.0 0 0 0 0 AAAAAAAAAAAAAAAAAAAAAo__________
|    |                + BLOCKED_TIME 1.7 26.205 1 1.7 26.205 1 0 0 AAAAAAAAAAAAAAAAAAAA8___________
|    |                + CPU_TIME 0.0 0.188 1 0.0 0.188 1 0 0 __________1o

lifengl avatar Feb 28 '18 22:02 lifengl