summaryrefslogtreecommitdiffstats
path: root/include/utils
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2013-03-21 17:12:40 -0700
committerAlex Ray <aray@google.com>2013-07-30 13:57:01 -0700
commitd34a8cad1efa1c8da1c7b5ad81226b822064cf73 (patch)
tree232169b5cab9d411190c45aec246dd7b935df82f /include/utils
parentda8ec4b634ffc165fc12f8ae2671d61e684bd248 (diff)
downloadsystem_core-d34a8cad1efa1c8da1c7b5ad81226b822064cf73.zip
system_core-d34a8cad1efa1c8da1c7b5ad81226b822064cf73.tar.gz
system_core-d34a8cad1efa1c8da1c7b5ad81226b822064cf73.tar.bz2
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 'include/utils')
-rw-r--r--include/utils/CallStack.h6
1 files changed, 4 insertions, 2 deletions
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 @@ public:
};
CallStack();
+ CallStack(const char* logtag, int32_t ignoreDepth=1,
+ int32_t maxDepth=MAX_DEPTH);
CallStack(const CallStack& rhs);
~CallStack();
@@ -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;