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

Unified Diff: src/IceGlobalContext.cpp

Issue 1867473002: Subzero: Fix -timing-focus . (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 8 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
« src/IceCfg.cpp ('K') | « 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 25e1cc6027d11c20984b3072aded9345504d5113..c495109b24440e094df5632baa083d50a0e99e90 100644
--- a/src/IceGlobalContext.cpp
+++ b/src/IceGlobalContext.cpp
@@ -910,6 +910,12 @@ void GlobalContext::resetTimer(TimerStackIdT StackID) {
Timers->at(StackID).reset();
}
+std::string GlobalContext::getTimerName(TimerStackIdT StackID) {
+ auto Timers = &ICE_TLS_GET_FIELD(TLS)->Timers;
John 2016/04/06 13:05:32 Auto *
Jim Stichnoth 2016/04/06 13:23:58 Done.
+ assert(StackID < Timers->size());
+ return Timers->at(StackID).getName();
+}
+
void GlobalContext::setTimerName(TimerStackIdT StackID,
const std::string &NewName) {
auto Timers = &ICE_TLS_GET_FIELD(TLS)->Timers;
@@ -962,10 +968,6 @@ void GlobalContext::dumpStats(const Cfg *Func) {
}
}
-void GlobalContext::mergeTimersFromTLS() {
- getTimers()->mergeFrom(ICE_TLS_GET_FIELD(TLS)->Timers);
-}
-
void GlobalContext::dumpTimers(TimerStackIdT StackID, bool DumpCumulative) {
if (!BuildDefs::timers())
return;
@@ -975,6 +977,16 @@ void GlobalContext::dumpTimers(TimerStackIdT StackID, bool DumpCumulative) {
Timers->at(StackID).dump(getStrDump(), DumpCumulative);
}
+void GlobalContext::dumpLocalTimers(TimerStackIdT StackID,
+ bool DumpCumulative) {
+ if (!BuildDefs::timers())
+ return;
+ auto Timers = &ICE_TLS_GET_FIELD(TLS)->Timers;
John 2016/04/06 13:05:32 Auto *
Jim Stichnoth 2016/04/06 13:23:58 Done.
+ assert(Timers->size() > StackID);
+ OstreamLocker L(this);
+ Timers->at(StackID).dump(getStrDump(), DumpCumulative);
+}
+
LockedPtr<StringPool>
GlobalStringPoolTraits::getStrings(const GlobalContext *PoolOwner) {
return PoolOwner->getStrings();
« src/IceCfg.cpp ('K') | « src/IceGlobalContext.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698