From 4a5ad357930f0bede4d84b9810978e9d0c5d268b Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 20 Jul 2012 11:42:15 -0500 Subject: MAINT-570 Remove unused memory tracking system LLMemType --- indra/llmessage/llbuffer.cpp | 24 ------------------------ indra/llmessage/llbufferstream.cpp | 9 --------- indra/llmessage/llcachename.cpp | 4 ---- indra/llmessage/lliohttpserver.cpp | 7 ------- indra/llmessage/lliosocket.cpp | 16 ---------------- indra/llmessage/llpumpio.cpp | 21 --------------------- indra/llmessage/llsdrpcclient.cpp | 10 ---------- indra/llmessage/llsdrpcserver.cpp | 8 -------- indra/llmessage/llurlrequest.cpp | 20 -------------------- indra/llmessage/message.cpp | 3 --- 10 files changed, 122 deletions(-) (limited to 'indra/llmessage') diff --git a/indra/llmessage/llbuffer.cpp b/indra/llmessage/llbuffer.cpp index 250cace6e9..01da20f060 100644 --- a/indra/llmessage/llbuffer.cpp +++ b/indra/llmessage/llbuffer.cpp @@ -30,7 +30,6 @@ #include "llbuffer.h" #include "llmath.h" -#include "llmemtype.h" #include "llstl.h" #include "llthread.h" @@ -44,7 +43,6 @@ LLSegment::LLSegment() : mData(NULL), mSize(0) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); } LLSegment::LLSegment(S32 channel, U8* data, S32 data_len) : @@ -52,12 +50,10 @@ LLSegment::LLSegment(S32 channel, U8* data, S32 data_len) : mData(data), mSize(data_len) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); } LLSegment::~LLSegment() { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); } bool LLSegment::isOnChannel(S32 channel) const @@ -104,7 +100,6 @@ LLHeapBuffer::LLHeapBuffer() : mNextFree(NULL), mReclaimedBytes(0) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); const S32 DEFAULT_HEAP_BUFFER_SIZE = 16384; allocate(DEFAULT_HEAP_BUFFER_SIZE); } @@ -115,7 +110,6 @@ LLHeapBuffer::LLHeapBuffer(S32 size) : mNextFree(NULL), mReclaimedBytes(0) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); allocate(size); } @@ -125,7 +119,6 @@ LLHeapBuffer::LLHeapBuffer(const U8* src, S32 len) : mNextFree(NULL), mReclaimedBytes(0) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); if((len > 0) && src) { allocate(len); @@ -139,7 +132,6 @@ LLHeapBuffer::LLHeapBuffer(const U8* src, S32 len) : // virtual LLHeapBuffer::~LLHeapBuffer() { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); delete[] mBuffer; mBuffer = NULL; mSize = 0; @@ -157,7 +149,6 @@ bool LLHeapBuffer::createSegment( S32 size, LLSegment& segment) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); // get actual size of the segment. S32 actual_size = llmin(size, (mSize - S32(mNextFree - mBuffer))); @@ -212,7 +203,6 @@ bool LLHeapBuffer::containsSegment(const LLSegment& segment) const void LLHeapBuffer::allocate(S32 size) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); mReclaimedBytes = 0; mBuffer = new U8[size]; if(mBuffer) @@ -230,12 +220,10 @@ LLBufferArray::LLBufferArray() : mNextBaseChannel(0), mMutexp(NULL) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); } LLBufferArray::~LLBufferArray() { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); std::for_each(mBuffers.begin(), mBuffers.end(), DeletePointer()); delete mMutexp; @@ -314,7 +302,6 @@ bool LLBufferArray::append(S32 channel, const U8* src, S32 len) { LLMutexLock lock(mMutexp) ; - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); std::vector segments; if(copyIntoBuffers(channel, src, len, segments)) { @@ -329,7 +316,6 @@ bool LLBufferArray::prepend(S32 channel, const U8* src, S32 len) { ASSERT_LLBUFFERARRAY_MUTEX_LOCKED - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); std::vector segments; if(copyIntoBuffers(channel, src, len, segments)) { @@ -345,7 +331,6 @@ bool LLBufferArray::insertAfter( const U8* src, S32 len) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); std::vector segments; LLMutexLock lock(mMutexp) ; @@ -366,7 +351,6 @@ LLBufferArray::segment_iterator_t LLBufferArray::splitAfter(U8* address) { ASSERT_LLBUFFERARRAY_MUTEX_LOCKED - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); segment_iterator_t end = mSegments.end(); segment_iterator_t it = getSegment(address); if(it == end) @@ -414,7 +398,6 @@ LLBufferArray::segment_iterator_t LLBufferArray::constructSegmentAfter( LLSegment& segment) { ASSERT_LLBUFFERARRAY_MUTEX_LOCKED - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); segment_iterator_t rv = mSegments.begin(); segment_iterator_t end = mSegments.end(); if(!address) @@ -578,7 +561,6 @@ U8* LLBufferArray::readAfter( U8* dest, S32& len) const { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); U8* rv = start; if(!dest || len <= 0) { @@ -642,7 +624,6 @@ U8* LLBufferArray::seek( S32 delta) const { ASSERT_LLBUFFERARRAY_MUTEX_LOCKED - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); const_segment_iterator_t it; const_segment_iterator_t end = mSegments.end(); U8* rv = start; @@ -786,8 +767,6 @@ U8* LLBufferArray::seek( //test use only bool LLBufferArray::takeContents(LLBufferArray& source) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); - LLMutexLock lock(mMutexp); source.lock(); @@ -813,7 +792,6 @@ LLBufferArray::segment_iterator_t LLBufferArray::makeSegment( S32 len) { ASSERT_LLBUFFERARRAY_MUTEX_LOCKED - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); // start at the end of the buffers, because it is the most likely // to have free space. LLSegment segment; @@ -852,7 +830,6 @@ LLBufferArray::segment_iterator_t LLBufferArray::makeSegment( bool LLBufferArray::eraseSegment(const segment_iterator_t& erase_iter) { ASSERT_LLBUFFERARRAY_MUTEX_LOCKED - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); // Find out which buffer contains the segment, and if it is found, // ask it to reclaim the memory. @@ -885,7 +862,6 @@ bool LLBufferArray::copyIntoBuffers( std::vector& segments) { ASSERT_LLBUFFERARRAY_MUTEX_LOCKED - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); if(!src || !len) return false; S32 copied = 0; LLSegment segment; diff --git a/indra/llmessage/llbufferstream.cpp b/indra/llmessage/llbufferstream.cpp index 8d8ad05ad5..a51a48edc3 100644 --- a/indra/llmessage/llbufferstream.cpp +++ b/indra/llmessage/llbufferstream.cpp @@ -30,7 +30,6 @@ #include "llbufferstream.h" #include "llbuffer.h" -#include "llmemtype.h" #include "llthread.h" static const S32 DEFAULT_OUTPUT_SEGMENT_SIZE = 1024 * 4; @@ -44,19 +43,16 @@ LLBufferStreamBuf::LLBufferStreamBuf( mChannels(channels), mBuffer(buffer) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); } LLBufferStreamBuf::~LLBufferStreamBuf() { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); sync(); } // virtual int LLBufferStreamBuf::underflow() { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); //lldebugs << "LLBufferStreamBuf::underflow()" << llendl; if(!mBuffer) { @@ -129,7 +125,6 @@ int LLBufferStreamBuf::underflow() // virtual int LLBufferStreamBuf::overflow(int c) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); if(!mBuffer) { return EOF; @@ -169,7 +164,6 @@ int LLBufferStreamBuf::overflow(int c) // virtual int LLBufferStreamBuf::sync() { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); int return_value = -1; if(!mBuffer) { @@ -251,7 +245,6 @@ streampos LLBufferStreamBuf::seekoff( std::ios::openmode which) #endif { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); if(!mBuffer || ((way == std::ios::beg) && (off < 0)) || ((way == std::ios::end) && (off > 0))) @@ -343,10 +336,8 @@ LLBufferStream::LLBufferStream( std::iostream(&mStreamBuf), mStreamBuf(channels, buffer) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); } LLBufferStream::~LLBufferStream() { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); } diff --git a/indra/llmessage/llcachename.cpp b/indra/llmessage/llcachename.cpp index 479efabb5f..8f4af1984c 100644 --- a/indra/llmessage/llcachename.cpp +++ b/indra/llmessage/llcachename.cpp @@ -36,7 +36,6 @@ #include "llsdserialize.h" #include "lluuid.h" #include "message.h" -#include "llmemtype.h" #include @@ -663,7 +662,6 @@ boost::signals2::connection LLCacheName::get(const LLUUID& id, bool is_group, ol void LLCacheName::processPending() { - LLMemType mt_pp(LLMemType::MTYPE_CACHE_PROCESS_PENDING); const F32 SECS_BETWEEN_PROCESS = 0.1f; if(!impl.mProcessTimer.checkExpirationAndReset(SECS_BETWEEN_PROCESS)) { @@ -769,7 +767,6 @@ std::string LLCacheName::getDefaultLastName() void LLCacheName::Impl::processPendingAsks() { - LLMemType mt_ppa(LLMemType::MTYPE_CACHE_PROCESS_PENDING_ASKS); sendRequest(_PREHASH_UUIDNameRequest, mAskNameQueue); sendRequest(_PREHASH_UUIDGroupNameRequest, mAskGroupQueue); mAskNameQueue.clear(); @@ -778,7 +775,6 @@ void LLCacheName::Impl::processPendingAsks() void LLCacheName::Impl::processPendingReplies() { - LLMemType mt_ppr(LLMemType::MTYPE_CACHE_PROCESS_PENDING_REPLIES); // First call all the callbacks, because they might send messages. for(ReplyQueue::iterator it = mReplyQueue.begin(); it != mReplyQueue.end(); ++it) { diff --git a/indra/llmessage/lliohttpserver.cpp b/indra/llmessage/lliohttpserver.cpp index 987f386aa3..127a2caabe 100644 --- a/indra/llmessage/lliohttpserver.cpp +++ b/indra/llmessage/lliohttpserver.cpp @@ -37,7 +37,6 @@ #include "lliopipe.h" #include "lliosocket.h" #include "llioutil.h" -#include "llmemtype.h" #include "llmemorystream.h" #include "llpumpio.h" #include "llsd.h" @@ -443,7 +442,6 @@ LLIOPipe::EStatus LLHTTPResponseHeader::process_impl( { LLFastTimer t(FTM_PROCESS_HTTP_HEADER); PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER); if(eos) { PUMP_DEBUG; @@ -587,13 +585,11 @@ LLHTTPResponder::LLHTTPResponder(const LLHTTPNode& tree, const LLSD& ctx) : mContentLength(0), mRootNode(tree) { - LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER); } // virtual LLHTTPResponder::~LLHTTPResponder() { - LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER); //lldebugs << "destroying LLHTTPResponder" << llendl; } @@ -603,7 +599,6 @@ bool LLHTTPResponder::readHeaderLine( U8* dest, S32& len) { - LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER); --len; U8* last = buffer->readAfter(channels.in(), mLastRead, dest, len); dest[len] = '\0'; @@ -628,7 +623,6 @@ void LLHTTPResponder::markBad( const LLChannelDescriptors& channels, buffer_ptr_t buffer) { - LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER); mState = STATE_SHORT_CIRCUIT; LLBufferStream out(channels, buffer.get()); out << HTTP_VERSION_STR << " 400 Bad Request\r\n\r\n\n" @@ -648,7 +642,6 @@ LLIOPipe::EStatus LLHTTPResponder::process_impl( { LLFastTimer t(FTM_PROCESS_HTTP_RESPONDER); PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER); LLIOPipe::EStatus status = STATUS_OK; // parsing headers diff --git a/indra/llmessage/lliosocket.cpp b/indra/llmessage/lliosocket.cpp index d5b4d45821..0287026659 100644 --- a/indra/llmessage/lliosocket.cpp +++ b/indra/llmessage/lliosocket.cpp @@ -33,7 +33,6 @@ #include "llbuffer.h" #include "llhost.h" -#include "llmemtype.h" #include "llpumpio.h" // @@ -100,7 +99,6 @@ void ll_debug_socket(const char* msg, apr_socket_t* apr_sock) // static LLSocket::ptr_t LLSocket::create(apr_pool_t* pool, EType type, U16 port) { - LLMemType m1(LLMemType::MTYPE_IO_TCP); LLSocket::ptr_t rv; apr_socket_t* socket = NULL; apr_pool_t* new_pool = NULL; @@ -198,7 +196,6 @@ LLSocket::ptr_t LLSocket::create(apr_pool_t* pool, EType type, U16 port) // static LLSocket::ptr_t LLSocket::create(apr_socket_t* socket, apr_pool_t* pool) { - LLMemType m1(LLMemType::MTYPE_IO_TCP); LLSocket::ptr_t rv; if(!socket) { @@ -240,12 +237,10 @@ LLSocket::LLSocket(apr_socket_t* socket, apr_pool_t* pool) : mPort(PORT_INVALID) { ll_debug_socket("Constructing wholely formed socket", mSocket); - LLMemType m1(LLMemType::MTYPE_IO_TCP); } LLSocket::~LLSocket() { - LLMemType m1(LLMemType::MTYPE_IO_TCP); // *FIX: clean up memory we are holding. if(mSocket) { @@ -265,7 +260,6 @@ LLSocket::~LLSocket() void LLSocket::setBlocking(S32 timeout) { - LLMemType m1(LLMemType::MTYPE_IO_TCP); // set up the socket options ll_apr_warn_status(apr_socket_timeout_set(mSocket, timeout)); ll_apr_warn_status(apr_socket_opt_set(mSocket, APR_SO_NONBLOCK, 0)); @@ -276,7 +270,6 @@ void LLSocket::setBlocking(S32 timeout) void LLSocket::setNonBlocking() { - LLMemType m1(LLMemType::MTYPE_IO_TCP); // set up the socket options ll_apr_warn_status(apr_socket_timeout_set(mSocket, 0)); ll_apr_warn_status(apr_socket_opt_set(mSocket, APR_SO_NONBLOCK, 1)); @@ -293,12 +286,10 @@ LLIOSocketReader::LLIOSocketReader(LLSocket::ptr_t socket) : mSource(socket), mInitialized(false) { - LLMemType m1(LLMemType::MTYPE_IO_TCP); } LLIOSocketReader::~LLIOSocketReader() { - LLMemType m1(LLMemType::MTYPE_IO_TCP); //lldebugs << "Destroying LLIOSocketReader" << llendl; } @@ -314,7 +305,6 @@ LLIOPipe::EStatus LLIOSocketReader::process_impl( { LLFastTimer t(FTM_PROCESS_SOCKET_READER); PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_TCP); if(!mSource) return STATUS_PRECONDITION_NOT_MET; if(!mInitialized) { @@ -396,12 +386,10 @@ LLIOSocketWriter::LLIOSocketWriter(LLSocket::ptr_t socket) : mLastWritten(NULL), mInitialized(false) { - LLMemType m1(LLMemType::MTYPE_IO_TCP); } LLIOSocketWriter::~LLIOSocketWriter() { - LLMemType m1(LLMemType::MTYPE_IO_TCP); //lldebugs << "Destroying LLIOSocketWriter" << llendl; } @@ -416,7 +404,6 @@ LLIOPipe::EStatus LLIOSocketWriter::process_impl( { LLFastTimer t(FTM_PROCESS_SOCKET_WRITER); PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_TCP); if(!mDestination) return STATUS_PRECONDITION_NOT_MET; if(!mInitialized) { @@ -550,12 +537,10 @@ LLIOServerSocket::LLIOServerSocket( mInitialized(false), mResponseTimeout(DEFAULT_CHAIN_EXPIRY_SECS) { - LLMemType m1(LLMemType::MTYPE_IO_TCP); } LLIOServerSocket::~LLIOServerSocket() { - LLMemType m1(LLMemType::MTYPE_IO_TCP); //lldebugs << "Destroying LLIOServerSocket" << llendl; } @@ -575,7 +560,6 @@ LLIOPipe::EStatus LLIOServerSocket::process_impl( { LLFastTimer t(FTM_PROCESS_SERVER_SOCKET); PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_TCP); if(!pump) { llwarns << "Need a pump for server socket." << llendl; diff --git a/indra/llmessage/llpumpio.cpp b/indra/llmessage/llpumpio.cpp index f3ef4f2684..97db666e6b 100644 --- a/indra/llmessage/llpumpio.cpp +++ b/indra/llmessage/llpumpio.cpp @@ -34,7 +34,6 @@ #include "apr_poll.h" #include "llapr.h" -#include "llmemtype.h" #include "llstl.h" #include "llstat.h" @@ -153,7 +152,6 @@ struct ll_delete_apr_pollset_fd_client_data typedef std::pair pipe_conditional_t; void operator()(const pipe_conditional_t& conditional) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); S32* client_id = (S32*)conditional.second.client_data; delete client_id; } @@ -177,19 +175,16 @@ LLPumpIO::LLPumpIO(apr_pool_t* pool) : { mCurrentChain = mRunningChains.end(); - LLMemType m1(LLMemType::MTYPE_IO_PUMP); initialize(pool); } LLPumpIO::~LLPumpIO() { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); cleanup(); } bool LLPumpIO::prime(apr_pool_t* pool) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); cleanup(); initialize(pool); return ((pool == NULL) ? false : true); @@ -197,7 +192,6 @@ bool LLPumpIO::prime(apr_pool_t* pool) bool LLPumpIO::addChain(const chain_t& chain, F32 timeout, bool has_curl_request) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); if(chain.empty()) return false; #if LL_THREADS_APR @@ -233,7 +227,6 @@ bool LLPumpIO::addChain( LLSD context, F32 timeout) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); // remember that if the caller is providing a full link // description, we need to have that description matched to a @@ -311,7 +304,6 @@ static std::string events_2_string(apr_int16_t events) bool LLPumpIO::setConditional(LLIOPipe* pipe, const apr_pollfd_t* poll) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); if(!pipe) return false; ll_debug_poll_fd("Set conditional", poll); @@ -423,7 +415,6 @@ bool LLPumpIO::sleepChain(F64 seconds) bool LLPumpIO::copyCurrentLinkInfo(links_t& links) const { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); if(mRunningChains.end() == mCurrentChain) { return false; @@ -454,7 +445,6 @@ LLPumpIO::current_chain_t LLPumpIO::removeRunningChain(LLPumpIO::current_chain_t //timeout is in microseconds void LLPumpIO::pump(const S32& poll_timeout) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); LLFastTimer t1(FTM_PUMP_IO); //llinfos << "LLPumpIO::pump()" << llendl; @@ -747,7 +737,6 @@ void LLPumpIO::pump(const S32& poll_timeout) bool LLPumpIO::respond(LLIOPipe* pipe) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); if(NULL == pipe) return false; #if LL_THREADS_APR @@ -766,7 +755,6 @@ bool LLPumpIO::respond( LLIOPipe::buffer_ptr_t data, LLSD context) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); // if the caller is providing a full link description, we need to // have that description matched to a particular buffer. if(!data) return false; @@ -789,7 +777,6 @@ static LLFastTimer::DeclareTimer FTM_PUMP_CALLBACK_CHAIN("Chain"); void LLPumpIO::callback() { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); //llinfos << "LLPumpIO::callback()" << llendl; if(true) { @@ -840,7 +827,6 @@ void LLPumpIO::control(LLPumpIO::EControl op) void LLPumpIO::initialize(apr_pool_t* pool) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); if(!pool) return; #if LL_THREADS_APR // SJB: Windows defaults to NESTED and OSX defaults to UNNESTED, so use UNNESTED explicitly. @@ -852,7 +838,6 @@ void LLPumpIO::initialize(apr_pool_t* pool) void LLPumpIO::cleanup() { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); #if LL_THREADS_APR if(mChainsMutex) apr_thread_mutex_destroy(mChainsMutex); if(mCallbackMutex) apr_thread_mutex_destroy(mCallbackMutex); @@ -875,7 +860,6 @@ void LLPumpIO::cleanup() void LLPumpIO::rebuildPollset() { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); // lldebugs << "LLPumpIO::rebuildPollset()" << llendl; if(mPollset) { @@ -928,7 +912,6 @@ void LLPumpIO::rebuildPollset() void LLPumpIO::processChain(LLChainInfo& chain) { PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_PUMP); LLIOPipe::EStatus status = LLIOPipe::STATUS_OK; links_t::iterator it = chain.mHead; links_t::iterator end = chain.mChainLinks.end(); @@ -1130,7 +1113,6 @@ bool LLPumpIO::handleChainError( LLChainInfo& chain, LLIOPipe::EStatus error) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); links_t::reverse_iterator rit; if(chain.mHead == chain.mChainLinks.end()) { @@ -1194,13 +1176,11 @@ LLPumpIO::LLChainInfo::LLChainInfo() : mEOS(false), mHasCurlRequest(false) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); mTimer.setTimerExpirySec(DEFAULT_CHAIN_EXPIRY_SECS); } void LLPumpIO::LLChainInfo::setTimeoutSeconds(F32 timeout) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); if(timeout > 0.0f) { mTimer.start(); @@ -1215,7 +1195,6 @@ void LLPumpIO::LLChainInfo::setTimeoutSeconds(F32 timeout) void LLPumpIO::LLChainInfo::adjustTimeoutSeconds(F32 delta) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); if(mTimer.getStarted()) { F64 expiry = mTimer.expiresAt(); diff --git a/indra/llmessage/llsdrpcclient.cpp b/indra/llmessage/llsdrpcclient.cpp index 91fd070f07..fcda0e81a3 100644 --- a/indra/llmessage/llsdrpcclient.cpp +++ b/indra/llmessage/llsdrpcclient.cpp @@ -31,7 +31,6 @@ #include "llbufferstream.h" #include "llfiltersd2xmlrpc.h" -#include "llmemtype.h" #include "llpumpio.h" #include "llsd.h" #include "llsdserialize.h" @@ -50,18 +49,15 @@ LLSDRPCResponse::LLSDRPCResponse() : mIsError(false), mIsFault(false) { - LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT); } // virtual LLSDRPCResponse::~LLSDRPCResponse() { - LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT); } bool LLSDRPCResponse::extractResponse(const LLSD& sd) { - LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT); bool rv = true; if(sd.has(LLSDRPC_RESPONSE_NAME)) { @@ -94,7 +90,6 @@ LLIOPipe::EStatus LLSDRPCResponse::process_impl( { LLFastTimer t(FTM_SDRPC_RESPONSE); PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT); if(mIsError) { error(pump); @@ -119,13 +114,11 @@ LLSDRPCClient::LLSDRPCClient() : mState(STATE_NONE), mQueue(EPBQ_PROCESS) { - LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT); } // virtual LLSDRPCClient::~LLSDRPCClient() { - LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT); } bool LLSDRPCClient::call( @@ -135,7 +128,6 @@ bool LLSDRPCClient::call( LLSDRPCResponse* response, EPassBackQueue queue) { - LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT); //llinfos << "RPC: " << uri << "." << method << "(" << *parameter << ")" // << llendl; if(method.empty() || !response) @@ -162,7 +154,6 @@ bool LLSDRPCClient::call( LLSDRPCResponse* response, EPassBackQueue queue) { - LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT); //llinfos << "RPC: " << uri << "." << method << "(" << parameter << ")" // << llendl; if(method.empty() || parameter.empty() || !response) @@ -193,7 +184,6 @@ LLIOPipe::EStatus LLSDRPCClient::process_impl( { LLFastTimer t(FTM_PROCESS_SDRPC_CLIENT); PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT); if((STATE_NONE == mState) || (!pump)) { // You should have called the call() method already. diff --git a/indra/llmessage/llsdrpcserver.cpp b/indra/llmessage/llsdrpcserver.cpp index 9f776aca72..f26ee52f71 100644 --- a/indra/llmessage/llsdrpcserver.cpp +++ b/indra/llmessage/llsdrpcserver.cpp @@ -31,7 +31,6 @@ #include "llbuffer.h" #include "llbufferstream.h" -#include "llmemtype.h" #include "llpumpio.h" #include "llsdserialize.h" #include "llstl.h" @@ -58,12 +57,10 @@ LLSDRPCServer::LLSDRPCServer() : mPump(NULL), mLock(0) { - LLMemType m1(LLMemType::MTYPE_IO_SD_SERVER); } LLSDRPCServer::~LLSDRPCServer() { - LLMemType m1(LLMemType::MTYPE_IO_SD_SERVER); std::for_each( mMethods.begin(), mMethods.end(), @@ -109,7 +106,6 @@ LLIOPipe::EStatus LLSDRPCServer::process_impl( { LLFastTimer t(FTM_PROCESS_SDRPC_SERVER); PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_SD_SERVER); // lldebugs << "LLSDRPCServer::process_impl" << llendl; // Once we have all the data, We need to read the sd on // the the in channel, and respond on the out channel @@ -253,7 +249,6 @@ ESDRPCSStatus LLSDRPCServer::callMethod( const LLChannelDescriptors& channels, LLBufferArray* response) { - LLMemType m1(LLMemType::MTYPE_IO_SD_SERVER); // Try to find the method in the method table. ESDRPCSStatus rv = ESDRPCS_DONE; method_map_t::iterator it = mMethods.find(method); @@ -292,7 +287,6 @@ ESDRPCSStatus LLSDRPCServer::callbackMethod( const LLChannelDescriptors& channels, LLBufferArray* response) { - LLMemType m1(LLMemType::MTYPE_IO_SD_SERVER); // Try to find the method in the callback method table. ESDRPCSStatus rv = ESDRPCS_DONE; method_map_t::iterator it = mCallbackMethods.find(method); @@ -320,7 +314,6 @@ void LLSDRPCServer::buildFault( S32 code, const std::string& msg) { - LLMemType m1(LLMemType::MTYPE_IO_SD_SERVER); LLBufferStream ostr(channels, data); ostr << FAULT_PART_1 << code << FAULT_PART_2 << msg << FAULT_PART_3; llinfos << "LLSDRPCServer::buildFault: " << code << ", " << msg << llendl; @@ -332,7 +325,6 @@ void LLSDRPCServer::buildResponse( LLBufferArray* data, const LLSD& response) { - LLMemType m1(LLMemType::MTYPE_IO_SD_SERVER); LLBufferStream ostr(channels, data); ostr << RESPONSE_PART_1; LLSDSerialize::toNotation(response, ostr); diff --git a/indra/llmessage/llurlrequest.cpp b/indra/llmessage/llurlrequest.cpp index a16f5c7bf0..8d96ad73ca 100644 --- a/indra/llmessage/llurlrequest.cpp +++ b/indra/llmessage/llurlrequest.cpp @@ -34,7 +34,6 @@ #include #include "llcurl.h" #include "llioutil.h" -#include "llmemtype.h" #include "llproxy.h" #include "llpumpio.h" #include "llsd.h" @@ -81,7 +80,6 @@ LLURLRequestDetail::LLURLRequestDetail() : mIsBodyLimitSet(false), mSSLVerifyCallback(NULL) { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); mCurlRequest = new LLCurlEasyRequest(); if(!mCurlRequest->isValid()) //failed. @@ -93,7 +91,6 @@ LLURLRequestDetail::LLURLRequestDetail() : LLURLRequestDetail::~LLURLRequestDetail() { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); delete mCurlRequest; mLastRead = NULL; } @@ -156,7 +153,6 @@ std::string LLURLRequest::actionAsVerb(LLURLRequest::ERequestAction action) LLURLRequest::LLURLRequest(LLURLRequest::ERequestAction action) : mAction(action) { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); initialize(); } @@ -165,21 +161,18 @@ LLURLRequest::LLURLRequest( const std::string& url) : mAction(action) { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); initialize(); setURL(url); } LLURLRequest::~LLURLRequest() { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); delete mDetail; mDetail = NULL ; } void LLURLRequest::setURL(const std::string& url) { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); mDetail->mURL = url; } @@ -190,7 +183,6 @@ std::string LLURLRequest::getURL() const void LLURLRequest::addHeader(const char* header) { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); mDetail->mCurlRequest->slist_append(header); } @@ -202,7 +194,6 @@ void LLURLRequest::setBodyLimit(U32 size) void LLURLRequest::setCallback(LLURLRequestComplete* callback) { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); mCompletionCallback = callback; mDetail->mCurlRequest->setHeaderCallback(&headerCallback, (void*)callback); } @@ -267,8 +258,6 @@ LLIOPipe::EStatus LLURLRequest::handleError( LLIOPipe::EStatus status, LLPumpIO* pump) { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); - if(!isValid()) { return STATUS_EXPIRED ; @@ -300,7 +289,6 @@ LLIOPipe::EStatus LLURLRequest::process_impl( { LLFastTimer t(FTM_PROCESS_URL_REQUEST); PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); //llinfos << "LLURLRequest::process_impl()" << llendl; if (!buffer) return STATUS_ERROR; @@ -456,7 +444,6 @@ LLIOPipe::EStatus LLURLRequest::process_impl( void LLURLRequest::initialize() { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); mState = STATE_INITIALIZED; mDetail = new LLURLRequestDetail; @@ -477,7 +464,6 @@ bool LLURLRequest::configure() { LLFastTimer t(FTM_URL_REQUEST_CONFIGURE); - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); bool rv = false; S32 bytes = mDetail->mResponseBuffer->countAfter( mDetail->mChannels.in(), @@ -557,7 +543,6 @@ size_t LLURLRequest::downCallback( size_t nmemb, void* user) { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); LLURLRequest* req = (LLURLRequest*)user; if(STATE_WAITING_FOR_RESPONSE == req->mState) { @@ -593,7 +578,6 @@ size_t LLURLRequest::upCallback( size_t nmemb, void* user) { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); LLURLRequest* req = (LLURLRequest*)user; S32 bytes = llmin( (S32)(size * nmemb), @@ -691,7 +675,6 @@ LLIOPipe::EStatus LLContextURLExtractor::process_impl( { LLFastTimer t(FTM_PROCESS_URL_EXTRACTOR); PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); // The destination host is in the context. if(context.isUndefined() || !mRequest) { @@ -719,13 +702,11 @@ LLIOPipe::EStatus LLContextURLExtractor::process_impl( LLURLRequestComplete::LLURLRequestComplete() : mRequestStatus(LLIOPipe::STATUS_ERROR) { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); } // virtual LLURLRequestComplete::~LLURLRequestComplete() { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); } //virtual @@ -764,7 +745,6 @@ void LLURLRequestComplete::noResponse() void LLURLRequestComplete::responseStatus(LLIOPipe::EStatus status) { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); mRequestStatus = status; } diff --git a/indra/llmessage/message.cpp b/indra/llmessage/message.cpp index 6a425cfe98..ae95087377 100644 --- a/indra/llmessage/message.cpp +++ b/indra/llmessage/message.cpp @@ -80,7 +80,6 @@ #include "v3math.h" #include "v4math.h" #include "lltransfertargetvfile.h" -#include "llmemtype.h" // Constants //const char* MESSAGE_LOG_FILENAME = "message.log"; @@ -793,7 +792,6 @@ S32 LLMessageSystem::getReceiveBytes() const void LLMessageSystem::processAcks() { - LLMemType mt_pa(LLMemType::MTYPE_MESSAGE_PROCESS_ACKS); F64 mt_sec = getMessageTimeSeconds(); { gTransferManager.updateTransfers(); @@ -4020,7 +4018,6 @@ void LLMessageSystem::setTimeDecodesSpamThreshold( F32 seconds ) // TODO: babbage: move gServicePump in to LLMessageSystem? bool LLMessageSystem::checkAllMessages(S64 frame_count, LLPumpIO* http_pump) { - LLMemType mt_cam(LLMemType::MTYPE_MESSAGE_CHECK_ALL); if(checkMessages(frame_count)) { return true; -- cgit v1.2.3 From 5564fcb271d993b1b8a98fae7f832f47f1236fd4 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 16 Jul 2012 19:15:46 -0700 Subject: SH-3275 WIP Run viewer metrics for object update messages clean up of llstats stuff --- indra/llmessage/llcircuit.cpp | 2 -- indra/llmessage/llcircuit.h | 3 --- indra/llmessage/lliohttpserver.cpp | 13 +++++++++---- indra/llmessage/llmessagetemplate.h | 2 +- indra/llmessage/llpumpio.cpp | 3 ++- 5 files changed, 12 insertions(+), 11 deletions(-) (limited to 'indra/llmessage') diff --git a/indra/llmessage/llcircuit.cpp b/indra/llmessage/llcircuit.cpp index e0410906fb..0c2d4b823d 100644 --- a/indra/llmessage/llcircuit.cpp +++ b/indra/llmessage/llcircuit.cpp @@ -679,7 +679,6 @@ void LLCircuitData::checkPacketInID(TPACKETID id, BOOL receive_resent) setPacketInID((id + 1) % LL_MAX_OUT_PACKET_ID); mLastPacketGap = 0; - mOutOfOrderRate.count(0); return; } @@ -775,7 +774,6 @@ void LLCircuitData::checkPacketInID(TPACKETID id, BOOL receive_resent) } } - mOutOfOrderRate.count(gap); mLastPacketGap = gap; } diff --git a/indra/llmessage/llcircuit.h b/indra/llmessage/llcircuit.h index d1c400c6a2..c46fd56acc 100644 --- a/indra/llmessage/llcircuit.h +++ b/indra/llmessage/llcircuit.h @@ -126,8 +126,6 @@ public: S32 getUnackedPacketCount() const { return mUnackedPacketCount; } S32 getUnackedPacketBytes() const { return mUnackedPacketBytes; } F64 getNextPingSendTime() const { return mNextPingSendTime; } - F32 getOutOfOrderRate(LLStatAccum::TimeScale scale = LLStatAccum::SCALE_MINUTE) - { return mOutOfOrderRate.meanValue(scale); } U32 getLastPacketGap() const { return mLastPacketGap; } LLHost getHost() const { return mHost; } F64 getLastPacketInTime() const { return mLastPacketInTime; } @@ -275,7 +273,6 @@ protected: LLTimer mExistenceTimer; // initialized when circuit created, used to track bandwidth numbers S32 mCurrentResendCount; // Number of resent packets since last spam - LLStatRate mOutOfOrderRate; // Rate of out of order packets coming in. U32 mLastPacketGap; // Gap in sequence number of last packet. const F32 mHeartbeatInterval; diff --git a/indra/llmessage/lliohttpserver.cpp b/indra/llmessage/lliohttpserver.cpp index 987f386aa3..74eaf9f025 100644 --- a/indra/llmessage/lliohttpserver.cpp +++ b/indra/llmessage/lliohttpserver.cpp @@ -141,6 +141,11 @@ private: }; static LLFastTimer::DeclareTimer FTM_PROCESS_HTTP_PIPE("HTTP Pipe"); +static LLFastTimer::DeclareTimer FTM_PROCESS_HTTP_GET("HTTP Get"); +static LLFastTimer::DeclareTimer FTM_PROCESS_HTTP_PUT("HTTP Put"); +static LLFastTimer::DeclareTimer FTM_PROCESS_HTTP_POST("HTTP Post"); +static LLFastTimer::DeclareTimer FTM_PROCESS_HTTP_DELETE("HTTP Delete"); + LLIOPipe::EStatus LLHTTPPipe::process_impl( const LLChannelDescriptors& channels, buffer_ptr_t& buffer, @@ -177,12 +182,12 @@ LLIOPipe::EStatus LLHTTPPipe::process_impl( std::string verb = context[CONTEXT_REQUEST][CONTEXT_VERB]; if(verb == HTTP_VERB_GET) { - LLPerfBlock getblock("http_get"); + LLFastTimer _(FTM_PROCESS_HTTP_GET); mNode.get(LLHTTPNode::ResponsePtr(mResponse), context); } else if(verb == HTTP_VERB_PUT) { - LLPerfBlock putblock("http_put"); + LLFastTimer _(FTM_PROCESS_HTTP_PUT); LLSD input; if (mNode.getContentType() == LLHTTPNode::CONTENT_TYPE_LLSD) { @@ -198,7 +203,7 @@ LLIOPipe::EStatus LLHTTPPipe::process_impl( } else if(verb == HTTP_VERB_POST) { - LLPerfBlock postblock("http_post"); + LLFastTimer _(FTM_PROCESS_HTTP_POST); LLSD input; if (mNode.getContentType() == LLHTTPNode::CONTENT_TYPE_LLSD) { @@ -214,7 +219,7 @@ LLIOPipe::EStatus LLHTTPPipe::process_impl( } else if(verb == HTTP_VERB_DELETE) { - LLPerfBlock delblock("http_delete"); + LLFastTimer _(FTM_PROCESS_HTTP_DELETE); mNode.del(LLHTTPNode::ResponsePtr(mResponse), context); } else if(verb == HTTP_VERB_OPTIONS) diff --git a/indra/llmessage/llmessagetemplate.h b/indra/llmessage/llmessagetemplate.h index 16d825d33b..a2024166ee 100644 --- a/indra/llmessage/llmessagetemplate.h +++ b/indra/llmessage/llmessagetemplate.h @@ -263,6 +263,7 @@ enum EMsgDeprecation MD_DEPRECATED }; + class LLMessageTemplate { public: @@ -364,7 +365,6 @@ public: { if (mHandlerFunc) { - LLPerfBlock msg_cb_time("msg_cb", mName); mHandlerFunc(msgsystem, mUserData); return TRUE; } diff --git a/indra/llmessage/llpumpio.cpp b/indra/llmessage/llpumpio.cpp index f3ef4f2684..fcb77a23a9 100644 --- a/indra/llmessage/llpumpio.cpp +++ b/indra/llmessage/llpumpio.cpp @@ -441,6 +441,7 @@ void LLPumpIO::pump() } static LLFastTimer::DeclareTimer FTM_PUMP_IO("Pump IO"); +static LLFastTimer::DeclareTimer FTM_PUMP_POLL("Pump Poll"); LLPumpIO::current_chain_t LLPumpIO::removeRunningChain(LLPumpIO::current_chain_t& run_chain) { @@ -536,7 +537,7 @@ void LLPumpIO::pump(const S32& poll_timeout) S32 count = 0; S32 client_id = 0; { - LLPerfBlock polltime("pump_poll"); + LLFastTimer _(FTM_PUMP_POLL); apr_pollset_poll(mPollset, poll_timeout, &count, &poll_fd); } PUMP_DEBUG; -- cgit v1.2.3 From c8a36e9cfd1e90a1aa385667c7272c25e2ef9136 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 7 Aug 2012 19:55:47 -0700 Subject: SH-3275 WIP Run viewer metrics for object update messages cleaned up LLStat and removed unnecessary includes --- indra/llmessage/llcircuit.h | 1 - indra/llmessage/lliohttpserver.cpp | 1 - indra/llmessage/llmessagetemplate.h | 1 - indra/llmessage/llpumpio.cpp | 1 - 4 files changed, 4 deletions(-) (limited to 'indra/llmessage') diff --git a/indra/llmessage/llcircuit.h b/indra/llmessage/llcircuit.h index c46fd56acc..430d6358f7 100644 --- a/indra/llmessage/llcircuit.h +++ b/indra/llmessage/llcircuit.h @@ -40,7 +40,6 @@ #include "llpacketack.h" #include "lluuid.h" #include "llthrottle.h" -#include "llstat.h" // // Constants diff --git a/indra/llmessage/lliohttpserver.cpp b/indra/llmessage/lliohttpserver.cpp index 74eaf9f025..20dc5ae968 100644 --- a/indra/llmessage/lliohttpserver.cpp +++ b/indra/llmessage/lliohttpserver.cpp @@ -42,7 +42,6 @@ #include "llpumpio.h" #include "llsd.h" #include "llsdserialize_xml.h" -#include "llstat.h" #include "llstl.h" #include "lltimer.h" diff --git a/indra/llmessage/llmessagetemplate.h b/indra/llmessage/llmessagetemplate.h index a2024166ee..ae8e0087c1 100644 --- a/indra/llmessage/llmessagetemplate.h +++ b/indra/llmessage/llmessagetemplate.h @@ -29,7 +29,6 @@ #include "lldarray.h" #include "message.h" // TODO: babbage: Remove... -#include "llstat.h" #include "llstl.h" class LLMsgVarData diff --git a/indra/llmessage/llpumpio.cpp b/indra/llmessage/llpumpio.cpp index fcb77a23a9..8272240ef4 100644 --- a/indra/llmessage/llpumpio.cpp +++ b/indra/llmessage/llpumpio.cpp @@ -36,7 +36,6 @@ #include "llapr.h" #include "llmemtype.h" #include "llstl.h" -#include "llstat.h" // These should not be enabled in production, but they can be // intensely useful during development for finding certain kinds of -- cgit v1.2.3 From 58a73b4fc1e39df13c3c11a6f286cdeeace26c4f Mon Sep 17 00:00:00 2001 From: "simon@Simon-PC.lindenlab.com" Date: Mon, 29 Oct 2012 13:10:37 -0700 Subject: MAINT-1791 : Parcel media clear list crash. Reviewed by Kelly --- indra/llmessage/llurlrequest.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/llmessage') diff --git a/indra/llmessage/llurlrequest.cpp b/indra/llmessage/llurlrequest.cpp index 5831c3c1c1..227efdb07a 100644 --- a/indra/llmessage/llurlrequest.cpp +++ b/indra/llmessage/llurlrequest.cpp @@ -356,7 +356,8 @@ LLIOPipe::EStatus LLURLRequest::process_impl( } } - while(1) + bool keep_looping = true; + while(keep_looping) { CURLcode result; @@ -408,8 +409,9 @@ LLIOPipe::EStatus LLURLRequest::process_impl( case CURLE_FAILED_INIT: case CURLE_COULDNT_CONNECT: status = STATUS_NO_CONNECTION; + keep_looping = false; break; - default: + default: // CURLE_URL_MALFORMAT llwarns << "URLRequest Error: " << result << ", " << LLCurl::strerror(result) @@ -417,6 +419,7 @@ LLIOPipe::EStatus LLURLRequest::process_impl( << (mDetail->mURL.empty() ? "" : mDetail->mURL) << llendl; status = STATUS_ERROR; + keep_looping = false; break; } } -- cgit v1.2.3 From 747784a9b1abb3ea85abb9fcc05981992be6f485 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 21 Dec 2012 08:52:39 -0500 Subject: MAINT-2168: fail with real message if required var PORT not set. llhttpclient_test.cpp is only supposed to be run by test_llsdmessage_peer.py, as specified in llmessage/CMakeLists.txt. test_llsdmessage_peer.py sets the environment variable PORT before running INTEGRATION_TEST_llhttpclient. While it's not yet clear under what circumstances INTEGRATION_TEST_llhttpclient could find PORT not set (getenv() returning NULL), it's obvious that in that case, the previous code might well crash. Make it at least fail with an explanatory message rather than a mysterious large negative integer. In theory, occurrences of that message could help us solve the underlying issue. --- indra/llmessage/tests/llhttpclient_test.cpp | 36 +++++++++++++++++------------ 1 file changed, 21 insertions(+), 15 deletions(-) (limited to 'indra/llmessage') diff --git a/indra/llmessage/tests/llhttpclient_test.cpp b/indra/llmessage/tests/llhttpclient_test.cpp index a2be307cc8..7c3def6024 100644 --- a/indra/llmessage/tests/llhttpclient_test.cpp +++ b/indra/llmessage/tests/llhttpclient_test.cpp @@ -48,7 +48,7 @@ namespace tut { LLSD storage; - + class LLSDStorageNode : public LLHTTPNode { public: @@ -82,8 +82,13 @@ namespace tut { public: HTTPClientTestData(): - local_server(STRINGIZE("http://127.0.0.1:" << getenv("PORT") << "/")) + PORT(getenv("PORT")), + // Turning NULL PORT into empty string doesn't make things work; + // that's just to keep this initializer from blowing up. We test + // PORT separately in the constructor body. + local_server(STRINGIZE("http://127.0.0.1:" << (PORT? PORT : "") << "/")) { + ensure("Set environment variable PORT to local test server port", PORT); apr_pool_create(&mPool, NULL); LLCurl::initClass(false); mServerPump = new LLPumpIO(mPool); @@ -91,7 +96,7 @@ namespace tut LLHTTPClient::setPump(*mClientPump); } - + ~HTTPClientTestData() { delete mServerPump; @@ -107,7 +112,7 @@ namespace tut LLHTTPStandardServices::useServices(); LLHTTPRegistrar::buildAllServices(root); } - + void runThePump(float timeout = 100.0f) { LLTimer timer; @@ -134,6 +139,7 @@ namespace tut mServerPump = NULL; } + const char* const PORT; const std::string local_server; private: @@ -148,11 +154,11 @@ namespace tut { std::string msg = llformat("error() called when not expected, status %d", - mStatus); + mStatus); fail(msg); } } - + void ensureStatusError() { if (!mSawError) @@ -160,7 +166,7 @@ namespace tut fail("error() wasn't called"); } } - + LLSD getResult() { return mResult; @@ -169,7 +175,7 @@ namespace tut { return mHeader; } - + protected: bool mSawError; U32 mStatus; @@ -187,18 +193,18 @@ namespace tut : mClient(client) { } - + public: static Result* build(HTTPClientTestData& client) { return new Result(client); } - + ~Result() { mClient.mResultDeleted = true; } - + virtual void error(U32 status, const std::string& reason) { mClient.mSawError = true; @@ -216,7 +222,7 @@ namespace tut const LLSD& content) { LLHTTPClient::Responder::completed(status, reason, content); - + mClient.mSawCompleted = true; } @@ -244,12 +250,12 @@ namespace tut mResult.clear(); mHeader.clear(); mResultDeleted = false; - + return Result::build(*this); } }; - - + + typedef test_group HTTPClientTestGroup; typedef HTTPClientTestGroup::object HTTPClientTestObject; HTTPClientTestGroup httpClientTestGroup("http_client"); -- cgit v1.2.3 From 144fcf62fb01c4f98ee6abb587f9a487d5683257 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 21 Dec 2012 09:01:09 -0500 Subject: MAINT-2168: Backed out changeset 797318b62275, pushed to wrong repo This changeset was prematurely pushed to the wrong repository. Back it out to propagate it the right way. --- indra/llmessage/tests/llhttpclient_test.cpp | 36 ++++++++++++----------------- 1 file changed, 15 insertions(+), 21 deletions(-) (limited to 'indra/llmessage') diff --git a/indra/llmessage/tests/llhttpclient_test.cpp b/indra/llmessage/tests/llhttpclient_test.cpp index 7c3def6024..a2be307cc8 100644 --- a/indra/llmessage/tests/llhttpclient_test.cpp +++ b/indra/llmessage/tests/llhttpclient_test.cpp @@ -48,7 +48,7 @@ namespace tut { LLSD storage; - + class LLSDStorageNode : public LLHTTPNode { public: @@ -82,13 +82,8 @@ namespace tut { public: HTTPClientTestData(): - PORT(getenv("PORT")), - // Turning NULL PORT into empty string doesn't make things work; - // that's just to keep this initializer from blowing up. We test - // PORT separately in the constructor body. - local_server(STRINGIZE("http://127.0.0.1:" << (PORT? PORT : "") << "/")) + local_server(STRINGIZE("http://127.0.0.1:" << getenv("PORT") << "/")) { - ensure("Set environment variable PORT to local test server port", PORT); apr_pool_create(&mPool, NULL); LLCurl::initClass(false); mServerPump = new LLPumpIO(mPool); @@ -96,7 +91,7 @@ namespace tut LLHTTPClient::setPump(*mClientPump); } - + ~HTTPClientTestData() { delete mServerPump; @@ -112,7 +107,7 @@ namespace tut LLHTTPStandardServices::useServices(); LLHTTPRegistrar::buildAllServices(root); } - + void runThePump(float timeout = 100.0f) { LLTimer timer; @@ -139,7 +134,6 @@ namespace tut mServerPump = NULL; } - const char* const PORT; const std::string local_server; private: @@ -154,11 +148,11 @@ namespace tut { std::string msg = llformat("error() called when not expected, status %d", - mStatus); + mStatus); fail(msg); } } - + void ensureStatusError() { if (!mSawError) @@ -166,7 +160,7 @@ namespace tut fail("error() wasn't called"); } } - + LLSD getResult() { return mResult; @@ -175,7 +169,7 @@ namespace tut { return mHeader; } - + protected: bool mSawError; U32 mStatus; @@ -193,18 +187,18 @@ namespace tut : mClient(client) { } - + public: static Result* build(HTTPClientTestData& client) { return new Result(client); } - + ~Result() { mClient.mResultDeleted = true; } - + virtual void error(U32 status, const std::string& reason) { mClient.mSawError = true; @@ -222,7 +216,7 @@ namespace tut const LLSD& content) { LLHTTPClient::Responder::completed(status, reason, content); - + mClient.mSawCompleted = true; } @@ -250,12 +244,12 @@ namespace tut mResult.clear(); mHeader.clear(); mResultDeleted = false; - + return Result::build(*this); } }; - - + + typedef test_group HTTPClientTestGroup; typedef HTTPClientTestGroup::object HTTPClientTestObject; HTTPClientTestGroup httpClientTestGroup("http_client"); -- cgit v1.2.3 From 36f094d508f4a04e4a841f24b406c96c5fd331ff Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 21 Dec 2012 09:03:06 -0500 Subject: MAINT-2168: Backed out changeset fb93eecd462d, reapply fix Now that we've backed out the premature push, reapply the actual fix to propagate it appropriately. --- indra/llmessage/tests/llhttpclient_test.cpp | 36 +++++++++++++++++------------ 1 file changed, 21 insertions(+), 15 deletions(-) (limited to 'indra/llmessage') diff --git a/indra/llmessage/tests/llhttpclient_test.cpp b/indra/llmessage/tests/llhttpclient_test.cpp index a2be307cc8..7c3def6024 100644 --- a/indra/llmessage/tests/llhttpclient_test.cpp +++ b/indra/llmessage/tests/llhttpclient_test.cpp @@ -48,7 +48,7 @@ namespace tut { LLSD storage; - + class LLSDStorageNode : public LLHTTPNode { public: @@ -82,8 +82,13 @@ namespace tut { public: HTTPClientTestData(): - local_server(STRINGIZE("http://127.0.0.1:" << getenv("PORT") << "/")) + PORT(getenv("PORT")), + // Turning NULL PORT into empty string doesn't make things work; + // that's just to keep this initializer from blowing up. We test + // PORT separately in the constructor body. + local_server(STRINGIZE("http://127.0.0.1:" << (PORT? PORT : "") << "/")) { + ensure("Set environment variable PORT to local test server port", PORT); apr_pool_create(&mPool, NULL); LLCurl::initClass(false); mServerPump = new LLPumpIO(mPool); @@ -91,7 +96,7 @@ namespace tut LLHTTPClient::setPump(*mClientPump); } - + ~HTTPClientTestData() { delete mServerPump; @@ -107,7 +112,7 @@ namespace tut LLHTTPStandardServices::useServices(); LLHTTPRegistrar::buildAllServices(root); } - + void runThePump(float timeout = 100.0f) { LLTimer timer; @@ -134,6 +139,7 @@ namespace tut mServerPump = NULL; } + const char* const PORT; const std::string local_server; private: @@ -148,11 +154,11 @@ namespace tut { std::string msg = llformat("error() called when not expected, status %d", - mStatus); + mStatus); fail(msg); } } - + void ensureStatusError() { if (!mSawError) @@ -160,7 +166,7 @@ namespace tut fail("error() wasn't called"); } } - + LLSD getResult() { return mResult; @@ -169,7 +175,7 @@ namespace tut { return mHeader; } - + protected: bool mSawError; U32 mStatus; @@ -187,18 +193,18 @@ namespace tut : mClient(client) { } - + public: static Result* build(HTTPClientTestData& client) { return new Result(client); } - + ~Result() { mClient.mResultDeleted = true; } - + virtual void error(U32 status, const std::string& reason) { mClient.mSawError = true; @@ -216,7 +222,7 @@ namespace tut const LLSD& content) { LLHTTPClient::Responder::completed(status, reason, content); - + mClient.mSawCompleted = true; } @@ -244,12 +250,12 @@ namespace tut mResult.clear(); mHeader.clear(); mResultDeleted = false; - + return Result::build(*this); } }; - - + + typedef test_group HTTPClientTestGroup; typedef HTTPClientTestGroup::object HTTPClientTestObject; HTTPClientTestGroup httpClientTestGroup("http_client"); -- cgit v1.2.3 From 2cba564b24fde367b1ed1d6965e68b5a7da60201 Mon Sep 17 00:00:00 2001 From: Kelly Washington Date: Thu, 3 Jan 2013 09:17:25 -0800 Subject: MAINT-2184 [crashhunters] new crash in LLUUID::toString Fix dangling references. --- indra/llmessage/llavatarnamecache.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'indra/llmessage') diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp index 700525e1fa..a6e2c89ba4 100644 --- a/indra/llmessage/llavatarnamecache.cpp +++ b/indra/llmessage/llavatarnamecache.cpp @@ -348,7 +348,7 @@ void LLAvatarNameCache::requestNamesViaCapability() while(!sAskQueue.empty()) { it = sAskQueue.begin(); - const LLUUID& agent_id = *it; + LLUUID agent_id = *it; sAskQueue.erase(it); if (url.empty()) @@ -416,7 +416,7 @@ void LLAvatarNameCache::requestNamesViaLegacy() for (S32 requests = 0; !sAskQueue.empty() && requests < MAX_REQUESTS; ++requests) { it = sAskQueue.begin(); - const LLUUID& agent_id = *it; + LLUUID agent_id = *it; sAskQueue.erase(it); // Mark as pending first, just in case the callback is immediately @@ -563,8 +563,7 @@ void LLAvatarNameCache::eraseUnrefreshed() const LLAvatarName& av_name = it->second; if (av_name.mExpires < max_unrefreshed) { - const LLUUID& agent_id = it->first; - LL_DEBUGS("AvNameCache") << agent_id + LL_DEBUGS("AvNameCache") << it->first << " user '" << av_name.mUsername << "' " << "expired " << now - av_name.mExpires << " secs ago" << LL_ENDL; -- cgit v1.2.3 From b0c449d301299a4ba1b7d83e930f9df6b071b931 Mon Sep 17 00:00:00 2001 From: Baker Linden Date: Wed, 9 Jan 2013 15:24:27 -0800 Subject: [MAINT-2185] Unable to upload terrain .raw files - Fixed an issue where a slash was prepended to the beginning of the filename (which happened to be the full path) --- indra/llmessage/llxfermanager.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'indra/llmessage') diff --git a/indra/llmessage/llxfermanager.cpp b/indra/llmessage/llxfermanager.cpp index b9cddc8e45..00b9d81611 100644 --- a/indra/llmessage/llxfermanager.cpp +++ b/indra/llmessage/llxfermanager.cpp @@ -886,8 +886,17 @@ void LLXferManager::processFileRequest (LLMessageSystem *mesgsys, void ** /*user return; } - - std::string expanded_filename = gDirUtilp->getExpandedFilename( local_path, local_filename ); + // If we want to use a special path (e.g. LL_PATH_CACHE), we want to make sure we create the + // proper expanded filename. + std::string expanded_filename; + if (local_path != LL_PATH_NONE) + { + expanded_filename = gDirUtilp->getExpandedFilename( local_path, local_filename ); + } + else + { + expanded_filename = local_filename; + } llinfos << "starting file transfer: " << expanded_filename << " to " << mesgsys->getSender() << llendl; BOOL delete_local_on_completion = FALSE; -- cgit v1.2.3