Skip to content

Commit 3ac9cfc

Browse files
petrochenkovmark-i-m
authored andcommitted
Update information about debuginfo configuration
1 parent 52d423e commit 3ac9cfc

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

src/compiler-debugging.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ stack backtrace:
4747
```
4848

4949
If 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
5151
compiler. Then the backtrace will look like this:
5252

5353
```text

src/how-to-build-and-run.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,9 @@ debug-assertions = true
3636
# performance perhaps (less inlining) but it's worth it.
3737
codegen-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`?

src/profiling/with_perf.md

+4-4
Original file line numberDiff line numberDiff 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

2121
perf 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
295295
function 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

300300
By default, all in perf-focus are relative to the **total program
301301
execution**. This is useful to help you keep perspective — often as

0 commit comments

Comments
 (0)