Open
Description
I was able to get a 11.5% speed increase with PGO optimization. (Memory usage did not change)
cargo install cargo-pgo
rustup component add llvm-tools-preview
cargo pgo build
cargo pgo instrument --keep-profiles run csv-timeline -d ../hayabusa-sample-evtx -w -D -n -x -X -s -o delete.csv -C -p super-verbose
cargo pgo instrument --keep-profiles run json-timeline -d ../hayabusa-sample-evtx -w -D -n -x -X -s -o delete.csv -C -p super-verbose
cargo pgo instrument --keep-profiles run logon-summary -d ../hayabusa-sample-evtx -o delete.csv -C
cargo pgo instrument --keep-profiles run eid-metrics -d ../hayabusa-sample-evtx -o delete.csv -C
cargo pgo optimize
Notes
- The optimized binary gets outputted at
target/x86_64-apple-darwin/release/
, etc... directories instead of./target/release
- The profiles will differ based on workload, so we should probably be running the hayabusa commands against the
hayabusa-sample-evtx
files as well as theevtx-baseline
files - I still haven't tried optimization with BOLT although apparently rustc already does some optimizations so might not be necessary.
- The profiles are not getting created on Windows for some reason...
Info:
- Evaluate using Profile-Guided Optimization (PGO) and Post-Link Optimization (PLO) #1247
- https://github.com/Kobzol/cargo-pgo
- https://doc.rust-lang.org/rustc/profile-guided-optimization.html
@fukusuket Whenever you have time, could you test to see if you get faster benchmarks as well? If so, I'd like to add to clone the release binary automation action and add PGO optimizations to it.