Home | History | Annotate | Download | only in perf
      1 /****************************************************************************
      2  ****************************************************************************
      3  ***
      4  ***   This header was automatically generated from a Linux kernel header
      5  ***   of the same name, to make information necessary for userspace to
      6  ***   call into the kernel available to libc.  It contains only constants,
      7  ***   structures, and macros generated from the original header, and thus,
      8  ***   contains no copyrightable information.
      9  ***
     10  ***   To edit the content of this header, modify the corresponding
     11  ***   source file (e.g. under external/kernel-headers/original/) then
     12  ***   run bionic/libc/kernel/tools/update_all.py
     13  ***
     14  ***   Any manual change here will be lost the next time this script will
     15  ***   be run. You've been warned!
     16  ***
     17  ****************************************************************************
     18  ****************************************************************************/
     19 #ifndef _PERF_PERF_H
     20 #define _PERF_PERF_H
     21 #ifdef __i386__
     22 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     23 #define rmb() asm volatile("lock; addl $0,0(%%esp)" : : : "memory")
     24 #define cpu_relax() asm volatile("rep; nop" : : : "memory");
     25 #define CPUINFO_PROC "model name"
     26 #ifndef __NR_perf_event_open
     27 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     28 #define __NR_perf_event_open 336
     29 #endif
     30 #endif
     31 #ifdef __x86_64__
     32 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     33 #define rmb() asm volatile("lfence" : : : "memory")
     34 #define cpu_relax() asm volatile("rep; nop" : : : "memory");
     35 #define CPUINFO_PROC "model name"
     36 #ifndef __NR_perf_event_open
     37 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     38 #define __NR_perf_event_open 298
     39 #endif
     40 #endif
     41 #ifdef __powerpc__
     42 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     43 #define rmb() asm volatile("sync" : : : "memory")
     44 #define cpu_relax() asm volatile("" : : : "memory");
     45 #define CPUINFO_PROC "cpu"
     46 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     47 #endif
     48 #ifdef __s390__
     49 #define rmb() asm volatile("bcr 15,0" : : : "memory")
     50 #define cpu_relax() asm volatile("" : : : "memory");
     51 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     52 #endif
     53 #ifdef __sh__
     54 #if defined(__SH4A__) || defined(__SH5__)
     55 #define rmb() asm volatile("synco" : : : "memory")
     56 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     57 #else
     58 #define rmb() asm volatile("" : : : "memory")
     59 #endif
     60 #define cpu_relax() asm volatile("" : : : "memory")
     61 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     62 #define CPUINFO_PROC "cpu type"
     63 #endif
     64 #ifdef __hppa__
     65 #define rmb() asm volatile("" : : : "memory")
     66 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     67 #define cpu_relax() asm volatile("" : : : "memory");
     68 #define CPUINFO_PROC "cpu"
     69 #endif
     70 #ifdef __sparc__
     71 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     72 #define rmb() asm volatile("" : : : "memory")
     73 #define cpu_relax() asm volatile("" : : : "memory")
     74 #define CPUINFO_PROC "cpu"
     75 #endif
     76 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     77 #ifdef __alpha__
     78 #define rmb() asm volatile("mb" : : : "memory")
     79 #define cpu_relax() asm volatile("" : : : "memory")
     80 #define CPUINFO_PROC "cpu model"
     81 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     82 #endif
     83 #ifdef __ia64__
     84 #define rmb() asm volatile("mf" : : : "memory")
     85 #define cpu_relax() asm volatile("hint @pause" : : : "memory")
     86 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     87 #define CPUINFO_PROC "model name"
     88 #endif
     89 #ifdef __arm__
     90 #define rmb() ((void(*) (void)) 0xffff0fa0) ()
     91 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     92 #define cpu_relax() asm volatile("" : : : "memory")
     93 #define CPUINFO_PROC "Processor"
     94 #endif
     95 #ifdef __aarch64__
     96 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     97 #define rmb() asm volatile("dmb ld" : : : "memory")
     98 #define cpu_relax() asm volatile("yield" : : : "memory")
     99 #endif
    100 #ifdef __mips__
    101 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    102 #define rmb() asm volatile(".set	mips2\n\t" "sync\n\t" ".set	mips0" : : : "memory")
    103 #define cpu_relax() asm volatile("" : : : "memory")
    104 #define CPUINFO_PROC "cpu model"
    105 #endif
    106 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    107 #ifdef __arc__
    108 #define rmb() asm volatile("" : : : "memory")
    109 #define cpu_relax() rmb()
    110 #define CPUINFO_PROC "Processor"
    111 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    112 #endif
    113 #ifdef __metag__
    114 #define rmb() asm volatile("" : : : "memory")
    115 #define cpu_relax() asm volatile("" : : : "memory")
    116 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    117 #define CPUINFO_PROC "CPU"
    118 #endif
    119 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    120 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    121 #define PR_TASK_PERF_EVENTS_DISABLE 31
    122 #define PR_TASK_PERF_EVENTS_ENABLE 32
    123 #ifndef NSEC_PER_SEC
    124 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    125 #define NSEC_PER_SEC 1000000000ULL
    126 #endif
    127 #ifndef NSEC_PER_USEC
    128 #define NSEC_PER_USEC 1000ULL
    129 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    130 #endif
    131 #define __user
    132 #define asmlinkage
    133 #define unlikely(x) __builtin_expect(! ! (x), 0)
    134 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    135 #define min(x,y) ({ typeof(x) _min1 = (x); typeof(y) _min2 = (y); (void) (& _min1 == & _min2); _min1 < _min2 ? _min1 : _min2; })
    136 #define MAX_COUNTERS 256
    137 #define MAX_NR_CPUS 256
    138 struct ip_callchain {
    139 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    140   u64 nr;
    141   u64 ips[0];
    142 };
    143 struct branch_flags {
    144 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    145   u64 mispred : 1;
    146   u64 predicted : 1;
    147   u64 reserved : 62;
    148 };
    149 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    150 struct branch_entry {
    151   u64 from;
    152   u64 to;
    153   struct branch_flags flags;
    154 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    155 };
    156 struct branch_stack {
    157   u64 nr;
    158   struct branch_entry entries[0];
    159 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    160 };
    161 enum perf_call_graph_mode {
    162   CALLCHAIN_NONE,
    163 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    164   CALLCHAIN_FP,
    165   CALLCHAIN_DWARF
    166 };
    167 struct perf_record_opts {
    168 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    169   struct perf_target target;
    170   int call_graph;
    171   bool group;
    172   bool inherit_stat;
    173 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    174   bool no_delay;
    175   bool no_inherit;
    176   bool no_samples;
    177   bool pipe_output;
    178 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    179   bool raw_samples;
    180   bool sample_address;
    181   bool sample_weight;
    182   bool sample_time;
    183 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    184   bool period;
    185   unsigned int freq;
    186   unsigned int mmap_pages;
    187   unsigned int user_freq;
    188 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    189   u64 branch_stack;
    190   u64 default_interval;
    191   u64 user_interval;
    192   u16 stack_dump_size;
    193 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    194 };
    195 #endif
    196 
    197