Bytehound works with Rust stable (Rust nightly is not required) .
Installation
apt-get install gcc nodejs npm
npm install -g yarn
cargo build --release -p bytehound-preload
cargo build --release -p bytehound-cli
Or if you use icon,
icon bytehound -ic
Usage
Run your application with bytehound to collect memory usage data.
export MEMORY_PROFILER_LOG=warn
LD_PRELOAD=./libbytehound.so ./your_application
Below is an example script, which build the "release-debug" version of the Rust project and run it.
cargo build --profile release-debug
export MEMORY_PROFILER_LOG=warn
LD_PRELOAD=~/.local/lib/libbytehound.so ../../target/release-debug/ofcp_test play_r1 \
--five-cards "7c Js Qs 3d 2s" \
--num-sim1 10 \
--num-sim2 10 \
--num-sim3 10 \
--num-sim4 10
Start a web server to visualize the memory profiling data.
bytehound server --port 9090 -i 0.0.0.0 memory-profiling_*.dat