diff options
| author | 2013-03-21 17:12:40 -0700 | |
|---|---|---|
| committer | 2013-03-21 17:12:40 -0700 | |
| commit | cab25d680e644d962041d05a319e485b96136a5d (patch) | |
| tree | 9ce3a3084a90a448bdb67270a1735686b3593d36 /include/utils/CallStack.h | |
| parent | 7c1a487ba8c0a3b591a77e2ddcb33ef9bdfaff64 (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 'include/utils/CallStack.h')
| -rw-r--r-- | include/utils/CallStack.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/utils/CallStack.h b/include/utils/CallStack.h index 079e20c696..61dc832ea3 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; |