summaryrefslogtreecommitdiff
path: root/simpleperf/dwarf_unwind.h
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2015-08-13 20:30:20 -0700
committerYabin Cui <yabinc@google.com>2015-09-23 19:44:05 -0700
commit3c8c21345478816dd0c70c096090b564c91bd9d2 (patch)
tree541b439ad845e2fa2d08681de96ce3501f5a694d /simpleperf/dwarf_unwind.h
parent260e7e2c07b1738581c7f0620be6e674ec1a66d1 (diff)
downloadextras-3c8c21345478816dd0c70c096090b564c91bd9d2.tar.gz
Simpleperf: support dwarf callgraph in report command.
Use libbacktrace for stack unwinding. Bug: 22229391 Change-Id: Iab35cdb52936c65c4728e23423ded83050f1db76
Diffstat (limited to 'simpleperf/dwarf_unwind.h')
-rw-r--r--simpleperf/dwarf_unwind.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/simpleperf/dwarf_unwind.h b/simpleperf/dwarf_unwind.h
new file mode 100644
index 00000000..f6a58a1e
--- /dev/null
+++ b/simpleperf/dwarf_unwind.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef SIMPLE_PERF_DWARF_UNWIND_H_
+#define SIMPLE_PERF_DWARF_UNWIND_H_
+
+#include <vector>
+
+#include "perf_regs.h"
+
+struct ThreadEntry;
+
+std::vector<uint64_t> UnwindCallChain(const ThreadEntry& thread, const RegSet& regs,
+ const std::vector<char>& stack);
+
+#endif // SIMPLE_PERF_DWARF_UNWIND_H_