Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi...
[safe/jmp/linux-2.6] / include / linux / perf_counter.h
index bcbf1c4..5e970c7 100644 (file)
@@ -178,8 +178,10 @@ struct perf_counter_attr {
                                mmap           :  1, /* include mmap data     */
                                comm           :  1, /* include comm data     */
                                freq           :  1, /* use freq, not period  */
+                               inherit_stat   :  1, /* per task counts       */
+                               enable_on_exec :  1, /* next exec enables     */
 
-                               __reserved_1   : 53;
+                               __reserved_1   : 51;
 
        __u32                   wakeup_events;  /* wakeup every n events */
        __u32                   __reserved_2;
@@ -261,7 +263,6 @@ struct perf_counter_mmap_page {
 #define PERF_EVENT_MISC_KERNEL                 (1 << 0)
 #define PERF_EVENT_MISC_USER                   (2 << 0)
 #define PERF_EVENT_MISC_HYPERVISOR             (3 << 0)
-#define PERF_EVENT_MISC_OVERFLOW               (1 << 2)
 
 struct perf_event_header {
        __u32   type;
@@ -335,9 +336,18 @@ enum perf_event_type {
        PERF_EVENT_FORK                 = 7,
 
        /*
-        * When header.misc & PERF_EVENT_MISC_OVERFLOW the event_type field
-        * will be PERF_SAMPLE_*
-        *
+        * struct {
+        *      struct perf_event_header        header;
+        *      u32                             pid, tid;
+        *      u64                             value;
+        *      { u64           time_enabled;   } && PERF_FORMAT_ENABLED
+        *      { u64           time_running;   } && PERF_FORMAT_RUNNING
+        *      { u64           parent_id;      } && PERF_FORMAT_ID
+        * };
+        */
+       PERF_EVENT_READ                 = 8,
+
+       /*
         * struct {
         *      struct perf_event_header        header;
         *
@@ -345,8 +355,9 @@ enum perf_event_type {
         *      { u32                   pid, tid; } && PERF_SAMPLE_TID
         *      { u64                   time;     } && PERF_SAMPLE_TIME
         *      { u64                   addr;     } && PERF_SAMPLE_ADDR
-        *      { u64                   config;   } && PERF_SAMPLE_CONFIG
+        *      { u64                   id;       } && PERF_SAMPLE_ID
         *      { u32                   cpu, res; } && PERF_SAMPLE_CPU
+        *      { u64                   period;   } && PERF_SAMPLE_PERIOD
         *
         *      { u64                   nr;
         *        { u64 id, val; }      cnt[nr];  } && PERF_SAMPLE_GROUP
@@ -355,6 +366,9 @@ enum perf_event_type {
         *        u64                   ips[nr];  } && PERF_SAMPLE_CALLCHAIN
         * };
         */
+       PERF_EVENT_SAMPLE               = 9,
+
+       PERF_EVENT_MAX,                 /* non-ABI */
 };
 
 enum perf_callchain_context {
@@ -590,6 +604,7 @@ struct perf_counter_context {
        int                             nr_counters;
        int                             nr_active;
        int                             is_active;
+       int                             nr_stat;
        atomic_t                        refcount;
        struct task_struct              *task;