Rollup merge of #142784 - Kobzol:timings-codegen, r=nnethercote
Add codegen timing section And since we now start and end the sections also using separate functions, also add some light checking if we're generating the sections correctly. I'm integrating `--timings` into Cargo, and I realized that the codegen timings would be quite useful for that. Frontend can be computed simply as `[start of compilation, start of codegen]` for now. r? `@nnethercote`
This commit is contained in:
@@ -129,6 +129,7 @@ impl Emitter for JsonEmitter {
|
||||
};
|
||||
let name = match record.section {
|
||||
TimingSection::Linking => "link",
|
||||
TimingSection::Codegen => "codegen",
|
||||
};
|
||||
let data = SectionTimestamp { name, event, timestamp: record.timestamp };
|
||||
let result = self.emit(EmitTyped::SectionTiming(data));
|
||||
|
||||
Reference in New Issue
Block a user