diff options
author | Luke Diamand <ldiamand@roku.com> | 2018-07-10 19:56:28 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-05-03 12:45:18 +0000 |
commit | 4af511bad9827fd8a2e6bf925ccfbcb1276a4f6f (patch) | |
tree | b06b3f0c397f2ad4989b7f0887ea7296e7d29e99 | |
parent | f459a8ba6cb3f004411124328766cd1e2d4c9cd1 (diff) |
Add initial MIPS support
Supports perf reports from MIPS targets.
MIPS/perf isn't really supported on the mainstream Linux kernel, but
there are a number of patches around which can be used to build
working perf support:
https://lkml.org/lkml/2016/4/1/162
This change just adds the definitions required by hotspot to
support this.
Change-Id: Ifa569c6e33e743c4d239b1ae0448b28aa026d051
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
-rw-r--r-- | app/perfregisterinfo.cpp | 9 | ||||
-rw-r--r-- | app/perfregisterinfo.h | 1 |
2 files changed, 9 insertions, 1 deletions
diff --git a/app/perfregisterinfo.cpp b/app/perfregisterinfo.cpp index 3217faa..2e69d5e 100644 --- a/app/perfregisterinfo.cpp +++ b/app/perfregisterinfo.cpp @@ -52,6 +52,9 @@ static int aarch64[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, static int x86[] = {0, 2, 3, 1, 7, 6, 4, 5, 8}; static int x86_64[] = {0, 3, 2, 1, 4, 5, 6, 7, 16, 17, 18, 19, 20, 21, 22, 23, 8}; +static int mips[] = { 32, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 28, 29, 30, 31}; + static int none[] = {0}; const int *PerfRegisterInfo::s_perfToDwarf[PerfRegisterInfo::ARCH_INVALID][PerfRegisterInfo::s_numAbis] = { @@ -61,7 +64,8 @@ const int *PerfRegisterInfo::s_perfToDwarf[PerfRegisterInfo::ARCH_INVALID][PerfR {none, none }, {none, none }, {none, none }, - {x86, x86_64 } + {x86, x86_64 }, + {mips, mips }, }; const int PerfRegisterInfo::s_perfIp[ARCH_INVALID] = { @@ -148,5 +152,8 @@ PerfRegisterInfo::Architecture PerfRegisterInfo::archByName(const QByteArray &na || name == "amd64") return ARCH_X86; + if (name.startsWith("mips")) + return ARCH_MIPS; + return ARCH_INVALID; } diff --git a/app/perfregisterinfo.h b/app/perfregisterinfo.h index 1a4ed74..2274925 100644 --- a/app/perfregisterinfo.h +++ b/app/perfregisterinfo.h @@ -33,6 +33,7 @@ public: ARCH_SH, ARCH_SPARC, ARCH_X86, + ARCH_MIPS, ARCH_INVALID }; |