summaryrefslogtreecommitdiffstats
path: root/app/perfregisterinfo.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@theqtcompany.com>2015-02-23 15:34:11 +0100
committerUlf Hermann <ulf.hermann@theqtcompany.com>2015-03-04 11:18:30 +0200
commitcf23d7740f54b8c53409e70eea244d984a27e537 (patch)
tree5b271f50c2a77822c8aee5cb05520f9ddbe5073a /app/perfregisterinfo.h
parent7b6a8e42b5428038614faa2f44fc252f4bfd5f0a (diff)
Add elfutils to source tree and integrate build system
We only import the relevant parts of elfutils, leaving out the original build system, support for bzip2 and lzma compression, source code of the elfutils command line utilities, tests, and libcpu. Change-Id: I7c15cff880a7ab6d84e272c8b18f854f97539a1f Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'app/perfregisterinfo.h')
-rw-r--r--app/perfregisterinfo.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/app/perfregisterinfo.h b/app/perfregisterinfo.h
new file mode 100644
index 0000000..c834694
--- /dev/null
+++ b/app/perfregisterinfo.h
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd
+** All rights reserved.
+** For any questions to The Qt Company, please use contact form at http://www.qt.io/contact-us
+**
+** This file is part of the Qt Enterprise Perf Profiler Add-on.
+**
+** GNU General Public License Usage
+** This file may be used under the terms of the GNU General Public License
+** version 3 as published by the Free Software Foundation and appearing in
+** the file LICENSE.GPLv3 included in the packaging of this file. Please
+** review the following information to ensure the GNU General Public License
+** requirements will be met: https://www.gnu.org/licenses/gpl.html.
+**
+** If you have questions regarding the use of this file, please use
+** contact form at http://www.qt.io/contact-us
+**
+****************************************************************************/
+
+#ifndef PERFREGISTERINFO_H
+#define PERFREGISTERINFO_H
+
+#include <QtGlobal>
+
+class PerfRegisterInfo
+{
+public:
+ enum Architecture {
+ ARCH_ARM = 0,
+ ARCH_ARM64,
+ ARCH_POWERPC,
+ ARCH_S390,
+ ARCH_SH,
+ ARCH_SPARC,
+ ARCH_X86,
+ ARCH_INVALID
+ };
+
+ static const uint s_numAbis = 2; // maybe more for some archs?
+
+ static const char *s_archNames[ARCH_INVALID];
+ static const uint s_numRegisters[ARCH_INVALID][s_numAbis];
+
+ // Translation table for converting perf register layout to dwarf register layout
+ // This is specific to ABI as the different ABIs may have different numbers of registers.
+ static const uint *s_perfToDwarf[ARCH_INVALID][s_numAbis];
+
+ // location of IP register or equivalent in perf register layout for each arch/abi
+ // This is not specific to ABI as perf makes sure IP is always in the same spot
+ static const uint s_perfIp[ARCH_INVALID];
+ // location of SP register or equivalent in perf register layout for each arch/abi
+ static const uint s_perfSp[ARCH_INVALID];
+};
+
+#endif // PERFREGISTERINFO_H