Skip to content

Commit 2964d24

Browse files
committed
Switch self profile to use HW counters instead of walltime
1 parent 073221b commit 2964d24

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

collector/src/bin/rustc-fake.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ fn main() {
119119
let prof_out_dir = create_self_profile_dir();
120120
if wrapper == "PerfStatSelfProfile" {
121121
cmd.arg(format!("-Zself-profile={}", prof_out_dir.to_str().unwrap()));
122+
cmd.arg("-Zself-profile-counter=instructions:u");
122123
let _ = fs::remove_dir_all(&prof_out_dir);
123124
let _ = fs::create_dir_all(&prof_out_dir);
124125
}

site/src/request_handlers/self_profile.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ pub async fn handle_self_profile(
460460
.benchmark(selector::Selector::One(bench_name.to_string()))
461461
.profile(selector::Selector::One(profile.parse().unwrap()))
462462
.scenario(selector::Selector::One(scenario))
463-
.metric(selector::Selector::One(Metric::CpuClock));
463+
.metric(selector::Selector::One(Metric::InstructionsUser));
464464

465465
// Helper for finding an `ArtifactId` based on a commit sha
466466
let find_aid = |commit: &str| {

0 commit comments

Comments
 (0)