summaryrefslogtreecommitdiff
path: root/simpleperf/dwarf_unwind.cpp
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2015-10-01 11:32:44 -0700
committerYabin Cui <yabinc@google.com>2015-10-01 11:35:21 -0700
commit8a52e97bfd6e2c59ef48fedb277168a7bfbeec46 (patch)
treefd39c055d29ef1aa8426dacc2ba36964523e1106 /simpleperf/dwarf_unwind.cpp
parent482fe9e37737e5d6c7d0a4e0fe303e7d097971aa (diff)
downloadextras-8a52e97bfd6e2c59ef48fedb277168a7bfbeec46.tar.gz
Simpleperf: warn if it can't read kernel symbols addresses.
And a little format adjustment. Bug: 24404256 Change-Id: Ie8dcd37138a693df18101d415e6e3243f4963582
Diffstat (limited to 'simpleperf/dwarf_unwind.cpp')
-rw-r--r--simpleperf/dwarf_unwind.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/simpleperf/dwarf_unwind.cpp b/simpleperf/dwarf_unwind.cpp
index cd51a13c..1d0f7ae0 100644
--- a/simpleperf/dwarf_unwind.cpp
+++ b/simpleperf/dwarf_unwind.cpp
@@ -23,12 +23,12 @@
#include "thread_tree.h"
-#define SetUContextReg(dst, perf_regno) \
- do { \
- uint64_t value; \
+#define SetUContextReg(dst, perf_regno) \
+ do { \
+ uint64_t value; \
if (GetRegValue(regs, perf_regno, &value)) { \
- dst = value; \
- } \
+ dst = value; \
+ } \
} while (0)
static ucontext_t BuildUContextFromRegs(const RegSet& regs __attribute__((unused))) {
@@ -94,8 +94,7 @@ static ucontext_t BuildUContextFromRegs(const RegSet& regs __attribute__((unused
return ucontext;
}
-std::vector<uint64_t> UnwindCallChain(const ThreadEntry& thread,
- const RegSet& regs,
+std::vector<uint64_t> UnwindCallChain(const ThreadEntry& thread, const RegSet& regs,
const std::vector<char>& stack) {
std::vector<uint64_t> result;
if (GetCurrentArch() != GetBuildArch()) {