From cda2cdda511eb2f7a58e284db2c852fd4a3808ae Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 3 Jan 2013 00:30:54 -0800 Subject: SH-3406 WIP convert fast timers to lltrace system made fast timer stack thread local added LLThreadLocalSingleton made LLThreadLocalPointer obey pointer rules for const added LLThreadLocalSingletonPointer for fast thread local pointers --- indra/llmessage/llbuffer.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llmessage/llbuffer.cpp') diff --git a/indra/llmessage/llbuffer.cpp b/indra/llmessage/llbuffer.cpp index 01da20f060..1722b48f44 100644 --- a/indra/llmessage/llbuffer.cpp +++ b/indra/llmessage/llbuffer.cpp @@ -32,6 +32,7 @@ #include "llmath.h" #include "llstl.h" #include "llthread.h" +#include #define ASSERT_LLBUFFERARRAY_MUTEX_LOCKED llassert(!mMutexp || mMutexp->isSelfLocked()); -- cgit v1.2.3 From d122318bef2ff0eced7641dc24f411f792bd2935 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 8 Jul 2013 00:55:17 -0700 Subject: SH-4299 WIP: Interesting: High fps shown temporarily off scale in statistics console added percentage/ratio units added auto-range and auto tick calculation to stat bar to automate display stats --- indra/llmessage/llbuffer.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'indra/llmessage/llbuffer.cpp') diff --git a/indra/llmessage/llbuffer.cpp b/indra/llmessage/llbuffer.cpp index 1722b48f44..f7f81e74bd 100755 --- a/indra/llmessage/llbuffer.cpp +++ b/indra/llmessage/llbuffer.cpp @@ -34,7 +34,7 @@ #include "llthread.h" #include -#define ASSERT_LLBUFFERARRAY_MUTEX_LOCKED llassert(!mMutexp || mMutexp->isSelfLocked()); +#define ASSERT_LLBUFFERARRAY_MUTEX_LOCKED() llassert(!mMutexp || mMutexp->isSelfLocked()) /** * LLSegment @@ -287,7 +287,7 @@ LLChannelDescriptors LLBufferArray::nextChannel() //mMutexp should be locked before calling this. S32 LLBufferArray::capacity() const { - ASSERT_LLBUFFERARRAY_MUTEX_LOCKED + ASSERT_LLBUFFERARRAY_MUTEX_LOCKED(); S32 total = 0; const_buffer_iterator_t iter = mBuffers.begin(); @@ -315,7 +315,7 @@ bool LLBufferArray::append(S32 channel, const U8* src, S32 len) //mMutexp should be locked before calling this. bool LLBufferArray::prepend(S32 channel, const U8* src, S32 len) { - ASSERT_LLBUFFERARRAY_MUTEX_LOCKED + ASSERT_LLBUFFERARRAY_MUTEX_LOCKED(); std::vector segments; if(copyIntoBuffers(channel, src, len, segments)) @@ -350,7 +350,7 @@ bool LLBufferArray::insertAfter( //mMutexp should be locked before calling this. LLBufferArray::segment_iterator_t LLBufferArray::splitAfter(U8* address) { - ASSERT_LLBUFFERARRAY_MUTEX_LOCKED + ASSERT_LLBUFFERARRAY_MUTEX_LOCKED(); segment_iterator_t end = mSegments.end(); segment_iterator_t it = getSegment(address); @@ -382,14 +382,14 @@ LLBufferArray::segment_iterator_t LLBufferArray::splitAfter(U8* address) //mMutexp should be locked before calling this. LLBufferArray::segment_iterator_t LLBufferArray::beginSegment() { - ASSERT_LLBUFFERARRAY_MUTEX_LOCKED + ASSERT_LLBUFFERARRAY_MUTEX_LOCKED(); return mSegments.begin(); } //mMutexp should be locked before calling this. LLBufferArray::segment_iterator_t LLBufferArray::endSegment() { - ASSERT_LLBUFFERARRAY_MUTEX_LOCKED + ASSERT_LLBUFFERARRAY_MUTEX_LOCKED(); return mSegments.end(); } @@ -398,7 +398,7 @@ LLBufferArray::segment_iterator_t LLBufferArray::constructSegmentAfter( U8* address, LLSegment& segment) { - ASSERT_LLBUFFERARRAY_MUTEX_LOCKED + ASSERT_LLBUFFERARRAY_MUTEX_LOCKED(); segment_iterator_t rv = mSegments.begin(); segment_iterator_t end = mSegments.end(); if(!address) @@ -447,7 +447,7 @@ LLBufferArray::segment_iterator_t LLBufferArray::constructSegmentAfter( //mMutexp should be locked before calling this. LLBufferArray::segment_iterator_t LLBufferArray::getSegment(U8* address) { - ASSERT_LLBUFFERARRAY_MUTEX_LOCKED + ASSERT_LLBUFFERARRAY_MUTEX_LOCKED(); segment_iterator_t end = mSegments.end(); if(!address) { @@ -469,7 +469,7 @@ LLBufferArray::segment_iterator_t LLBufferArray::getSegment(U8* address) LLBufferArray::const_segment_iterator_t LLBufferArray::getSegment( U8* address) const { - ASSERT_LLBUFFERARRAY_MUTEX_LOCKED + ASSERT_LLBUFFERARRAY_MUTEX_LOCKED(); const_segment_iterator_t end = mSegments.end(); if(!address) { @@ -624,7 +624,7 @@ U8* LLBufferArray::seek( U8* start, S32 delta) const { - ASSERT_LLBUFFERARRAY_MUTEX_LOCKED + ASSERT_LLBUFFERARRAY_MUTEX_LOCKED(); const_segment_iterator_t it; const_segment_iterator_t end = mSegments.end(); U8* rv = start; @@ -792,7 +792,7 @@ LLBufferArray::segment_iterator_t LLBufferArray::makeSegment( S32 channel, S32 len) { - ASSERT_LLBUFFERARRAY_MUTEX_LOCKED + ASSERT_LLBUFFERARRAY_MUTEX_LOCKED(); // start at the end of the buffers, because it is the most likely // to have free space. LLSegment segment; @@ -830,7 +830,7 @@ LLBufferArray::segment_iterator_t LLBufferArray::makeSegment( //mMutexp should be locked before calling this. bool LLBufferArray::eraseSegment(const segment_iterator_t& erase_iter) { - ASSERT_LLBUFFERARRAY_MUTEX_LOCKED + ASSERT_LLBUFFERARRAY_MUTEX_LOCKED(); // Find out which buffer contains the segment, and if it is found, // ask it to reclaim the memory. @@ -862,7 +862,7 @@ bool LLBufferArray::copyIntoBuffers( S32 len, std::vector& segments) { - ASSERT_LLBUFFERARRAY_MUTEX_LOCKED + ASSERT_LLBUFFERARRAY_MUTEX_LOCKED(); if(!src || !len) return false; S32 copied = 0; LLSegment segment; -- cgit v1.2.3 From e340009fc59d59e59b2e8d903a884acb76b178eb Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 9 Aug 2013 17:11:19 -0700 Subject: second phase summer cleaning replace llinfos, lldebugs, etc with new LL_INFOS(), LL_DEBUGS(), etc. --- indra/llmessage/llbuffer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llmessage/llbuffer.cpp') diff --git a/indra/llmessage/llbuffer.cpp b/indra/llmessage/llbuffer.cpp index f7f81e74bd..bf62808340 100755 --- a/indra/llmessage/llbuffer.cpp +++ b/indra/llmessage/llbuffer.cpp @@ -181,8 +181,8 @@ bool LLHeapBuffer::reclaimSegment(const LLSegment& segment) } else if(mReclaimedBytes > mSize) { - llwarns << "LLHeapBuffer reclaimed more memory than allocated." - << " This is probably programmer error." << llendl; + LL_WARNS() << "LLHeapBuffer reclaimed more memory than allocated." + << " This is probably programmer error." << LL_ENDL; } return true; } -- cgit v1.2.3