File tree Expand file tree Collapse file tree 3 files changed +8
-10
lines changed Expand file tree Collapse file tree 3 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ stack backtrace:
4747```
4848
4949If you want line numbers for the stack trace, you can enable
50- ` debuginfo-lines=true ` or ` debuginfo=true ` in your config.toml and rebuild the
50+ ` debuginfo-level = 1 ` or ` debuginfo-level = 2 ` in your config.toml and rebuild the
5151compiler. Then the backtrace will look like this:
5252
5353``` text
Original file line number Diff line number Diff line change @@ -36,11 +36,9 @@ debug-assertions = true
3636# performance perhaps (less inlining) but it's worth it.
3737codegen-units = 0
3838
39- # I always enable full debuginfo, though debuginfo-lines is more important.
40- debuginfo = true
41-
42- # Gives you line numbers for backtraces.
43- debuginfo-lines = true
39+ # I always enable full debuginfo, however the line debuginfo (which is a more important part
40+ # and enables e.g. line numbers in backtraces) is enabled by `debuginfo-level = 1` too.
41+ debuginfo-level = 2
4442```
4543
4644### What is ` x.py ` ?
Original file line number Diff line number Diff line change @@ -7,15 +7,15 @@ This is a guide for how to profile rustc with [perf](https://perf.wiki.kernel.or
77- Get a clean checkout of rust-lang/master, or whatever it is you want
88 to profile.
99- Set the following settings in your ` config.toml ` :
10- - ` debuginfo-lines = true `
11- - ` use-jemalloc = false ` — lets you do memory use profiling with valgrind
10+ - ` debuginfo-level = 1 ` - enables line debuginfo
11+ - ` use-jemalloc = false ` - lets you do memory use profiling with valgrind
1212 - leave everything else the defaults
1313- Run ` ./x.py build ` to get a full build
1414- Make a rustup toolchain pointing to that result
1515 - see [ the "build and run" section for instructions] [ b-a-r ]
1616
1717[ b-a-r ] : ../how-to-build-and-run.html#toolchain
18-
18+
1919## Gathering a perf profile
2020
2121perf is an excellent tool on linux that can be used to gather and
@@ -295,7 +295,7 @@ altogether ("total") and the percent of time spent in **just that
295295function and not some callee of that function** (self). Usually
296296"total" is the more interesting number, but not always.
297297
298- ### Relative percentages
298+ ### Relative percentages
299299
300300By default, all in perf-focus are relative to the ** total program
301301execution** . This is useful to help you keep perspective — often as
You can’t perform that action at this time.
0 commit comments