File tree Expand file tree Collapse file tree 4 files changed +39
-16
lines changed Expand file tree Collapse file tree 4 files changed +39
-16
lines changed Original file line number Diff line number Diff line change @@ -130,7 +130,6 @@ run-make/no-alloc-shim/Makefile
130130run-make/no-builtins-attribute/Makefile
131131run-make/no-duplicate-libs/Makefile
132132run-make/obey-crate-type-flag/Makefile
133- run-make/optimization-remarks-dir/Makefile
134133run-make/output-type-permutations/Makefile
135134run-make/override-aliased-flags/Makefile
136135run-make/overwrite-input/Makefile
Original file line number Diff line number Diff line change 77//@ needs-profiler-support
88//@ ignore-cross-compile
99
10- use run_make_support:: { run , llvm_profdata, rustc , invalid_utf8_contains } ;
10+ use run_make_support:: { invalid_utf8_contains , llvm_profdata, run , rustc } ;
1111
1212fn main ( ) {
1313 rustc ( ) . profile_generate ( "profdata" ) . opt ( ) . input ( "foo.rs" ) . output ( "foo" ) . run ( ) ;
1414 run ( "foo" ) ;
15- llvm_profdata ( ) . merge ( ) . output ( "merged.profdata" ) . input ( "profdata/default_15907418011457399462_0.profraw" ) . run ( ) ;
16- rustc ( ) . profile_use ( "merged.profdata" ) . opt ( ) . input ( "foo.rs" ) . arg ( "-Cremark=all" ) . arg ( "-Zremark-dir=profiles" ) . run ( ) ;
15+ llvm_profdata ( )
16+ . merge ( )
17+ . output ( "merged.profdata" )
18+ . input ( "profdata/default_15907418011457399462_0.profraw" )
19+ . run ( ) ;
20+ rustc ( )
21+ . profile_use ( "merged.profdata" )
22+ . opt ( )
23+ . input ( "foo.rs" )
24+ . arg ( "-Cremark=all" )
25+ . arg ( "-Zremark-dir=profiles" )
26+ . run ( ) ;
1727 // Check that PGO hotness is included in the remark files
1828 invalid_utf8_contains ( "profiles/foo.cba44757bc0621b9-cgu.0.opt.opt.yaml" , "Hotness" ) ;
1929}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ // In this test, the function `bar` has #[inline(never)] and the function `foo`
2+ // does not. This test outputs LLVM optimization remarks twice - first for all
3+ // functions (including `bar`, and the `inline` mention), and then for only `foo`
4+ // (should not have the `inline` mention).
5+ // See https://github.com/rust-lang/rust/pull/113040
6+
7+ use run_make_support:: { invalid_utf8_contains, invalid_utf8_not_contains, rustc} ;
8+
9+ fn main ( ) {
10+ rustc ( )
11+ . opt ( )
12+ . input ( "foo.rs" )
13+ . crate_type ( "lib" )
14+ . arg ( "-Cremark=all" )
15+ . arg ( "-Zremark-dir=profiles_all" )
16+ . run ( ) ;
17+ invalid_utf8_contains ( "profiles_all/foo.5be5606e1f6aa79b-cgu.0.opt.opt.yaml" , "inline" ) ;
18+ rustc ( )
19+ . opt ( )
20+ . input ( "foo.rs" )
21+ . crate_type ( "lib" )
22+ . arg ( "-Cremark=foo" )
23+ . arg ( "-Zremark-dir=profiles_foo" )
24+ . run ( ) ;
25+ invalid_utf8_not_contains ( "profiles_foo/foo.5be5606e1f6aa79b-cgu.0.opt.opt.yaml" , "inline" ) ;
26+ }
You can’t perform that action at this time.
0 commit comments