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.h30
1 files changed, 12 insertions, 18 deletions
diff --git a/indra/llcommon/lltraceaccumulators.h b/indra/llcommon/lltraceaccumulators.h
index 02af480b8a..c5a0693fef 100644
--- a/indra/llcommon/lltraceaccumulators.h
+++ b/indra/llcommon/lltraceaccumulators.h
@@ -75,7 +75,7 @@ namespace LLTrace
~AccumulatorBuffer()
{
- if (isPrimary())
+ if (isCurrent())
{
LLThreadLocalSingletonPointer<ACCUMULATOR>::setInstance(NULL);
}
@@ -128,27 +128,21 @@ namespace LLTrace
}
}
- void makePrimary()
+ void makeCurrent()
{
LLThreadLocalSingletonPointer<ACCUMULATOR>::setInstance(mStorage);
}
- bool isPrimary() const
+ bool isCurrent() const
{
return LLThreadLocalSingletonPointer<ACCUMULATOR>::getInstance() == mStorage;
}
- static void clearPrimary()
+ static void clearCurrent()
{
LLThreadLocalSingletonPointer<ACCUMULATOR>::setInstance(NULL);
}
- LL_FORCE_INLINE static ACCUMULATOR* getPrimaryStorage()
- {
- ACCUMULATOR* accumulator = LLThreadLocalSingletonPointer<ACCUMULATOR>::getInstance();
- return accumulator ? accumulator : getDefaultBuffer()->mStorage;
- }
-
// NOTE: this is not thread-safe. We assume that slots are reserved in the main thread before any child threads are spawned
size_t reserveSlot()
{
@@ -491,7 +485,7 @@ namespace LLTrace
typedef U32 value_t;
};
- struct ChildMemFacet
+ struct ShadowMemFacet
{
typedef F64Bytes value_t;
};
@@ -504,7 +498,7 @@ namespace LLTrace
void addSamples(const MemStatAccumulator& other, EBufferAppendType append_type)
{
mSize.addSamples(other.mSize, append_type);
- mChildSize.addSamples(other.mChildSize, append_type);
+ mShadowSize.addSamples(other.mShadowSize, append_type);
mAllocatedCount += other.mAllocatedCount;
mDeallocatedCount += other.mDeallocatedCount;
}
@@ -512,7 +506,7 @@ namespace LLTrace
void reset(const MemStatAccumulator* other)
{
mSize.reset(other ? &other->mSize : NULL);
- mChildSize.reset(other ? &other->mChildSize : NULL);
+ mShadowSize.reset(other ? &other->mShadowSize : NULL);
mAllocatedCount = 0;
mDeallocatedCount = 0;
}
@@ -520,11 +514,11 @@ namespace LLTrace
void sync(F64SecondsImplicit time_stamp)
{
mSize.sync(time_stamp);
- mChildSize.sync(time_stamp);
+ mShadowSize.sync(time_stamp);
}
SampleAccumulator mSize,
- mChildSize;
+ mShadowSize;
int mAllocatedCount,
mDeallocatedCount;
};
@@ -534,9 +528,9 @@ namespace LLTrace
AccumulatorBufferGroup();
void handOffTo(AccumulatorBufferGroup& other);
- void makePrimary();
- bool isPrimary() const;
- static void clearPrimary();
+ void makeCurrent();
+ bool isCurrent() const;
+ static void clearCurrent();
void append(const AccumulatorBufferGroup& other);
void merge(const AccumulatorBufferGroup& other);