Skip to content
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

Low priority: ETW event ArgsMismatches #224

Open
lifengl opened this issue Feb 28, 2018 · 0 comments
Open

Low priority: ETW event ArgsMismatches #224

lifengl opened this issue Feb 28, 2018 · 0 comments

Comments

@lifengl
Copy link
Member

lifengl commented Feb 28, 2018

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.Dictionary2[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.Dictionary2[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
AArnott pushed a commit to AArnott/vs-threading that referenced this issue Oct 24, 2023
Bumps [xunit.runner.visualstudio](https://github.com/xunit/visualstudio.xunit) from 2.5.1 to 2.5.3.
- [Release notes](https://github.com/xunit/visualstudio.xunit/releases)
- [Commits](xunit/visualstudio.xunit@2.5.1...2.5.3)

---
updated-dependencies:
- dependency-name: xunit.runner.visualstudio
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant