summaryrefslogtreecommitdiffstats
path: root/libutils/ProcessCallStack.cpp
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2014-01-09 15:46:44 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2014-01-09 15:46:44 -0800
commit5d2ec87bf54dc8a02e6bcbe5848fd378056b8f78 (patch)
tree1eb9f8ee585943223b4a2e6a814774265f025842 /libutils/ProcessCallStack.cpp
parentc121c69b856bfa9baea105439fbdac648d154097 (diff)
parentb18f93ea5d57b8dff31c6cc706c6b4f32180c0c8 (diff)
downloadsystem_core-5d2ec87bf54dc8a02e6bcbe5848fd378056b8f78.zip
system_core-5d2ec87bf54dc8a02e6bcbe5848fd378056b8f78.tar.gz
system_core-5d2ec87bf54dc8a02e6bcbe5848fd378056b8f78.tar.bz2
am b18f93ea: Merge "Move CallStack to libbacktrace."
* commit 'b18f93ea5d57b8dff31c6cc706c6b4f32180c0c8': Move CallStack to libbacktrace.
Diffstat (limited to 'libutils/ProcessCallStack.cpp')
-rw-r--r--libutils/ProcessCallStack.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/libutils/ProcessCallStack.cpp b/libutils/ProcessCallStack.cpp
index f9340c5..f837bcb 100644
--- a/libutils/ProcessCallStack.cpp
+++ b/libutils/ProcessCallStack.cpp
@@ -123,7 +123,7 @@ void ProcessCallStack::clear() {
mTimeUpdated = tm();
}
-void ProcessCallStack::update(int32_t maxDepth) {
+void ProcessCallStack::update() {
DIR *dp;
struct dirent *ep;
struct dirent entry;
@@ -181,14 +181,13 @@ void ProcessCallStack::update(int32_t maxDepth) {
int ignoreDepth = (selfPid == tid) ? IGNORE_DEPTH_CURRENT_THREAD : 0;
// Update thread's call stacks
- CallStack& cs = threadInfo.callStack;
- cs.update(ignoreDepth, maxDepth, tid);
+ threadInfo.callStack.update(ignoreDepth, tid);
// Read/save thread name
threadInfo.threadName = getThreadName(tid);
ALOGV("%s: Got call stack for tid %d (size %zu)",
- __FUNCTION__, tid, cs.size());
+ __FUNCTION__, tid, threadInfo.callStack.size());
}
if (code != 0) { // returns positive error value on error
ALOGE("%s: Failed to readdir from %s (errno = %d, '%s')",
@@ -221,13 +220,12 @@ void ProcessCallStack::printInternal(Printer& printer, Printer& csPrinter) const
for (size_t i = 0; i < mThreadMap.size(); ++i) {
pid_t tid = mThreadMap.keyAt(i);
const ThreadInfo& threadInfo = mThreadMap.valueAt(i);
- const CallStack& cs = threadInfo.callStack;
const String8& threadName = threadInfo.threadName;
printer.printLine("");
printer.printFormatLine("\"%s\" sysTid=%d", threadName.string(), tid);
- cs.print(csPrinter);
+ threadInfo.callStack.print(csPrinter);
}
dumpProcessFooter(printer, getpid());