From bfdeafc2b6ef4ff91fc234a35c58245ca927d053 Mon Sep 17 00:00:00 2001 From: Jose Celano Date: Thu, 21 Mar 2024 15:59:23 +0000 Subject: [PATCH] test: [#746] profiling: add configuration to generate flamegraphs You can generate a flamegprah with: ``` TORRUST_TRACKER_PATH_CONFIG="./share/default/config/tracker.udp.benchmarking.toml" cargo flamegraph --bin=profiling -- 60 ``` --- .gitignore | 4 +++- Cargo.toml | 4 ++++ cSpell.json | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index caa52754..1bffb984 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,6 @@ /target /tracker.* /tracker.toml -callgrind.out \ No newline at end of file +callgrind.out +flamegraph.svg +perf.data* \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 24bf78b6..e6f19658 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -103,3 +103,7 @@ opt-level = 1 debug = 1 lto = "fat" opt-level = 3 + +[target.x86_64-unknown-linux-gnu] +linker = "/usr/bin/clang" +rustflags = ["-Clink-arg=-fuse-ld=lld", "-Clink-arg=-Wl,--no-rosegment"] \ No newline at end of file diff --git a/cSpell.json b/cSpell.json index d15355d5..0e98c99e 100644 --- a/cSpell.json +++ b/cSpell.json @@ -105,6 +105,7 @@ "rerequests", "ringbuf", "rngs", + "rosegment", "routable", "rusqlite", "RUSTDOCFLAGS",