diff options
author | Chris Lattner <sabre@nondot.org> | 2005-02-09 18:41:32 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-02-09 18:41:32 +0000 |
commit | 610ce2c6783f1381ee4b67b7fef9d6d3d19463be (patch) | |
tree | 1c5b55f1ccccc2946e9e6d7a2e2b5495eb8379ef /llvm/lib/Support/Timer.cpp | |
parent | 159485ff1bd18b13c41153dcc55d709f6a381d07 (diff) | |
download | bcm5719-llvm-610ce2c6783f1381ee4b67b7fef9d6d3d19463be.tar.gz bcm5719-llvm-610ce2c6783f1381ee4b67b7fef9d6d3d19463be.zip |
Don't print a 'Total Execution Time' line for the 'Miscellaneous Ungrouped
Timers' section. Since these are random timers in the program it doesn't
make sense to sum them up.
llvm-svn: 20090
Diffstat (limited to 'llvm/lib/Support/Timer.cpp')
-rw-r--r-- | llvm/lib/Support/Timer.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/llvm/lib/Support/Timer.cpp b/llvm/lib/Support/Timer.cpp index 3713f7f69ca..382825a2a4e 100644 --- a/llvm/lib/Support/Timer.cpp +++ b/llvm/lib/Support/Timer.cpp @@ -302,12 +302,20 @@ void TimerGroup::removeTimer() { *OutStream << "===" << std::string(73, '-') << "===\n" << std::string(Padding, ' ') << Name << "\n" << "===" << std::string(73, '-') - << "===\n Total Execution Time: "; - - printAlignedFP(Total.getProcessTime(), 4, 5, *OutStream); - *OutStream << " seconds ("; - printAlignedFP(Total.getWallTime(), 4, 5, *OutStream); - *OutStream << " wall clock)\n\n"; + << "===\n"; + + // If this is not an collection of ungrouped times, print the total time. + // Ungrouped timers don't really make sense to add up. We still print the + // TOTAL line to make the percentages make sense. + if (this != DefaultTimerGroup) { + *OutStream << " Total Execution Time: "; + + printAlignedFP(Total.getProcessTime(), 4, 5, *OutStream); + *OutStream << " seconds ("; + printAlignedFP(Total.getWallTime(), 4, 5, *OutStream); + *OutStream << " wall clock)\n"; + } + *OutStream << "\n"; if (Total.UserTime) *OutStream << " ---User Time---"; |