]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - include/linux/perf_event.h
Merge tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
[mirror_ubuntu-bionic-kernel.git] / include / linux / perf_event.h
index 5fc494f4a094bcec403cd599dec29ab62658a9fa..bd9f55a5958d4cd982190292076123fcb3fd6ea6 100644 (file)
@@ -192,6 +192,8 @@ enum perf_event_read_format {
 };
 
 #define PERF_ATTR_SIZE_VER0    64      /* sizeof first published struct */
+#define PERF_ATTR_SIZE_VER1    72      /* add: config2 */
+#define PERF_ATTR_SIZE_VER2    80      /* add: branch_sample_type */
 
 /*
  * Hardware event_id to monitor via a performance monitoring event:
@@ -746,6 +748,11 @@ struct pmu {
         * if no implementation is provided it will default to: event->hw.idx + 1.
         */
        int (*event_idx)                (struct perf_event *event); /*optional */
+
+       /*
+        * flush branch stack on context-switches (needed in cpu-wide mode)
+        */
+       void (*flush_branch_stack)      (void);
 };
 
 /**
@@ -979,7 +986,8 @@ struct perf_event_context {
        u64                             parent_gen;
        u64                             generation;
        int                             pin_count;
-       int                             nr_cgroups; /* cgroup events present */
+       int                             nr_cgroups;      /* cgroup evts */
+       int                             nr_branch_stack; /* branch_stack evt */
        struct rcu_head                 rcu_head;
 };
 
@@ -1044,6 +1052,7 @@ perf_event_create_kernel_counter(struct perf_event_attr *attr,
 extern u64 perf_event_read_value(struct perf_event *event,
                                 u64 *enabled, u64 *running);
 
+
 struct perf_sample_data {
        u64                             type;