Skip to content

Commit bcf9001

Browse files
author
Alexander Zaitsev
committed
feat: rename debug-info-for-profiling switch
1 parent 1d59f66 commit bcf9001

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

compiler/rustc_codegen_ssa/src/back/write.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ impl ModuleConfig {
180180
),
181181
pgo_use: if_regular!(sess.opts.cg.profile_use.clone(), None),
182182
pgo_sample_use: if_regular!(sess.opts.unstable_opts.profile_sample_use.clone(), None),
183-
debug_info_for_profiling: sess.opts.unstable_opts.debug_info_for_profiling,
183+
debug_info_for_profiling: sess.opts.unstable_opts.debuginfo_for_profiling,
184184
instrument_coverage: if_regular!(sess.instrument_coverage(), false),
185185

186186
sanitizer: if_regular!(sess.sanitizers(), SanitizerSet::empty()),

compiler/rustc_interface/src/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -782,8 +782,8 @@ fn test_unstable_options_tracking_hash() {
782782
);
783783
tracked!(crate_attr, vec!["abc".to_string()]);
784784
tracked!(cross_crate_inline_threshold, InliningThreshold::Always);
785-
tracked!(debug_info_for_profiling, true);
786785
tracked!(debug_info_type_line_numbers, true);
786+
tracked!(debuginfo_for_profiling, true);
787787
tracked!(default_visibility, Some(rustc_target::spec::SymbolVisibility::Hidden));
788788
tracked!(dep_info_omit_d_target, true);
789789
tracked!(direct_access_external_data, Some(true));

compiler/rustc_session/src/options.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2252,12 +2252,12 @@ options! {
22522252
"inject the given attribute in the crate"),
22532253
cross_crate_inline_threshold: InliningThreshold = (InliningThreshold::Sometimes(100), parse_inlining_threshold, [TRACKED],
22542254
"threshold to allow cross crate inlining of functions"),
2255-
debug_info_for_profiling: bool = (false, parse_bool, [TRACKED],
2256-
"emit discriminators and other data necessary for AutoFDO"),
22572255
debug_info_type_line_numbers: bool = (false, parse_bool, [TRACKED],
22582256
"emit type and line information for additional data types (default: no)"),
22592257
debuginfo_compression: DebugInfoCompression = (DebugInfoCompression::None, parse_debuginfo_compression, [TRACKED],
22602258
"compress debug info sections (none, zlib, zstd, default: none)"),
2259+
debuginfo_for_profiling: bool = (false, parse_bool, [TRACKED],
2260+
"emit discriminators and other data necessary for AutoFDO"),
22612261
deduplicate_diagnostics: bool = (true, parse_bool, [UNTRACKED],
22622262
"deduplicate identical diagnostics (default: yes)"),
22632263
default_visibility: Option<SymbolVisibility> = (None, parse_opt_symbol_visibility, [TRACKED],

src/doc/unstable-book/src/compiler-flags/debug_info_for_profiling.md renamed to src/doc/unstable-book/src/compiler-flags/debuginfo_for_profiling.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# `debug-info-for-profiling`
1+
# `debuginfo-for-profiling`
22

33
---
44

@@ -22,7 +22,7 @@ external tool `create_llvm_prof` from [this repository] must be used.
2222
Given a Rust file `main.rs`, we can produce an optimized binary as follows:
2323

2424
```shell
25-
rustc -O -Zdebug-info-for-profiling main.rs -o main
25+
rustc -O -Zdebuginfo-for-profiling main.rs -o main
2626
perf record -b ./main
2727
create_llvm_prof --binary=main --out=code.prof
2828
rustc -O -Zprofile-sample-use=code.prof main.rs -o main2

src/doc/unstable-book/src/compiler-flags/profile_sample_use.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
`-Zprofile-sample-use=code.prof` directs `rustc` to use the profile
66
`code.prof` as a source for Automatic Feedback Directed Optimization (AFDO).
7-
See the documentation of [`-Zdebug-info-for-profiling`] for more information
7+
See the documentation of [`-Zdebuginfo-for-profiling`] for more information
88
on using AFDO.
99

10-
[`-Zdebug-info-for-profiling`]: debug_info_for_profiling.html
10+
[`-Zdebuginfo-for-profiling`]: debuginfo_for_profiling.html

0 commit comments

Comments
 (0)