Skip to content

Commit 107cef0

Browse files
authored
Recommend to use c++filt (#755)
Since 2016-11-16 c++filt [1] recognizes rust legacy demangling and will supports newer one(v0 name mangling) [2] [3], so it would be better choice. [1]: https://sourceware.org/binutils/docs/binutils/c_002b_002bfilt.html [2]: rust-lang/rfcs#2603 [3]: https://sourceware.org/bugzilla/show_bug.cgi?id=27194
1 parent 630023a commit 107cef0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,16 @@ $ cargo test
148148
149149
Prerequisites:
150150
151-
- Install [`perf`](https://perf.wiki.kernel.org/index.php/Main_Page), [`stackcollapse-perf`](https://github.com/brendangregg/FlameGraph/blob/master/flamegraph.pl), [`rust-unmangle`](https://github.com/Yamakaky/rust-unmangle/blob/master/rust-unmangle) and [`flamegraph`](https://github.com/brendangregg/FlameGraph/blob/master/flamegraph.pl)
151+
- Install [`perf`](https://perf.wiki.kernel.org/index.php/Main_Page), [`stackcollapse-perf`](https://github.com/brendangregg/FlameGraph/blob/master/flamegraph.pl), [`c++filt`](https://sourceware.org/binutils/docs/binutils/c_002b_002bfilt.html) and [`flamegraph`](https://github.com/brendangregg/FlameGraph/blob/master/flamegraph.pl)
152152
153153
```shell
154154
$ RUSTFLAGS='-g' cargo build --release --all-targets # build target
155155
$ sudo perf record --call-graph dwarf ./target/release/examples/dlint benchmarks/oak/**.ts # create performance profile
156-
$ perf script | stackcollapse-perf | rust-unmangle | flamegraph > flame.svg # generate flamegraph
156+
$ perf script | stackcollapse-perf | c++filt | flamegraph > flame.svg # generate flamegraph
157157
```
158158
159+
You can use [rust-unmangle](https://github.com/Yamakaky/rust-unmangle/blob/master/rust-unmangle) or [rustfilt](https://github.com/luser/rustfilt) instead of c++filt.
160+
159161
These commands can take a few minutes to run.
160162
161163
## Contributing

0 commit comments

Comments
 (0)