| Index: src/IceGlobalContext.h
|
| diff --git a/src/IceGlobalContext.h b/src/IceGlobalContext.h
|
| index 8854f690f64ccef0d19d240bfa7dc7ad087ed8c4..d2d11829bab69e34ded3b1098992b3a845963cd9 100644
|
| --- a/src/IceGlobalContext.h
|
| +++ b/src/IceGlobalContext.h
|
| @@ -115,7 +115,7 @@ class GlobalContext {
|
| // timers, in the same order, with the same names, but initially
|
| // empty of timing data.
|
| void initInto(TimerList &Dest) const {
|
| - if (!ALLOW_DUMP)
|
| + if (!buildAllowsDump())
|
| return;
|
| Dest.clear();
|
| for (const TimerStack &Stack : *this) {
|
| @@ -123,7 +123,7 @@ class GlobalContext {
|
| }
|
| }
|
| void mergeFrom(TimerList &Src) {
|
| - if (!ALLOW_DUMP)
|
| + if (!buildAllowsDump())
|
| return;
|
| assert(size() == Src.size());
|
| size_type i = 0;
|
| @@ -243,7 +243,7 @@ public:
|
|
|
| // Reset stats at the beginning of a function.
|
| void resetStats() {
|
| - if (ALLOW_DUMP)
|
| + if (buildAllowsDump())
|
| ICE_TLS_GET_FIELD(TLS)->StatsFunction.reset();
|
| }
|
| void dumpStats(const IceString &Name, bool Final = false);
|
| @@ -380,12 +380,12 @@ public:
|
| }
|
| EmitterThreads.clear();
|
|
|
| - if (ALLOW_DUMP) {
|
| + if (buildAllowsDump()) {
|
| auto Timers = getTimers();
|
| for (ThreadContext *TLS : AllThreadContexts)
|
| Timers->mergeFrom(TLS->Timers);
|
| }
|
| - if (ALLOW_DUMP) {
|
| + if (buildAllowsDump()) {
|
| // Do a separate loop over AllThreadContexts to avoid holding
|
| // two locks at once.
|
| auto Stats = getStatsCumulative();
|
| @@ -560,19 +560,19 @@ public:
|
| TimerMarker(TimerIdT ID, GlobalContext *Ctx,
|
| TimerStackIdT StackID = GlobalContext::TSK_Default)
|
| : ID(ID), Ctx(Ctx), StackID(StackID) {
|
| - if (ALLOW_DUMP)
|
| + if (buildAllowsDump())
|
| push();
|
| }
|
| TimerMarker(TimerIdT ID, const Cfg *Func,
|
| TimerStackIdT StackID = GlobalContext::TSK_Default)
|
| : ID(ID), Ctx(nullptr), StackID(StackID) {
|
| // Ctx gets set at the beginning of pushCfg().
|
| - if (ALLOW_DUMP)
|
| + if (buildAllowsDump())
|
| pushCfg(Func);
|
| }
|
|
|
| ~TimerMarker() {
|
| - if (ALLOW_DUMP && Active)
|
| + if (buildAllowsDump() && Active)
|
| Ctx->popTimer(ID, StackID);
|
| }
|
|
|
|
|