summaryrefslogtreecommitdiffstats
path: root/libutils/ProcessCallStack.cpp
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2014-01-09 23:41:13 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-01-09 23:41:14 +0000
commitb18f93ea5d57b8dff31c6cc706c6b4f32180c0c8 (patch)
treebde917eef3e385029bee6bd87682705a709ef331 /libutils/ProcessCallStack.cpp
parentb0751101b090a8732c62ad261fa44e5d6a69a2cc (diff)
parent038ac694b36de2b081e62fcfb9b5f4a8c918c533 (diff)
downloadsystem_core-b18f93ea5d57b8dff31c6cc706c6b4f32180c0c8.zip
system_core-b18f93ea5d57b8dff31c6cc706c6b4f32180c0c8.tar.gz
system_core-b18f93ea5d57b8dff31c6cc706c6b4f32180c0c8.tar.bz2
Merge "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());