Skip to content

Commit 37e652f

Browse files
committed
Remove accidental changes
1 parent 41e6946 commit 37e652f

File tree

4 files changed

+10
-36
lines changed

4 files changed

+10
-36
lines changed

Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ name = "miri"
1717
test = false # we have no unit tests
1818
doctest = false # and no doc tests
1919

20-
[profile.bench]
21-
debug = true
22-
2320
[dependencies]
2421
getrandom = { version = "0.3", features = ["std"] }
2522
rand = "0.9"

miri-script/src/commands.rs

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ impl Command {
112112
Command::Check { features, flags } => Self::check(features, flags),
113113
Command::Test { bless, target, coverage, features, flags } =>
114114
Self::test(bless, target, coverage, features, flags),
115-
Command::Run { dep, verbose, target, edition, features, flags, flamegraph } =>
116-
Self::run(dep, verbose, target, edition, features, flags, flamegraph),
115+
Command::Run { dep, verbose, target, edition, features, flags } =>
116+
Self::run(dep, verbose, target, edition, features, flags),
117117
Command::Doc { features, flags } => Self::doc(features, flags),
118118
Command::Fmt { flags } => Self::fmt(flags),
119119
Command::Clippy { features, flags } => Self::clippy(features, flags),
@@ -463,7 +463,6 @@ impl Command {
463463
edition: Option<String>,
464464
features: Vec<String>,
465465
flags: Vec<String>,
466-
flamegraph: bool,
467466
) -> Result<()> {
468467
let mut e = MiriEnv::new()?;
469468

@@ -499,18 +498,11 @@ impl Command {
499498
// The basic command that executes the Miri driver.
500499
let mut cmd = if dep {
501500
// We invoke the test suite as that has all the logic for running with dependencies.
502-
let cmd = e
503-
.cargo_cmd(".", "test", &features)
501+
e.cargo_cmd(".", "test", &features)
504502
.args(&["--test", "ui"])
505503
.args(quiet_flag)
506-
.arg("--");
507-
if flamegraph {
508-
cmd.args(&["--miri-run-dep-mode-flamegraph"])
509-
} else {
510-
cmd.args(&["--miri-run-dep-mode"])
511-
}
512-
} else if flamegraph {
513-
cmd!(e.sh, "flamegraph -- {miri_bin}")
504+
.arg("--")
505+
.args(&["--miri-run-dep-mode"])
514506
} else {
515507
cmd!(e.sh, "{miri_bin}")
516508
};

miri-script/src/main.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,6 @@ pub enum Command {
9696
/// The flags set in `MIRIFLAGS` are added in front of these flags.
9797
#[arg(trailing_var_arg = true, allow_hyphen_values = true)]
9898
flags: Vec<String>,
99-
/// Run with flamegraph (requires cargo-flamegraph to be installed)
100-
#[arg(long)]
101-
flamegraph: bool,
10299
},
103100
/// Build documentation.
104101
Doc {

tests/ui.rs

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -322,12 +322,10 @@ fn main() -> Result<()> {
322322
let mut args = std::env::args_os();
323323

324324
// Skip the program name and check whether this is a `./miri run-dep` invocation
325-
if let Some(first) = args.nth(1) {
326-
if first == "--miri-run-dep-mode" {
327-
return run_dep_mode(target, args, /* flamegraph */ false);
328-
} else if first == "--miri-run-dep-mode-flamegraph" {
329-
return run_dep_mode(target, args, /* flamegraph */ true);
330-
}
325+
if let Some(first) = args.nth(1)
326+
&& first == "--miri-run-dep-mode"
327+
{
328+
return run_dep_mode(target, args);
331329
}
332330

333331
ui(Mode::Pass, "tests/pass", &target, WithoutDependencies, tmpdir.path())?;
@@ -357,11 +355,7 @@ fn main() -> Result<()> {
357355
Ok(())
358356
}
359357

360-
fn run_dep_mode(
361-
target: String,
362-
args: impl Iterator<Item = OsString>,
363-
flamegraph: bool,
364-
) -> Result<()> {
358+
fn run_dep_mode(target: String, args: impl Iterator<Item = OsString>) -> Result<()> {
365359
let mut config =
366360
miri_config(&target, "", Mode::RunDep, Some(WithDependencies { bless: false }));
367361
config.comment_defaults.base().custom.remove("edition"); // `./miri` adds an `--edition` in `args`, so don't set it twice
@@ -376,11 +370,5 @@ fn run_dep_mode(
376370
// Build dependencies
377371
test_config.apply_custom(&mut cmd, &build_manager).unwrap();
378372

379-
if flamegraph {
380-
let mut flamegraph_cmd = Command::new("flamegraph");
381-
flamegraph_cmd.arg("--").arg(cmd.get_program()).args(cmd.get_args());
382-
cmd = flamegraph_cmd;
383-
}
384-
385373
if cmd.spawn()?.wait()?.success() { Ok(()) } else { std::process::exit(1) }
386374
}

0 commit comments

Comments
 (0)