Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1167)

Unified Diff: src/IceGlobalContext.cpp

Issue 887213002: Subzero: Fix stats collection and output for multithreading. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Use std::array Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceGlobalContext.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceGlobalContext.cpp
diff --git a/src/IceGlobalContext.cpp b/src/IceGlobalContext.cpp
index ca7097a01cd09edcda305454e6a850c0cfbd8015..8805cea111ec69b3760ac52ffe6ce8009a744686 100644
--- a/src/IceGlobalContext.cpp
+++ b/src/IceGlobalContext.cpp
@@ -111,12 +111,12 @@ public:
void GlobalContext::CodeStats::dump(const IceString &Name, Ostream &Str) {
if (!ALLOW_DUMP)
return;
- Str << "|" << Name << "|Inst Count |" << InstructionsEmitted << "\n";
- Str << "|" << Name << "|Regs Saved |" << RegistersSaved << "\n";
- Str << "|" << Name << "|Frame Bytes |" << FrameBytes << "\n";
- Str << "|" << Name << "|Spills |" << Spills << "\n";
- Str << "|" << Name << "|Fills |" << Fills << "\n";
- Str << "|" << Name << "|Spills+Fills|" << Spills + Fills << "\n";
+#define X(str, tag) \
+ Str << "|" << Name << "|" str "|" << Stats[CS_##tag] << "\n";
+ CODESTATS_TABLE
+#undef X
+ Str << "|" << Name << "|Spills+Fills|"
+ << Stats[CS_NumSpills] + Stats[CS_NumFills] << "\n";
Str << "|" << Name << "|Memory Usage|";
if (ssize_t MemUsed = llvm::TimeRecord::getCurrentTime(false).getMemUsed())
Str << MemUsed;
@@ -543,7 +543,6 @@ void GlobalContext::dumpStats(const IceString &Name, bool Final) {
getStatsCumulative()->dump(Name, getStrDump());
} else {
ICE_TLS_GET_FIELD(TLS)->StatsFunction.dump(Name, getStrDump());
- getStatsCumulative()->dump("_TOTAL_", getStrDump());
}
}
« no previous file with comments | « src/IceGlobalContext.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698