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

TOMOYO Linux Cross Reference
Linux/tools/perf/arch/x86/include/perf_regs.h

Version: ~ [ linux-5.5-rc1 ] ~ [ linux-5.4.2 ] ~ [ linux-5.3.15 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.88 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.158 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.206 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.206 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.78 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef ARCH_PERF_REGS_H
  2 #define ARCH_PERF_REGS_H
  3 
  4 #include <stdlib.h>
  5 #include <linux/types.h>
  6 #include <asm/perf_regs.h>
  7 
  8 void perf_regs_load(u64 *regs);
  9 
 10 #ifndef HAVE_ARCH_X86_64_SUPPORT
 11 #define PERF_REGS_MASK ((1ULL << PERF_REG_X86_32_MAX) - 1)
 12 #define PERF_REGS_MAX PERF_REG_X86_32_MAX
 13 #define PERF_SAMPLE_REGS_ABI PERF_SAMPLE_REGS_ABI_32
 14 #else
 15 #define REG_NOSUPPORT ((1ULL << PERF_REG_X86_DS) | \
 16                        (1ULL << PERF_REG_X86_ES) | \
 17                        (1ULL << PERF_REG_X86_FS) | \
 18                        (1ULL << PERF_REG_X86_GS))
 19 #define PERF_REGS_MASK (((1ULL << PERF_REG_X86_64_MAX) - 1) & ~REG_NOSUPPORT)
 20 #define PERF_REGS_MAX PERF_REG_X86_64_MAX
 21 #define PERF_SAMPLE_REGS_ABI PERF_SAMPLE_REGS_ABI_64
 22 #endif
 23 #define PERF_REG_IP PERF_REG_X86_IP
 24 #define PERF_REG_SP PERF_REG_X86_SP
 25 
 26 static inline const char *perf_reg_name(int id)
 27 {
 28         switch (id) {
 29         case PERF_REG_X86_AX:
 30                 return "AX";
 31         case PERF_REG_X86_BX:
 32                 return "BX";
 33         case PERF_REG_X86_CX:
 34                 return "CX";
 35         case PERF_REG_X86_DX:
 36                 return "DX";
 37         case PERF_REG_X86_SI:
 38                 return "SI";
 39         case PERF_REG_X86_DI:
 40                 return "DI";
 41         case PERF_REG_X86_BP:
 42                 return "BP";
 43         case PERF_REG_X86_SP:
 44                 return "SP";
 45         case PERF_REG_X86_IP:
 46                 return "IP";
 47         case PERF_REG_X86_FLAGS:
 48                 return "FLAGS";
 49         case PERF_REG_X86_CS:
 50                 return "CS";
 51         case PERF_REG_X86_SS:
 52                 return "SS";
 53         case PERF_REG_X86_DS:
 54                 return "DS";
 55         case PERF_REG_X86_ES:
 56                 return "ES";
 57         case PERF_REG_X86_FS:
 58                 return "FS";
 59         case PERF_REG_X86_GS:
 60                 return "GS";
 61 #ifdef HAVE_ARCH_X86_64_SUPPORT
 62         case PERF_REG_X86_R8:
 63                 return "R8";
 64         case PERF_REG_X86_R9:
 65                 return "R9";
 66         case PERF_REG_X86_R10:
 67                 return "R10";
 68         case PERF_REG_X86_R11:
 69                 return "R11";
 70         case PERF_REG_X86_R12:
 71                 return "R12";
 72         case PERF_REG_X86_R13:
 73                 return "R13";
 74         case PERF_REG_X86_R14:
 75                 return "R14";
 76         case PERF_REG_X86_R15:
 77                 return "R15";
 78 #endif /* HAVE_ARCH_X86_64_SUPPORT */
 79         default:
 80                 return NULL;
 81         }
 82 
 83         return NULL;
 84 }
 85 
 86 #endif /* ARCH_PERF_REGS_H */
 87 

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

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | 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.

osdn.jp