summaryrefslogtreecommitdiff
path: root/simpleperf/perf_regs.h
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2015-07-13 12:23:54 -0700
committerYabin Cui <yabinc@google.com>2015-07-13 15:52:53 -0700
commit76769e502d8f0ebf5d2c81b00246727fb0a59925 (patch)
treebff1eec2973b5258dcf4532770725c38389c4d0f /simpleperf/perf_regs.h
parent60bbb93d988a5f797b316341b9447ca9ef011603 (diff)
downloadextras-76769e502d8f0ebf5d2c81b00246727fb0a59925.tar.gz
Simpleperf: Support dwarf callgraph recording.
1. add OS_RELEASE and ARCH feature in perf.data. ARCH feature is used when parsing recorded user registers. 2. support `--call-graph dwarf` option in record command. Bug: 22229391 Change-Id: I56dbdd101338658ce6a9b59aa8be90e712e007f5
Diffstat (limited to 'simpleperf/perf_regs.h')
-rw-r--r--simpleperf/perf_regs.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/simpleperf/perf_regs.h b/simpleperf/perf_regs.h
new file mode 100644
index 00000000..a3aff8db
--- /dev/null
+++ b/simpleperf/perf_regs.h
@@ -0,0 +1,41 @@
+/*
+ * 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_PERF_REGS_H_
+#define SIMPLE_PERF_PERF_REGS_H_
+
+#include <asm-x86/asm/perf_regs.h>
+#include <asm-arm/asm/perf_regs.h>
+#define perf_event_arm_regs perf_event_arm64_regs
+#include <asm-arm64/asm/perf_regs.h>
+#include <stdint.h>
+#include <string>
+
+enum ArchType {
+ ARCH_X86_32,
+ ARCH_X86_64,
+ ARCH_ARM,
+ ARCH_ARM64,
+};
+
+ArchType GetCurrentArch();
+bool SetCurrentArch(const std::string& arch);
+
+uint64_t GetSupportedRegMask();
+
+std::string GetRegName(size_t reg);
+
+#endif // SIMPLE_PERF_PERF_REGS_H_