File tree Expand file tree Collapse file tree 4 files changed +16
-10
lines changed Expand file tree Collapse file tree 4 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,8 @@ <h4>Artifact Size</h4>
80
80
</ tbody >
81
81
</ table >
82
82
< p > 'Instructions (%)' is the percentage of instructions executed on this query.</ p >
83
+ < p > < b > Note: self-profile measurements have been < a href ="https://github.com/rust-lang/rustc-perf/pull/1647 "> recently switched</ a >
84
+ from wall-time to HW counters (instruction count). If comparing with an older artifact, the timings might not be directly comparable.</ b > </ p >
83
85
< p > Executions do not include cached executions.</ p >
84
86
< table >
85
87
< thead >
Original file line number Diff line number Diff line change @@ -471,19 +471,23 @@ pub mod self_profile {
471
471
pub artifact_sizes : Option < Vec < ArtifactSize > > ,
472
472
}
473
473
474
+ // Due to backwards compatibility, self profile event timing data is represented as durations,
475
+ // however since https://github.com/rust-lang/rustc-perf/pull/1647 it actually represents
476
+ // HW counter data (instruction counts).
474
477
#[ derive( Serialize , Deserialize , Clone , Debug ) ]
475
478
pub struct QueryData {
476
479
pub label : QueryLabel ,
477
- // Nanoseconds
480
+ // Instruction count
478
481
pub time : u64 ,
482
+ // Instruction count
479
483
pub self_time : u64 ,
480
484
pub percent_total_time : f32 ,
481
485
pub number_of_cache_misses : u32 ,
482
486
pub number_of_cache_hits : u32 ,
483
487
pub invocation_count : u32 ,
484
- // Nanoseconds
488
+ // Instruction count
485
489
pub blocked_time : u64 ,
486
- // Nanoseconds
490
+ // Instruction count
487
491
pub incremental_load_time : u64 ,
488
492
}
489
493
Original file line number Diff line number Diff line change @@ -541,17 +541,17 @@ pub async fn handle_self_profile(
541
541
}
542
542
let commits = Arc :: new ( commits) ;
543
543
544
- let mut cpu_responses = ctxt. statistic_series ( query, commits. clone ( ) ) . await ?;
545
- assert_eq ! ( cpu_responses . len( ) , 1 , "all selectors are exact" ) ;
546
- let mut cpu_response = cpu_responses . remove ( 0 ) . series ;
544
+ let mut instructions_responses = ctxt. statistic_series ( query, commits. clone ( ) ) . await ?;
545
+ assert_eq ! ( instructions_responses . len( ) , 1 , "all selectors are exact" ) ;
546
+ let mut instructions_response = instructions_responses . remove ( 0 ) . series ;
547
547
548
548
let mut self_profile = get_or_download_self_profile (
549
549
ctxt,
550
550
commits. first ( ) . unwrap ( ) . clone ( ) ,
551
551
bench_name,
552
552
profile,
553
553
scenario,
554
- cpu_response . next ( ) . unwrap ( ) . 1 ,
554
+ instructions_response . next ( ) . unwrap ( ) . 1 ,
555
555
)
556
556
. await ?;
557
557
let base_self_profile = match commits. get ( 1 ) {
@@ -562,7 +562,7 @@ pub async fn handle_self_profile(
562
562
bench_name,
563
563
profile,
564
564
scenario,
565
- cpu_response . next ( ) . unwrap ( ) . 1 ,
565
+ instructions_response . next ( ) . unwrap ( ) . 1 ,
566
566
)
567
567
. await ?,
568
568
) ,
Original file line number Diff line number Diff line change @@ -318,7 +318,7 @@ pub(crate) async fn get_or_download_self_profile(
318
318
}
319
319
320
320
fn get_self_profile_data (
321
- cpu_clock : Option < f64 > ,
321
+ total_instructions : Option < f64 > ,
322
322
profile : & analyzeme:: AnalysisResults ,
323
323
) -> ServerResult < self_profile:: SelfProfile > {
324
324
let total_self_time: Duration = profile. query_data . iter ( ) . map ( |qd| qd. self_time ) . sum ( ) ;
@@ -345,7 +345,7 @@ fn get_self_profile_data(
345
345
time : profile. total_time . as_nanos ( ) as u64 ,
346
346
self_time : total_self_time. as_nanos ( ) as u64 ,
347
347
// TODO: check against wall-time from perf stats
348
- percent_total_time : cpu_clock
348
+ percent_total_time : total_instructions
349
349
. map ( |w| ( ( total_self_time. as_secs_f64 ( ) / w) * 100.0 ) as f32 )
350
350
// sentinel "we couldn't compute this time"
351
351
. unwrap_or ( -100.0 ) ,
You can’t perform that action at this time.
0 commit comments