A platform to run conditional branch prediction experiments on real binaries. It can:
- Capture branch trace from real binaries
- Run SimPoint methodology on branch traces to reduce size and simulation speed
- Simulate branch predictors (from CBP2016, etc.) on the branch traces
- Clone this repository, and:
cargo build --release- Build tracers under
tracersdirectory if necessary. See tracers/README.md for details. - Run experiments:
- Prepare benchmark config under
benchmarks/[config]/config.json, see Configuration section - Record traces:
cargo run --release --bin benchmark -- record --tracer [tracer] --config-name [config], traces are stored underbenchmarks/[config]/traces/final - Display trace statistics:
cargo run --release --bin benchmark -- info --config-name [config] - Run SimPoint clustering:
cargo run --release --bin benchmark -- simpoint --config-name [config] --size [instructions] - Run branch prediction:
cargo run --release --bin benchmark -- simulate --config-name [config] --predictor [predictor] - Find results under:
benchmarks/[config]/[simulate]/[datetime]-[predictor]/per-benchmarkor usecargo run --release --bin benchmark -- report
- Prepare benchmark config under
Example #1 leela benchmark:
cargo run --release --bin benchmark -- record --config-name leela --tracer intel-pt
cargo run --release --bin benchmark -- info --config-name leela
cargo run --release --bin benchmark -- simpoint --config-name leela --size 100000000
cargo run --release --bin benchmark -- simulate --config-name leela --predictor AndreSeznec-TAGE-SC-L-8KBExample #2 some dynamically linked binaries:
cargo run --release --bin benchmark -- record --config-name test --tracer intel-pt
cargo run --release --bin benchmark -- info --config-name test
cargo run --release --bin benchmark -- simpoint --config-name test --size 1000
cargo run --release --bin benchmark -- simulate --config-name test --predictor AndreSeznec-TAGE-SC-L-8KBExample #3 full spec int 2017 rate:
# it takes 20+ hours
cargo run --release --bin benchmark -- record --config-name spec-int-2017-rate --tracer pin
cargo run --release --bin benchmark -- info --config-name spec-int-2017-rate
cargo run --release --bin benchmark -- simpoint --config-name spec-int-2017-rate --size 100000000
cargo run --release --bin benchmark -- simulate --config-name spec-int-2017-rate --predictor AndreSeznec-TAGE-SC-L-8KBConfiguration hierarchy:
- config, e.g.
spec-int-2017-rate-1 - benchmark, e.g.
leela - command, e.g.
leela ref.sgf - simpoint, e.g. the first simpoint phase of
leela ref.sgf
You can add benchmarks to benchmarks/[config]/config.json, like:
{
"benchmarks": [{
"name": "ls",
"commands": [{
"command": "/usr/bin/ls ."
}]
}, {
"name": "cat",
"commands": [{
"command": "/usr/bin/cat /proc/self/maps"
}]
}]
}fork breaks intel pt converter due to missing filtering of events from child processes