Mgerge remote-tracking branch 'torvalds/master' into perf/core
[linux-2.6-microblaze.git] / tools / include / uapi / linux / perf_event.h
index 21a1edd..077e7ee 100644 (file)
@@ -383,7 +383,8 @@ struct perf_event_attr {
                                bpf_event      :  1, /* include bpf events */
                                aux_output     :  1, /* generate AUX records instead of events */
                                cgroup         :  1, /* include cgroup events */
-                               __reserved_1   : 31;
+                               text_poke      :  1, /* include text poke events */
+                               __reserved_1   : 30;
 
        union {
                __u32           wakeup_events;    /* wakeup every n events */
@@ -1041,12 +1042,35 @@ enum perf_event_type {
         */
        PERF_RECORD_CGROUP                      = 19,
 
+       /*
+        * Records changes to kernel text i.e. self-modified code. 'old_len' is
+        * the number of old bytes, 'new_len' is the number of new bytes. Either
+        * 'old_len' or 'new_len' may be zero to indicate, for example, the
+        * addition or removal of a trampoline. 'bytes' contains the old bytes
+        * followed immediately by the new bytes.
+        *
+        * struct {
+        *      struct perf_event_header        header;
+        *      u64                             addr;
+        *      u16                             old_len;
+        *      u16                             new_len;
+        *      u8                              bytes[];
+        *      struct sample_id                sample_id;
+        * };
+        */
+       PERF_RECORD_TEXT_POKE                   = 20,
+
        PERF_RECORD_MAX,                        /* non-ABI */
 };
 
 enum perf_record_ksymbol_type {
        PERF_RECORD_KSYMBOL_TYPE_UNKNOWN        = 0,
        PERF_RECORD_KSYMBOL_TYPE_BPF            = 1,
+       /*
+        * Out of line code such as kprobe-replaced instructions or optimized
+        * kprobes or ftrace trampolines.
+        */
+       PERF_RECORD_KSYMBOL_TYPE_OOL            = 2,
        PERF_RECORD_KSYMBOL_TYPE_MAX            /* non-ABI */
 };