Merge git://git.infradead.org/users/eparis/audit
[firefly-linux-kernel-4.4.55.git] / include / linux / perf_event.h
index 707617a8c0f6c647b8f3c9d210b833638c20eb02..893a0d07986f526b1402ef19238f6e2dccd70973 100644 (file)
@@ -52,6 +52,7 @@ struct perf_guest_info_callbacks {
 #include <linux/atomic.h>
 #include <linux/sysfs.h>
 #include <linux/perf_regs.h>
+#include <linux/workqueue.h>
 #include <asm/local.h>
 
 struct perf_callchain_entry {
@@ -268,6 +269,7 @@ struct pmu {
  * enum perf_event_active_state - the states of a event
  */
 enum perf_event_active_state {
+       PERF_EVENT_STATE_EXIT           = -3,
        PERF_EVENT_STATE_ERROR          = -2,
        PERF_EVENT_STATE_OFF            = -1,
        PERF_EVENT_STATE_INACTIVE       =  0,
@@ -507,6 +509,9 @@ struct perf_event_context {
        int                             nr_cgroups;      /* cgroup evts */
        int                             nr_branch_stack; /* branch_stack evt */
        struct rcu_head                 rcu_head;
+
+       struct delayed_work             orphans_remove;
+       bool                            orphans_remove_sched;
 };
 
 /*
@@ -604,6 +609,13 @@ struct perf_sample_data {
        u64                             txn;
 };
 
+/* default value for data source */
+#define PERF_MEM_NA (PERF_MEM_S(OP, NA)   |\
+                   PERF_MEM_S(LVL, NA)   |\
+                   PERF_MEM_S(SNOOP, NA) |\
+                   PERF_MEM_S(LOCK, NA)  |\
+                   PERF_MEM_S(TLB, NA))
+
 static inline void perf_sample_data_init(struct perf_sample_data *data,
                                         u64 addr, u64 period)
 {
@@ -616,7 +628,7 @@ static inline void perf_sample_data_init(struct perf_sample_data *data,
        data->regs_user.regs = NULL;
        data->stack_user_size = 0;
        data->weight = 0;
-       data->data_src.val = 0;
+       data->data_src.val = PERF_MEM_NA;
        data->txn = 0;
 }