Chromium Code Reviews| 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(); |