-
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
System.Collections.Immutable.ImmutableList1+Enumerator[System.Collections.Generic.KeyValuePair
2[System.__Canon,System.__Canon]].Dispose() takes 17 ms to JIT
#23124
Comments
Oh that inline reference is nice. |
Doesn't do the inline reference in coreclr; I had to copy and paste code; like an animal... |
That's it, this feature is useless to me. Turn it off @github! :) |
Make note that we've NGEN'd Immutable - so these are methods being JIT'd above and beyond what's NGEN'd. In this trace, it took a total of 35ms to JIT immutable in the following:
|
@karelz Not sure I understand what you mean. |
Seeing if I can get a Jit output. Do you know what the type is? There is some wild generic use :) ImmutableList<LazyItemEvaluator<P, I, M, D>.ItemData>.Enumerator But can't find a ImmutableList where it gets a KeyValuePair |
nvm, am following instructions in other issue |
@davkean I meant isolated repro to confirm the 30.5ms of JIT time for |
If you have ETL lying around, send it my way. Likely there is a classload or something similar in there, but best to be sure. Also you are presumably prejitting in R2R format, right? R2R can't handle all the cases that classic ngen can, so some extra jitting is expected over what you might have seen on desktop. |
We're not using R2R (didn't even know it was enabled for desktop?) - we're using classic NGEN. Interestingly enough when I was looking at this, I could repro this over and over again, if I try to repro it now, it's still taking a while (4ms) but not as long as before. Might have had an OS update in between? I've got a trace where we took 30ms to jit it, available: \mlangfs1\public\davkean\corefx\23125 (uploading now, should take 20 minutes). |
My repro was this:
|
From the ETL, jitting for that method started at 3.040741s and ran until roughly 3.077s. During that time msbuild was not running that much -- it was only using around 10% of 1 CPU. The most active process was MsMpEng, perhaps prompted by writes to the ETL file. You might be able to reduce the volume of ETL and hence the likelihood of ETL file I/O by rerunning with fewer noisy apps open; looks like both chrome and devenv were waking up from time to time and adding events. Also maybe put your temp ETL into a directory that is excluded from the AV? |
The NI for Systems.Collections.dll was also loaded about this time; I can't tell if this was just going on independently or was triggered by jitting this method. |
Thanks @AndyAyersMS, let me try and reduce the noise here. Is there a doc somewhere that tells me the best way to investigate if JIT is getting in our way to avoid bothering other devs unless needed? Basically, I'm looking certain at MSBuild runs, seeing that PerfView tells me that JIT is ~50% of CPU time and I want to basically translate that to actual impact on clock time it takes to run a build. |
It should be the same as doing regular clock time analysis - you should not focus only on JIT as potential source of troubles - either it will pop or not. |
I watched Vance's videos a few months ago, but now I have a bunch more experience with PerfView they probably make a lot more sense. I'll go back and find that one. |
If you are seeing 50% exclusive time in clrjit.dll then yeah we should definitely investigate. If it is 50% inclusive then it may be the jit or it may be the way dependent assemblies and the classes they introduce are referenced. |
@davkean did you figure out any more ? |
@davkean ping on this one, should we leave it open? |
No response on this one, I suggest we see whether it comes out of the next time we look at profiles. |
Looking at some perf problems with MSBuild, we're spending lots of time JITing, this one in particular stood out:
Almost all other methods are under 1ms. Can we simplify this method?
The text was updated successfully, but these errors were encountered: