]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - tools/perf/util/session.h
perf: Generalize perf lock's sample event reordering to the session layer
[net-next-2.6.git] / tools / perf / util / session.h
index 5e47c87b92663d907f5e8947928763f80955eb3b..796e2291ebd723068486869d20172c5297f3b5cf 100644 (file)
@@ -8,9 +8,17 @@
 #include <linux/rbtree.h>
 #include "../../../include/linux/perf_event.h"
 
+struct sample_queue;
 struct ip_callchain;
 struct thread;
 
+struct ordered_samples {
+       u64                     last_flush;
+       u64                     flush_limit;
+       struct list_head        samples_head;
+       struct sample_queue     *last_inserted;
+};
+
 struct perf_session {
        struct perf_header      header;
        unsigned long           size;
@@ -28,6 +36,7 @@ struct perf_session {
        bool                    fd_pipe;
        int                     cwdlen;
        char                    *cwd;
+       struct ordered_samples  ordered_samples;
        char filename[0];
 };
 
@@ -47,6 +56,7 @@ struct perf_event_ops {
                 event_type,
                 tracing_data,
                 build_id;
+       bool    ordered_samples;
 };
 
 struct perf_session *perf_session__new(const char *filename, int mode, bool force);