Skip to content
Snippets Groups Projects
Commit d5a20f55 authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Hide a few hot debug messages

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