]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - include/linux/perf_counter.h
tracing: Add perf counter support for syscalls tracing
[net-next-2.6.git] / include / linux / perf_counter.h
index a67dd5c5b6d3b72db134d4d81ed9a0c0aa6d9be9..8e6460fb4c023a3aa6e335880bb062fc803ba2a9 100644 (file)
@@ -121,7 +121,7 @@ enum perf_counter_sample_format {
        PERF_SAMPLE_CPU                         = 1U << 7,
        PERF_SAMPLE_PERIOD                      = 1U << 8,
        PERF_SAMPLE_STREAM_ID                   = 1U << 9,
-       PERF_SAMPLE_TP_RECORD                   = 1U << 10,
+       PERF_SAMPLE_RAW                         = 1U << 10,
 
        PERF_SAMPLE_MAX = 1U << 11,             /* non-ABI */
 };
@@ -369,6 +369,8 @@ enum perf_event_type {
         *
         *      { u64                   nr,
         *        u64                   ips[nr];  } && PERF_SAMPLE_CALLCHAIN
+        *      { u32                   size;
+        *        char                  data[size];}&& PERF_SAMPLE_RAW
         * };
         */
        PERF_EVENT_SAMPLE               = 9,
@@ -414,9 +416,9 @@ struct perf_callchain_entry {
        __u64                           ip[PERF_MAX_STACK_DEPTH];
 };
 
-struct perf_tracepoint_record {
-       int                             size;
-       char                            *record;
+struct perf_raw_record {
+       u32                             size;
+       void                            *data;
 };
 
 struct task_struct;
@@ -687,7 +689,7 @@ struct perf_sample_data {
        struct pt_regs                  *regs;
        u64                             addr;
        u64                             period;
-       void                            *private;
+       struct perf_raw_record          *raw;
 };
 
 extern int perf_counter_overflow(struct perf_counter *counter, int nmi,
@@ -732,6 +734,8 @@ extern int sysctl_perf_counter_mlock;
 extern int sysctl_perf_counter_sample_rate;
 
 extern void perf_counter_init(void);
+extern void perf_tpcounter_event(int event_id, u64 addr, u64 count,
+                                void *record, int entry_size);
 
 #ifndef perf_misc_flags
 #define perf_misc_flags(regs)  (user_mode(regs) ? PERF_EVENT_MISC_USER : \