demo-prover
with the ROLLUP_TRACE
environment variable set to the desired path
bash
cd examples/demo-prover/host
ROLLUP_TRACE=rollup.trace cargo bench --bench prover_bench --features bench
rollup.trace
now contains the program counter values for the run of the demo-prover (how many ever blocks, blobs and transactions we configured it for)bash
$ file target/riscv-guest/riscv32im-risc0-zkvm-elf/release/rollup
target/riscv-guest/riscv32im-risc0-zkvm-elf/release/rollup: ELF 32-bit LSB executable, UCB RISC-V, soft-float ABI, version 1 (SYSV), statically linked, with debug_info, not stripped
bash
% cargo run -- --rollup-elf ../../../examples/demo-prover/target/riscv-guest/riscv32im-risc0-zkvm-elf/release/rollup --rollup-trace ../../../examples/demo-prover/host/rollup.trace
Finished dev [unoptimized + debuginfo] target(s) in 0.11s
Running
target/debug/tracer --rollup-elf ../../../examples/demo-prover/target/riscv-guest/riscv32im-risc0-zkvm-elf/release/rollup --rollup-trace ../../../examples/demo-prover/rollup.trace`
[00:01:04] [########################################] 16154861/16154861 (0s) Total instructions in trace: 16154861
Instruction counts considering call graph
+--------------------------------------------------------------------------------------------+-------------------+
| Function Name | Instruction Count |
+============================================================================================+===================+
| _start | 16154854 |
+--------------------------------------------------------------------------------------------+-------------------+
| main | 16153565 |
+--------------------------------------------------------------------------------------------+-------------------+
| rollup::main::h089e03181dac539a | 16153559 |
+--------------------------------------------------------------------------------------------+-------------------+
| sovmodulesstftemplate::
* The tracer also generates a pure count of instructions without considering the stack
* There are other options that can be passed which are self documented in the cli
bash
Usage: tracer [OPTIONS] --rollup-elf
Options:
-t, --top
```