@@ -240,7 +240,6 @@ async fn download_and_analyze_self_profile(
240
240
/// backend, linker) from the self-profile queries.
241
241
fn compute_compilation_sections ( profile : & ProfilingData ) -> Vec < CompilationSection > {
242
242
let mut first_event_start = None ;
243
- let mut frontend_end = None ;
244
243
let mut backend_start = None ;
245
244
let mut backend_end = None ;
246
245
let mut linker_duration = None ;
@@ -250,10 +249,7 @@ fn compute_compilation_sections(profile: &ProfilingData) -> Vec<CompilationSecti
250
249
first_event_start = event. payload . timestamp ( ) . map ( |t| t. start ( ) ) ;
251
250
}
252
251
253
- if event. label == "analysis" {
254
- // End of "analysis" => end of frontend
255
- frontend_end = event. payload . timestamp ( ) . map ( |t| t. end ( ) ) ;
256
- } else if event. label == "codegen_crate" {
252
+ if event. label == "codegen_crate" {
257
253
// Start of "codegen_crate" => start of backend
258
254
backend_start = event. payload . timestamp ( ) . map ( |t| t. start ( ) ) ;
259
255
} else if event. label == "finish_ongoing_codegen" {
@@ -266,7 +262,9 @@ fn compute_compilation_sections(profile: &ProfilingData) -> Vec<CompilationSecti
266
262
}
267
263
}
268
264
let mut sections = vec ! [ ] ;
269
- if let ( Some ( start) , Some ( end) ) = ( first_event_start, frontend_end) {
265
+ // We consider "frontend" to be everything from the start of the compilation (the first event)
266
+ // to the start of the backend part.
267
+ if let ( Some ( start) , Some ( end) ) = ( first_event_start, backend_start) {
270
268
if let Ok ( duration) = end. duration_since ( start) {
271
269
sections. push ( CompilationSection {
272
270
name : "Frontend" . to_string ( ) ,
0 commit comments