Skip to content

Commit

Permalink
Rename directive needs-profiler-support to needs-profiler-runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
Zalathar authored and liwagu committed Oct 10, 2024
1 parent af33462 commit e7b09a1
Show file tree
Hide file tree
Showing 16 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/tools/compiletest/src/command-list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
"needs-git-hash",
"needs-llvm-components",
"needs-llvm-zstd",
"needs-profiler-support",
"needs-profiler-runtime",
"needs-relocation-model-pic",
"needs-run-enabled",
"needs-rust-lld",
Expand Down
2 changes: 1 addition & 1 deletion src/tools/compiletest/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ pub struct Config {
pub git_merge_commit_email: String,

/// True if the profiler runtime is enabled for this target.
/// Used by the "needs-profiler-support" header in test files.
/// Used by the "needs-profiler-runtime" directive in test files.
pub profiler_support: bool,
}

Expand Down
2 changes: 1 addition & 1 deletion src/tools/compiletest/src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,7 @@ fn iter_header(
// FIXME(jieyouxu): I feel like there's a better way to do this, leaving for later.
if mode == Mode::CoverageRun {
let extra_directives: &[&str] = &[
"needs-profiler-support",
"needs-profiler-runtime",
// FIXME(pietroalbini): this test currently does not work on cross-compiled targets
// because remote-test is not capable of sending back the *.profraw files generated by
// the LLVM instrumentation.
Expand Down
4 changes: 2 additions & 2 deletions src/tools/compiletest/src/header/needs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ pub(super) fn handle_needs(
ignore_reason: "ignored on targets without unwinding support",
},
Need {
name: "needs-profiler-support",
name: "needs-profiler-runtime",
condition: cache.profiler_support,
ignore_reason: "ignored when profiler support is disabled",
ignore_reason: "ignored when the profiler runtime is not available",
},
Need {
name: "needs-force-clang-based-tests",
Expand Down
4 changes: 2 additions & 2 deletions src/tools/compiletest/src/header/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -370,10 +370,10 @@ fn sanitizers() {
#[test]
fn profiler_support() {
let config: Config = cfg().profiler_support(false).build();
assert!(check_ignore(&config, "//@ needs-profiler-support"));
assert!(check_ignore(&config, "//@ needs-profiler-runtime"));

let config: Config = cfg().profiler_support(true).build();
assert!(!check_ignore(&config, "//@ needs-profiler-support"));
assert!(!check_ignore(&config, "//@ needs-profiler-runtime"));
}

#[test]
Expand Down
2 changes: 1 addition & 1 deletion tests/run-make/cross-lang-lto-pgo-smoketest-clang/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// RUSTBUILD_FORCE_CLANG_BASED_TESTS and only runs tests which contain "clang" in their
// name.

//@ needs-profiler-support
//@ needs-profiler-runtime
// FIXME(Oneirical): Except that due to the reliance on llvm-profdata, this test
// never runs, because `x86_64-gnu-debug` does not have the `profiler_builtins` crate.

Expand Down
2 changes: 1 addition & 1 deletion tests/run-make/optimization-remarks-dir-pgo/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// the output remark files.
// See https://github.com/rust-lang/rust/pull/114439

//@ needs-profiler-support
//@ needs-profiler-runtime
//@ ignore-cross-compile

use run_make_support::{
Expand Down
2 changes: 1 addition & 1 deletion tests/run-make/pgo-branch-weights/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// If the test passes, the expected function call count was added to the use-phase LLVM-IR.
// See https://github.com/rust-lang/rust/pull/66631

//@ needs-profiler-support
//@ needs-profiler-runtime
//@ ignore-cross-compile

use std::path::Path;
Expand Down
2 changes: 1 addition & 1 deletion tests/run-make/pgo-gen-lto/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// should be generated.
// See https://github.com/rust-lang/rust/pull/48346

//@ needs-profiler-support
//@ needs-profiler-runtime
// Reason: this exercises LTO profiling
//@ ignore-cross-compile
// Reason: the compiled binary is executed
Expand Down
2 changes: 1 addition & 1 deletion tests/run-make/pgo-gen/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// optimizes code. This test checks that these files are generated.
// See https://github.com/rust-lang/rust/pull/48346

//@ needs-profiler-support
//@ needs-profiler-runtime
//@ ignore-cross-compile

use run_make_support::{cwd, has_extension, has_prefix, run, rustc, shallow_find_files};
Expand Down
2 changes: 1 addition & 1 deletion tests/run-make/pgo-indirect-call-promotion/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// whether it can make a direct call instead of the indirect call.
// See https://github.com/rust-lang/rust/pull/66631

//@ needs-profiler-support
//@ needs-profiler-runtime
// Reason: llvm_profdata is used
//@ ignore-cross-compile
// Reason: the compiled binary is executed
Expand Down
2 changes: 1 addition & 1 deletion tests/run-make/pgo-use/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// be marked as cold.
// See https://github.com/rust-lang/rust/pull/60262

//@ needs-profiler-support
//@ needs-profiler-runtime
//@ ignore-cross-compile

use run_make_support::{
Expand Down
2 changes: 1 addition & 1 deletion tests/run-make/profile/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// See https://github.com/rust-lang/rust/pull/42433

//@ ignore-cross-compile
//@ needs-profiler-support
//@ needs-profiler-runtime

use run_make_support::{path, run, rustc};

Expand Down
2 changes: 1 addition & 1 deletion tests/run-make/track-pgo-dep-info/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

//@ ignore-cross-compile
// Reason: the binary is executed
//@ needs-profiler-support
//@ needs-profiler-runtime

use run_make_support::{llvm_profdata, rfs, run, rustc};

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/coverage-attr/bad-attr-ice.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![cfg_attr(feat, feature(coverage_attribute))]
//@ revisions: feat nofeat
//@ compile-flags: -Cinstrument-coverage
//@ needs-profiler-support
//@ needs-profiler-runtime

// Malformed `#[coverage(..)]` attributes should not cause an ICE when built
// with `-Cinstrument-coverage`.
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/issues/issue-85461.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ compile-flags: -Cinstrument-coverage -Ccodegen-units=4 --crate-type dylib -Copt-level=0
//@ build-pass
//@ needs-profiler-support
//@ needs-profiler-runtime
//@ needs-dynamic-linking

// Regression test for #85461 where MSVC sometimes fails to link instrument-coverage binaries
Expand Down

0 comments on commit e7b09a1

Please sign in to comment.