~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/perf/util/perf-regs-arch/perf_regs_x86.c

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 // SPDX-License-Identifier: GPL-2.0
  2 
  3 #include "../perf_regs.h"
  4 #include "../../../arch/x86/include/uapi/asm/perf_regs.h"
  5 
  6 const char *__perf_reg_name_x86(int id)
  7 {
  8         switch (id) {
  9         case PERF_REG_X86_AX:
 10                 return "AX";
 11         case PERF_REG_X86_BX:
 12                 return "BX";
 13         case PERF_REG_X86_CX:
 14                 return "CX";
 15         case PERF_REG_X86_DX:
 16                 return "DX";
 17         case PERF_REG_X86_SI:
 18                 return "SI";
 19         case PERF_REG_X86_DI:
 20                 return "DI";
 21         case PERF_REG_X86_BP:
 22                 return "BP";
 23         case PERF_REG_X86_SP:
 24                 return "SP";
 25         case PERF_REG_X86_IP:
 26                 return "IP";
 27         case PERF_REG_X86_FLAGS:
 28                 return "FLAGS";
 29         case PERF_REG_X86_CS:
 30                 return "CS";
 31         case PERF_REG_X86_SS:
 32                 return "SS";
 33         case PERF_REG_X86_DS:
 34                 return "DS";
 35         case PERF_REG_X86_ES:
 36                 return "ES";
 37         case PERF_REG_X86_FS:
 38                 return "FS";
 39         case PERF_REG_X86_GS:
 40                 return "GS";
 41         case PERF_REG_X86_R8:
 42                 return "R8";
 43         case PERF_REG_X86_R9:
 44                 return "R9";
 45         case PERF_REG_X86_R10:
 46                 return "R10";
 47         case PERF_REG_X86_R11:
 48                 return "R11";
 49         case PERF_REG_X86_R12:
 50                 return "R12";
 51         case PERF_REG_X86_R13:
 52                 return "R13";
 53         case PERF_REG_X86_R14:
 54                 return "R14";
 55         case PERF_REG_X86_R15:
 56                 return "R15";
 57 
 58 #define XMM(x) \
 59         case PERF_REG_X86_XMM ## x:     \
 60         case PERF_REG_X86_XMM ## x + 1: \
 61                 return "XMM" #x;
 62         XMM(0)
 63         XMM(1)
 64         XMM(2)
 65         XMM(3)
 66         XMM(4)
 67         XMM(5)
 68         XMM(6)
 69         XMM(7)
 70         XMM(8)
 71         XMM(9)
 72         XMM(10)
 73         XMM(11)
 74         XMM(12)
 75         XMM(13)
 76         XMM(14)
 77         XMM(15)
 78 #undef XMM
 79         default:
 80                 return NULL;
 81         }
 82 
 83         return NULL;
 84 }
 85 
 86 uint64_t __perf_reg_ip_x86(void)
 87 {
 88         return PERF_REG_X86_IP;
 89 }
 90 
 91 uint64_t __perf_reg_sp_x86(void)
 92 {
 93         return PERF_REG_X86_SP;
 94 }
 95 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php