summaryrefslogtreecommitdiff
path: root/indra/llcommon/lltraceaccumulators.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcommon/lltraceaccumulators.h')
-rw-r--r--indra/llcommon/lltraceaccumulators.h37
1 files changed, 25 insertions, 12 deletions
diff --git a/indra/llcommon/lltraceaccumulators.h b/indra/llcommon/lltraceaccumulators.h
index 7994dcc217..825cc9e3a8 100644
--- a/indra/llcommon/lltraceaccumulators.h
+++ b/indra/llcommon/lltraceaccumulators.h
@@ -109,12 +109,12 @@ namespace LLTrace
}
}
- void flush(LLUnitImplicit<F64, LLUnits::Seconds> time_stamp)
+ void sync(LLUnitImplicit<F64, LLUnits::Seconds> time_stamp)
{
llassert(mStorageSize >= sNextStorageSlot);
for (size_t i = 0; i < sNextStorageSlot; i++)
{
- mStorage[i].flush(time_stamp);
+ mStorage[i].sync(time_stamp);
}
}
@@ -128,6 +128,11 @@ namespace LLTrace
return LLThreadLocalSingletonPointer<ACCUMULATOR>::getInstance() == mStorage;
}
+ static void clearPrimary()
+ {
+ LLThreadLocalSingletonPointer<ACCUMULATOR>::setInstance(NULL);
+ }
+
LL_FORCE_INLINE static ACCUMULATOR* getPrimaryStorage()
{
ACCUMULATOR* accumulator = LLThreadLocalSingletonPointer<ACCUMULATOR>::getInstance();
@@ -302,7 +307,7 @@ namespace LLTrace
mLastValue = other ? other->mLastValue : 0;
}
- void flush(LLUnitImplicit<F64, LLUnits::Seconds>) {}
+ void sync(LLUnitImplicit<F64, LLUnits::Seconds>) {}
F64 getSum() const { return mSum; }
F64 getMin() const { return mMin; }
@@ -434,7 +439,7 @@ namespace LLTrace
mHasValue = other ? other->mHasValue : false;
}
- void flush(LLUnitImplicit<F64, LLUnits::Seconds> time_stamp)
+ void sync(LLUnitImplicit<F64, LLUnits::Seconds> time_stamp)
{
LLUnitImplicit<F64, LLUnits::Seconds> delta_time = time_stamp - mLastSampleTimeStamp;
@@ -500,7 +505,7 @@ namespace LLTrace
mSum = 0;
}
- void flush(LLUnitImplicit<F64, LLUnits::Seconds>) {}
+ void sync(LLUnitImplicit<F64, LLUnits::Seconds>) {}
F64 getSum() const { return mSum; }
@@ -535,7 +540,7 @@ namespace LLTrace
TimeBlockAccumulator();
void addSamples(const self_t& other, bool /*append*/);
void reset(const self_t* other);
- void flush(LLUnitImplicit<F64, LLUnits::Seconds>) {}
+ void sync(LLUnitImplicit<F64, LLUnits::Seconds>) {}
//
// members
@@ -566,6 +571,13 @@ namespace LLTrace
bool mCollapsed;
bool mNeedsSorting;
};
+
+ struct BlockTimerStackRecord
+ {
+ class BlockTimer* mActiveTimer;
+ class TimeBlock* mTimeBlock;
+ U64 mChildTime;
+ };
struct MemStatAccumulator
{
@@ -611,16 +623,16 @@ namespace LLTrace
mDeallocatedCount = 0;
}
- void flush(LLUnitImplicit<F64, LLUnits::Seconds> time_stamp)
+ void sync(LLUnitImplicit<F64, LLUnits::Seconds> time_stamp)
{
- mSize.flush(time_stamp);
- mChildSize.flush(time_stamp);
+ mSize.sync(time_stamp);
+ mChildSize.sync(time_stamp);
}
SampleAccumulator mSize,
- mChildSize;
+ mChildSize;
int mAllocatedCount,
- mDeallocatedCount;
+ mDeallocatedCount;
};
struct AccumulatorBufferGroup : public LLRefCount
@@ -630,11 +642,12 @@ namespace LLTrace
void handOffTo(AccumulatorBufferGroup& other);
void makePrimary();
bool isPrimary() const;
+ static void clearPrimary();
void append(const AccumulatorBufferGroup& other);
void merge(const AccumulatorBufferGroup& other);
void reset(AccumulatorBufferGroup* other = NULL);
- void flush();
+ void sync();
AccumulatorBuffer<CountAccumulator> mCounts;
AccumulatorBuffer<SampleAccumulator> mSamples;