aggregate_sections

Function aggregate_sections 

Source
pub fn aggregate_sections(
    sections: IndexMap<String, CompilationSection>,
    end: f64,
    rmeta_time: Option<f64>,
) -> Option<Vec<(SectionName, SectionData)>>
Expand description

Aggregates section timing information from individual compilation sections.

We can have a bunch of situations here.

  • -Zsection-timings is enabled, and we received some custom sections, in which case we use them to determine the headers.
  • We have at least one rmeta time, so we hard-code Frontend and Codegen headers.
  • We only have total durations, so we don’t add any additional headers.