Uh oh!
There was an error while loading. Please reload this page.
Implement JitInfo API - #55046
Conversation
* add per thread privately * add test for counter * add test for priuvate metric (currently failing due to linker I think)
ghost
commented
Jul 1, 2021
Tagging subscribers to this area: @dotnet/area-system-runtime Issue DetailsImplements #54444 TODO:
Putting this up in draft form for some early feedback. CC @tommcdon@benmwatson@lateralusX
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
* Fix mono build by adding mono partial class to csproj * PR feedback * no interlocked* for thread_local * use CLR_BOOL * use LARGE_INTEGER and only static_cast once * correct ticks calculation * convert Stopwatch methods to internal * use same conversion as S.D.Stopwatch
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
* normalize ticks to 100ns in native code * add NormalizedTimer class * added source ref * change ret value to long
Uh oh!
There was an error while loading. Please reload this page.
* use double for frequency in case clock resolution is larger than 100ns
* test was attempting to parse ints when the interval can be a double
* skip on aot platforms * add current thread test for coreclr
Uh oh!
There was an error while loading. Please reload this page.
noahfalk
left a comment
There was a problem hiding this comment.
Made a few suggestions on the tests, but overall lgtm!
I take it you have looked at some generated numbers manually to confirm the results look reasonable?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
* Removed Volatile<T> from globals since they are all accessed either via InterlockedExchange or VolatileLoad * Added no tearing helper function for 32 bit systems * updated tests to compare before and after * added tests for AOT and Mono specific behaviors * furether simplified NormalizedTimer class with asserts
josalem
commented
Jul 8, 2021
Does anyone know a way to detect whether a test is being run under the Mono interpreter? If not, I'm going to modify the Mono flavor of the test to accept 0 and (after-before)==0. |
jkotas
commented
Jul 8, 2021
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
* use ref emit dynamic method * adds IsNotMonoAot platform detection
josalem
commented
Jul 12, 2021
Barring any CI failures, I'm hoping to merge this later today. |
josalem
commented
Jul 13, 2021
Remaining failure seems to be #55536. |
josalem
commented
Jul 13, 2021
/azp run runtime |
|
Azure Pipelines successfully started running 1 pipeline(s). |
josalem
commented
Jul 14, 2021
I have a successful CI run; I'm intending to merge this PR this morning. |
Implements #54444
This PR adds the
System.Runtime.JitInfostatic class and static methods. These are used for collecting information about the Just In Time compiler. As implemented, the API allows you retrieve:Some side-effects to this patch:
NormalizedTimerclass to the CoreCLR utils for collecting time differences in 100ns ticks (the same ticks used byTimeSpan.FromTicks()). This should help avoid discrepancies in tick definitions between managed and native code.CC @tommcdon@benmwatson@lateralusX