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

TOMOYO Linux Cross Reference
Linux/tools/perf/perf-sys.h

Version: ~ [ linux-5.19-rc8 ] ~ [ linux-5.18.14 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.57 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.133 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.207 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.253 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.289 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.324 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.302 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ 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 #ifndef _PERF_SYS_H
  3 #define _PERF_SYS_H
  4 
  5 #include <unistd.h>
  6 #include <sys/types.h>
  7 #include <sys/syscall.h>
  8 #include <linux/types.h>
  9 #include <linux/compiler.h>
 10 #include <linux/perf_event.h>
 11 #include <asm/barrier.h>
 12 
 13 #ifdef __powerpc__
 14 #define CPUINFO_PROC    {"cpu"}
 15 #endif
 16 
 17 #ifdef __s390__
 18 #define CPUINFO_PROC    {"vendor_id"}
 19 #endif
 20 
 21 #ifdef __sh__
 22 #define CPUINFO_PROC    {"cpu type"}
 23 #endif
 24 
 25 #ifdef __hppa__
 26 #define CPUINFO_PROC    {"cpu"}
 27 #endif
 28 
 29 #ifdef __sparc__
 30 #define CPUINFO_PROC    {"cpu"}
 31 #endif
 32 
 33 #ifdef __alpha__
 34 #define CPUINFO_PROC    {"cpu model"}
 35 #endif
 36 
 37 #ifdef __arm__
 38 #define CPUINFO_PROC    {"model name", "Processor"}
 39 #endif
 40 
 41 #ifdef __mips__
 42 #define CPUINFO_PROC    {"cpu model"}
 43 #endif
 44 
 45 #ifdef __arc__
 46 #define CPUINFO_PROC    {"Processor"}
 47 #endif
 48 
 49 #ifdef __xtensa__
 50 #define CPUINFO_PROC    {"core ID"}
 51 #endif
 52 
 53 #ifndef CPUINFO_PROC
 54 #define CPUINFO_PROC    { "model name", }
 55 #endif
 56 
 57 static inline int
 58 sys_perf_event_open(struct perf_event_attr *attr,
 59                       pid_t pid, int cpu, int group_fd,
 60                       unsigned long flags)
 61 {
 62         int fd;
 63 
 64         fd = syscall(__NR_perf_event_open, attr, pid, cpu,
 65                      group_fd, flags);
 66 
 67 #ifdef HAVE_ATTR_TEST
 68         if (unlikely(test_attr__enabled))
 69                 test_attr__open(attr, pid, cpu, fd, group_fd, flags);
 70 #endif
 71         return fd;
 72 }
 73 
 74 #endif /* _PERF_SYS_H */
 75 

~ [ 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