JIT: Add a simple Counter dumpable#98350
Conversation
This allows easily measuring and outputting a single value at the end of all JIT compilations.
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsThis allows easily measuring and outputting a single value at the end of all JIT compilations. Example use: @@ -1137,6 +1137,9 @@ void Compiler::optReplaceWidenedIV(unsigned lclNum, unsigned newLclNum, Statemen
}
}
+static Counter s_widened;
+static DumpOnShutdown d("Widened IVs", &s_widened);
+
//------------------------------------------------------------------------
// optInductionVariables: Try and optimize induction variables in the method.
//
@@ -1275,6 +1278,7 @@ PhaseStatus Compiler::optInductionVariables()
});
changed |= optSinkWidenedIV(lcl->GetLclNum(), newLclNum, loop);
+ s_widened.Value++;
}
}
|
|
oh, didn't know Dumpable existed, I always used just a plain fopen/fprintf 🙂 |
Diff results for #98350Throughput diffsThroughput diffs for linux/arm64 ran on windows/x64MinOpts (-0.01% to +0.00%)
Throughput diffs for osx/arm64 ran on windows/x64MinOpts (-0.00% to +0.01%)
Throughput diffs for windows/arm64 ran on windows/x64MinOpts (-0.00% to +0.01%)
Details here |
|
cc @dotnet/jit-contrib PTAL @AndyAyersMS |
These convenience types are a bit new, I added them in #92112. I frequently use them to do quick adhoc measurements of stats |
|
At some point we ought to reconsider our approach: in-jit aggregation vs external aggregation. I get the appeal of the former (no extra step required!) but I frequently find I prefer the latter (via say But that's no reason to hold up this PR... |
This allows easily measuring and outputting a single value at the end of all JIT compilations.
Example use: