Skip to content

Commit f9a8177

Browse files
committed
[Comgr] Shorten profile output
Less extra text in the profile output improves readibility, especially when pasting into other documents which may not preserve tabs Change-Id: I34de5647695258fd2305d39786a4d8f0e70e2175
1 parent 8653b74 commit f9a8177

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

amd/comgr/src/time-stat/time-stat.h

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ class PerfStats {
3131
LogF(new (std::nothrow)
3232
llvm::raw_fd_ostream(LogFile, EC, llvm::sys::fs::OF_Text),
3333
[](llvm::raw_fd_ostream *fp) {
34-
*fp << "Closing log...\n";
3534
fp->close();
3635
});
3736
if (EC) {
@@ -58,12 +57,9 @@ class PerfStats {
5857

5958
void dumpPerfStats() {
6059
for (const auto &Item : ProfileDataMap) {
61-
*pLog << "Profile Point "
62-
<< llvm::format("%-50s", Item.getKey().str().c_str())
63-
<< " was invoked " << llvm::format("%6d", Item.getValue().Counter)
64-
<< " times and took "
65-
<< llvm::format("%10.4f", Item.getValue().TimeTaken)
66-
<< " milliseconds overall\n";
60+
*pLog << llvm::format("%-50s", Item.getKey().str().c_str())
61+
<< llvm::format("%6d", Item.getValue().Counter) << " calls"
62+
<< llvm::format("%10.4f", Item.getValue().TimeTaken) << " ms\n";
6763
}
6864
}
6965
};

0 commit comments

Comments
 (0)