Skip to content

Commit 29cfa38

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 4fed049 commit 29cfa38

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
@@ -32,7 +32,6 @@ class PerfStats {
3232
LogF(new (std::nothrow)
3333
llvm::raw_fd_ostream(LogFile, EC, llvm::sys::fs::OF_Text),
3434
[](llvm::raw_fd_ostream *fp) {
35-
*fp << "Closing log...\n";
3635
fp->close();
3736
});
3837
if (EC) {
@@ -59,12 +58,9 @@ class PerfStats {
5958

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

0 commit comments

Comments
 (0)