improved CallStack a bit
- added a ctor that updates and dumps the stack immediately
- added a "logtag" parameter to dump()
Change-Id: Ie51c256071d282591752243bdb4f68cf9ff8829d
diff --git a/include/utils/CallStack.h b/include/utils/CallStack.h
index 079e20c..61dc832 100644
--- a/include/utils/CallStack.h
+++ b/include/utils/CallStack.h
@@ -35,6 +35,8 @@
};
CallStack();
+ CallStack(const char* logtag, int32_t ignoreDepth=1,
+ int32_t maxDepth=MAX_DEPTH);
CallStack(const CallStack& rhs);
~CallStack();
@@ -53,8 +55,8 @@
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;