summaryrefslogtreecommitdiff
path: root/libs/utils/RefBase.cpp
diff options
context:
space:
mode:
author Mathias Agopian <mathias@google.com> 2013-03-21 17:12:40 -0700
committer Mathias Agopian <mathias@google.com> 2013-03-21 17:12:40 -0700
commitcab25d680e644d962041d05a319e485b96136a5d (patch)
tree9ce3a3084a90a448bdb67270a1735686b3593d36 /libs/utils/RefBase.cpp
parent7c1a487ba8c0a3b591a77e2ddcb33ef9bdfaff64 (diff)
improved CallStack a bit
- added a ctor that updates and dumps the stack immediately - added a "logtag" parameter to dump() Change-Id: Ie51c256071d282591752243bdb4f68cf9ff8829d
Diffstat (limited to 'libs/utils/RefBase.cpp')
-rw-r--r--libs/utils/RefBase.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/libs/utils/RefBase.cpp b/libs/utils/RefBase.cpp
index 3d3a595953..e538f6868c 100644
--- a/libs/utils/RefBase.cpp
+++ b/libs/utils/RefBase.cpp
@@ -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;
}
@@ -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);
}
}
@@ -269,9 +267,7 @@ private:
ref = ref->next;
}
- CallStack stack;
- stack.update();
- stack.dump();
+ CallStack stack(LOG_TAG);
}
}