[BOLT][NFC] Print timers in perf2bolt invocation
When BOLT is run in AggregateOnly mode (perf2bolt), it exits with code zero so destructors are not run thus TimerGroup never prints the timers. Add explicit printing just before the exit to honor options requesting timers (`--time-rewrite`, `--time-aggr`). Test Plan: updated bolt/test/timers.c Reviewers: ayermolo, maksfb, rafaelauler, dcci Reviewed By: dcci Pull Request: https://github.com/llvm/llvm-project/pull/101270
This commit is contained in:
@@ -3200,6 +3200,7 @@ void RewriteInstance::processProfileData() {
|
||||
if (opts::AggregateOnly) {
|
||||
PrintProgramStats PPS(&*BAT);
|
||||
BC->logBOLTErrorsAndQuitOnFatal(PPS.runOnFunctions(*BC));
|
||||
TimerGroup::printAll(outs());
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user