diff --git a/indra/llcommon/llprocess.cpp b/indra/llcommon/llprocess.cpp index 7d2ea809e3489ef5f07e956f5816ede3351645f1..e40d95f9565cb8110956202aa1c7fe31366e36cf 100644 --- a/indra/llcommon/llprocess.cpp +++ b/indra/llcommon/llprocess.cpp @@ -217,6 +217,7 @@ class WritePipeImpl: public LLProcess::WritePipe remainptr += written; remainlen -= written; +#if SHOW_DEBUG char msgbuf[512]; LL_DEBUGS("LLProcess") << "wrote " << written << " of " << towrite << " bytes to " << mDesc @@ -224,6 +225,7 @@ class WritePipeImpl: public LLProcess::WritePipe << " code " << err << ": " << apr_strerror(err, msgbuf, sizeof(msgbuf)) << LL_ENDL; +#endif // The parent end of this pipe is nonblocking. If we weren't able // to write everything we wanted, don't keep banging on it -- that @@ -386,7 +388,9 @@ class ReadPipeImpl: public LLProcess::ReadPipe // Handle EOF specially: it's part of normal-case processing. if (err == APR_EOF) { +#if SHOW_DEBUG LL_DEBUGS("LLProcess") << "EOF on " << mDesc << LL_ENDL; +#endif } else { @@ -406,8 +410,10 @@ class ReadPipeImpl: public LLProcess::ReadPipe // received. Make sure we commit those later. (Don't commit them // now, that would invalidate the buffer iterator sequence!) tocommit += gotten; +#if SHOW_DEBUG LL_DEBUGS("LLProcess") << "filled " << gotten << " of " << toread << " bytes from " << mDesc << LL_ENDL; +#endif // The parent end of this pipe is nonblocking. If we weren't even // able to fill this buffer, don't loop to try to fill the next -- diff --git a/indra/llcommon/llsingleton.cpp b/indra/llcommon/llsingleton.cpp index 9b89fac8185e290fcf64edaef7c680cc1845f63d..4cabaf5e58c538761e0593dfa1682d6a6e23c9ba 100644 --- a/indra/llcommon/llsingleton.cpp +++ b/indra/llcommon/llsingleton.cpp @@ -270,6 +270,7 @@ void LLSingletonBase::reset_initializing(list_t::size_type size) void LLSingletonBase::MasterList::LockedInitializing::log(const char* verb, const char* name) { +#if SHOW_DEBUG LL_DEBUGS("LLSingleton") << verb << ' ' << demangle(name) << ';'; if (mList) { @@ -281,6 +282,7 @@ void LLSingletonBase::MasterList::LockedInitializing::log(const char* verb, cons } } LL_ENDL; +#endif } void LLSingletonBase::capture_dependency() @@ -471,7 +473,9 @@ void LLSingletonBase::loginfos(const string_params& args) //static void LLSingletonBase::logdebugs(const string_params& args) { +#if SHOW_DEBUG LL_DEBUGS("LLSingleton") << args << LL_ENDL; +#endif } //static diff --git a/indra/llcorehttp/_httppolicy.cpp b/indra/llcorehttp/_httppolicy.cpp index ff364bc74186f3bac5616585244b387ed98b82c2..9044639735d01503c77bffba04287a70f12dfa53 100644 --- a/indra/llcorehttp/_httppolicy.cpp +++ b/indra/llcorehttp/_httppolicy.cpp @@ -281,9 +281,11 @@ HttpService::ELoopSpeed HttpPolicy::processReadyQueue() if (now >= state.mThrottleEnd) { // Throttle expired, move to next window +#ifdef SHOW_DEBUG LL_DEBUGS(LOG_CORE) << "Throttle expired with " << state.mThrottleLeft << " requests to go and " << state.mRequestCount << " requests issued." << LL_ENDL; +#endif state.mThrottleLeft = state.mOptions.mThrottleRate; state.mThrottleEnd = now + HttpTime(1000000); } @@ -310,9 +312,11 @@ HttpService::ELoopSpeed HttpPolicy::processReadyQueue() if (now >= state.mThrottleEnd) { // Throttle expired, move to next window +#ifdef SHOW_DEBUG LL_DEBUGS(LOG_CORE) << "Throttle expired with " << state.mThrottleLeft << " requests to go and " << state.mRequestCount << " requests issued." << LL_ENDL; +#endif state.mThrottleLeft = state.mOptions.mThrottleRate; state.mThrottleEnd = now + HttpTime(1000000); } @@ -443,12 +447,14 @@ bool HttpPolicy::stageAfterCompletion(const HttpOpRequest::ptr_t &op) << " (" << op->mStatus.toTerseString() << ")" << LL_ENDL; } +#ifdef SHOW_DEBUG else if (op->mPolicyRetries) { LL_DEBUGS(LOG_CORE) << "HTTP request " << op->getHandle() << " succeeded on retry " << op->mPolicyRetries << "." << LL_ENDL; } +#endif op->stageFromActive(mService); diff --git a/indra/llimagej2coj/llimagej2coj.cpp b/indra/llimagej2coj/llimagej2coj.cpp index 0f1c9917e9affcb1c6af69cb2b22d43de4ac3b43..64f43e13b6295eb9d0c79ebc98de947a38647716 100644 --- a/indra/llimagej2coj/llimagej2coj.cpp +++ b/indra/llimagej2coj/llimagej2coj.cpp @@ -253,7 +253,9 @@ bool LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod opj_codec_t* opj_decoder_p = opj_create_decompress(OPJ_CODEC_J2K); if (!opj_decoder_p) { +#ifdef SHOW_DEBUG LL_DEBUGS("Texture") << "ERROR -> decodeImpl: failed to create decoder!" << LL_ENDL; +#endif base.decodeFailed(); return true; // done } @@ -268,7 +270,9 @@ bool LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod /* setup the decoder decoding parameters using user parameters */ if (!opj_setup_decoder(opj_decoder_p, ¶meters)) { +#ifdef SHOW_DEBUG LL_DEBUGS("Texture") << "ERROR -> decodeImpl: failed to decode image!" << LL_ENDL; +#endif opj_destroy_codec(opj_decoder_p); base.decodeFailed(); return true; // done @@ -300,7 +304,9 @@ bool LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod // dereference the array. if (!success || !image || !image->numcomps) { +#ifdef SHOW_DEBUG LL_DEBUGS("Texture") << "ERROR -> decodeImpl: failed to decode image!" << LL_ENDL; +#endif if (image) { opj_image_destroy(image); diff --git a/indra/llmessage/llcoproceduremanager.cpp b/indra/llmessage/llcoproceduremanager.cpp index 5c25440610fbdd2fdbeaed114ab9981b1320bb89..a143786c6b20571d5457e86001c07aca85bf9ffa 100644 --- a/indra/llmessage/llcoproceduremanager.cpp +++ b/indra/llmessage/llcoproceduremanager.cpp @@ -415,7 +415,9 @@ void LLCoprocedurePool::coprocedureInvokerCoro( --mPending; mActiveCoprocsCount++; +#ifdef SHOW_DEBUG LL_DEBUGS("CoProcMgr") << "Dequeued and invoking coprocedure(" << coproc->mName << ") with id=" << coproc->mId.asString() << " in pool \"" << mPoolName << "\" (" << mPending << " left)" << LL_ENDL; +#endif try { @@ -437,7 +439,9 @@ void LLCoprocedurePool::coprocedureInvokerCoro( continue; } +#ifdef SHOW_DEBUG LL_DEBUGS("CoProcMgr") << "Finished coprocedure(" << coproc->mName << ")" << " in pool \"" << mPoolName << "\"" << LL_ENDL; +#endif mActiveCoprocsCount--; }