SPMI: Use diffed bytes for jit-analyze and print more info (#61254)
authorJakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com>
Tue, 9 Nov 2021 18:23:48 +0000 (19:23 +0100)
committerGitHub <noreply@github.com>
Tue, 9 Nov 2021 18:23:48 +0000 (19:23 +0100)
commit9c37cdc559a141c92e20e123c9a594fed3692fec
tree164b2a7c1a1262227070956d0074d5bfdd8028dd
parent985cb8329d76f3b8334999581bebde62c54270e0
SPMI: Use diffed bytes for jit-analyze and print more info (#61254)

Fix the misleading total bytes displayed when diffing with SPMI. If one
of the JITs encountered missing data, the code bytes would not be
included, while the other JIT could still have it included if it did not
encounter missing data.

Also add more information about missing SPMI data/successful replays
printed. For replays that is useful to be able to gauge whether there is
still ok coverage after a large change. For diffs, we print a warning
for missing SPMI data that the diff summary may be misleading.

Example for a successful replay:
    Clean SuperPMI replay (219868 contexts processed)

Example for a replay with missing data:
    SuperPMI encountered missing data for 6 out of 27272 contexts

Example warning printed:
    Warning: SuperPMI encountered missing data during the diff. The diff
    summary printed above may be misleading.
    Missing with base JIT: 0. Missing with diff JIT: 6. Total contexts:
    27272.
src/coreclr/ToolBox/superpmi/superpmi/jitinstance.cpp
src/coreclr/ToolBox/superpmi/superpmi/metricssummary.cpp
src/coreclr/ToolBox/superpmi/superpmi/metricssummary.h
src/coreclr/ToolBox/superpmi/superpmi/superpmi.cpp
src/coreclr/scripts/superpmi.py