Add plugin bbvgen: basic block icounts for topblocks + simpoints
PATCH 1/1 Add plugin bbvgen: basic block icounts for topblocks + simpoints
Tally icounts for basic blocks. The data is useful for producing human-readable topblocks reports, and for creating simpoints to guide accurate & efficient machine simulation runs.
QEMU's The Tiny Code Generator creates TCG blocks in a way that is expedient for JIT translation but does not conform to the model of CFG basic blocks. TCG greedily translates straight-line code until it must end the block for one of four reasons: (1) page boundary, or (2) maximum TCG block length, or (3) CSR-hacking insn, or (4) jump/branch insn. A single TCG block can span multiple CFG blocks when there are internal branch targets. Multiple TCG blocks can constitute a single CFG block when the component TCG blocks terminate at page boundary, max block length, or CSR-hacking insn.
The bbvgen plugin normalizes TCG blocks into CFG blocks.
--- contrib/plugins/Makefile | 1 + contrib/plugins/bbvgen.c | 1969 ++++++++++++++++++++++++++++++++++++++ docs/about/emulation.rst | 69 ++ 3 files changed, 2039 insertions(+) create mode 100644 contrib/plugins/bbvgen.c
contrib/plugins/Makefile +1 -0
@@ -29,6 +29,7 @@ NAMES += cache NAMES += drcov NAMES += ips NAMES += stoptrigger +NAMES += bbvgen ifeq ($(CONFIG_WIN32),y) SO_SUFFIX := .dll
contrib/plugins/bbvgen.c new file +1969 -0
1,969 lines not on this page · raw message
docs/about/emulation.rst +69 -0
75 lines not on this page · raw message
Signature · 1 line
2.34.1
Quoted 14 lines · Greg McGary
Tally icounts for basic blocks. The data is useful for producing human-readable topblocks reports, and for creating simpoints to guide accurate & efficient machine simulation runs.
QEMU's The Tiny Code Generator creates TCG blocks in a way that is expedient for JIT translation but does not conform to the model of CFG basic blocks. TCG greedily translates straight-line code until it must end the block for one of four reasons: (1) page boundary, or (2) maximum TCG block length, or (3) CSR-hacking insn, or (4) jump/branch insn. A single TCG block can span multiple CFG blocks when there are internal branch targets. Multiple TCG blocks can constitute a single CFG block when the component TCG blocks terminate at page boundary, max block length, or CSR-hacking insn.
Quoted 1 line
The bbvgen plugin normalizes TCG blocks into CFG blocks.
Are there any tools that consume this data?
<snip>
Signature · 2 lines
Alex Bennée Virtualisation Tech Lead @ Linaro
Quoted 1 line
Are there any tools that consume this data?
Yes. I will post one soon as a follow-up patch. It takes the bbvi.json.gz as input and produces a report sorted by icount of disassembled top blocks.
G