Loading include/utils/CallStack.h +4 −2 Original line number Diff line number Diff line Loading @@ -35,6 +35,8 @@ public: }; CallStack(); CallStack(const char* logtag, int32_t ignoreDepth=1, int32_t maxDepth=MAX_DEPTH); CallStack(const CallStack& rhs); ~CallStack(); Loading @@ -53,8 +55,8 @@ public: void update(int32_t ignoreDepth=1, int32_t maxDepth=MAX_DEPTH); // Dump a stack trace to the log void dump(const char* prefix = 0) const; // Dump a stack trace to the log using the supplied logtag void dump(const char* logtag, const char* prefix = 0) const; // Return a string (possibly very long) containing the complete stack trace String8 toString(const char* prefix = 0) const; Loading libs/binder/IMemory.cpp +1 −3 Original line number Diff line number Diff line Loading @@ -246,9 +246,7 @@ BpMemoryHeap::~BpMemoryHeap() { if (VERBOSE) { ALOGD("UNMAPPING binder=%p, heap=%p, size=%d, fd=%d", binder.get(), this, mSize, mHeapId); CallStack stack; stack.update(); stack.dump("callstack"); CallStack stack(LOG_TAG); } munmap(mBase, mSize); Loading libs/ui/Region.cpp +1 −3 Original line number Diff line number Diff line Loading @@ -530,9 +530,7 @@ bool Region::validate(const Region& reg, const char* name, bool silent) } if (result == false && !silent) { reg.dump(name); CallStack stack; stack.update(); stack.dump(""); CallStack stack(LOG_TAG); } return result; } Loading libs/utils/CallStack.cpp +9 −2 Original line number Diff line number Diff line Loading @@ -30,6 +30,11 @@ CallStack::CallStack() : mCount(0) { } CallStack::CallStack(const char* logtag, int32_t ignoreDepth, int32_t maxDepth) { this->update(ignoreDepth+1, maxDepth); this->dump(logtag); } CallStack::CallStack(const CallStack& rhs) : mCount(rhs.mCount) { if (mCount) { Loading Loading @@ -96,7 +101,7 @@ void CallStack::update(int32_t ignoreDepth, int32_t maxDepth) { mCount = count > 0 ? count : 0; } void CallStack::dump(const char* prefix) const { void CallStack::dump(const char* logtag, const char* prefix) const { backtrace_symbol_t symbols[mCount]; get_backtrace_symbols(mStack, mCount, symbols); Loading @@ -104,7 +109,9 @@ void CallStack::dump(const char* prefix) const { char line[MAX_BACKTRACE_LINE_LENGTH]; format_backtrace_line(i, &mStack[i], &symbols[i], line, MAX_BACKTRACE_LINE_LENGTH); ALOGD("%s%s", prefix, line); ALOG(LOG_DEBUG, logtag, "%s%s", prefix ? prefix : "", line); } free_backtrace_symbols(symbols, mCount); } Loading libs/utils/RefBase.cpp +4 −8 Original line number Diff line number Diff line Loading @@ -110,7 +110,7 @@ public: char inc = refs->ref >= 0 ? '+' : '-'; ALOGD("\t%c ID %p (ref %d):", inc, refs->id, refs->ref); #if DEBUG_REFS_CALLSTACK_ENABLED refs->stack.dump(); refs->stack.dump(LOG_TAG); #endif refs = refs->next; } Loading @@ -124,16 +124,14 @@ public: char inc = refs->ref >= 0 ? '+' : '-'; ALOGD("\t%c ID %p (ref %d):", inc, refs->id, refs->ref); #if DEBUG_REFS_CALLSTACK_ENABLED refs->stack.dump(); refs->stack.dump(LOG_TAG); #endif refs = refs->next; } } if (dumpStack) { ALOGE("above errors at:"); CallStack stack; stack.update(); stack.dump(); CallStack stack(LOG_TAG); } } Loading Loading @@ -269,9 +267,7 @@ private: ref = ref->next; } CallStack stack; stack.update(); stack.dump(); CallStack stack(LOG_TAG); } } Loading Loading
include/utils/CallStack.h +4 −2 Original line number Diff line number Diff line Loading @@ -35,6 +35,8 @@ public: }; CallStack(); CallStack(const char* logtag, int32_t ignoreDepth=1, int32_t maxDepth=MAX_DEPTH); CallStack(const CallStack& rhs); ~CallStack(); Loading @@ -53,8 +55,8 @@ public: void update(int32_t ignoreDepth=1, int32_t maxDepth=MAX_DEPTH); // Dump a stack trace to the log void dump(const char* prefix = 0) const; // Dump a stack trace to the log using the supplied logtag void dump(const char* logtag, const char* prefix = 0) const; // Return a string (possibly very long) containing the complete stack trace String8 toString(const char* prefix = 0) const; Loading
libs/binder/IMemory.cpp +1 −3 Original line number Diff line number Diff line Loading @@ -246,9 +246,7 @@ BpMemoryHeap::~BpMemoryHeap() { if (VERBOSE) { ALOGD("UNMAPPING binder=%p, heap=%p, size=%d, fd=%d", binder.get(), this, mSize, mHeapId); CallStack stack; stack.update(); stack.dump("callstack"); CallStack stack(LOG_TAG); } munmap(mBase, mSize); Loading
libs/ui/Region.cpp +1 −3 Original line number Diff line number Diff line Loading @@ -530,9 +530,7 @@ bool Region::validate(const Region& reg, const char* name, bool silent) } if (result == false && !silent) { reg.dump(name); CallStack stack; stack.update(); stack.dump(""); CallStack stack(LOG_TAG); } return result; } Loading
libs/utils/CallStack.cpp +9 −2 Original line number Diff line number Diff line Loading @@ -30,6 +30,11 @@ CallStack::CallStack() : mCount(0) { } CallStack::CallStack(const char* logtag, int32_t ignoreDepth, int32_t maxDepth) { this->update(ignoreDepth+1, maxDepth); this->dump(logtag); } CallStack::CallStack(const CallStack& rhs) : mCount(rhs.mCount) { if (mCount) { Loading Loading @@ -96,7 +101,7 @@ void CallStack::update(int32_t ignoreDepth, int32_t maxDepth) { mCount = count > 0 ? count : 0; } void CallStack::dump(const char* prefix) const { void CallStack::dump(const char* logtag, const char* prefix) const { backtrace_symbol_t symbols[mCount]; get_backtrace_symbols(mStack, mCount, symbols); Loading @@ -104,7 +109,9 @@ void CallStack::dump(const char* prefix) const { char line[MAX_BACKTRACE_LINE_LENGTH]; format_backtrace_line(i, &mStack[i], &symbols[i], line, MAX_BACKTRACE_LINE_LENGTH); ALOGD("%s%s", prefix, line); ALOG(LOG_DEBUG, logtag, "%s%s", prefix ? prefix : "", line); } free_backtrace_symbols(symbols, mCount); } Loading
libs/utils/RefBase.cpp +4 −8 Original line number Diff line number Diff line Loading @@ -110,7 +110,7 @@ public: char inc = refs->ref >= 0 ? '+' : '-'; ALOGD("\t%c ID %p (ref %d):", inc, refs->id, refs->ref); #if DEBUG_REFS_CALLSTACK_ENABLED refs->stack.dump(); refs->stack.dump(LOG_TAG); #endif refs = refs->next; } Loading @@ -124,16 +124,14 @@ public: char inc = refs->ref >= 0 ? '+' : '-'; ALOGD("\t%c ID %p (ref %d):", inc, refs->id, refs->ref); #if DEBUG_REFS_CALLSTACK_ENABLED refs->stack.dump(); refs->stack.dump(LOG_TAG); #endif refs = refs->next; } } if (dumpStack) { ALOGE("above errors at:"); CallStack stack; stack.update(); stack.dump(); CallStack stack(LOG_TAG); } } Loading Loading @@ -269,9 +267,7 @@ private: ref = ref->next; } CallStack stack; stack.update(); stack.dump(); CallStack stack(LOG_TAG); } } Loading