perf session: Add storage for seperating event types in report
authorEric B Munson <ebmunson@us.ibm.com>
Fri, 5 Mar 2010 15:51:07 +0000 (12:51 -0300)
committerIngo Molnar <mingo@elte.hu>
Wed, 10 Mar 2010 12:53:48 +0000 (13:53 +0100)
This patch adds the structures necessary to count each event
type independently in perf report.

Signed-off-by: Eric B Munson <ebmunson@us.ibm.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1267804269-22660-4-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
tools/perf/util/event.h
tools/perf/util/session.c
tools/perf/util/session.h

index 50a7132887f57eab20c6e57b70fb1258cd8f259b..a33b94952e34ee122d6183648ac1a4af00272e1c 100644 (file)
@@ -99,6 +99,15 @@ struct events_stats {
        u64 lost;
 };
 
+struct event_stat_id {
+       struct rb_node          rb_node;
+       struct rb_root          hists;
+       struct events_stats     stats;
+       u64                     config;
+       u64                     event_stream;
+       u32                     type;
+};
+
 void event__print_totals(void);
 
 struct perf_session;
index 0de7258e70a5bfc2373bc73787b0da5e65ed4d76..eed1cb889008b429283525a3f14046912c7c81ce 100644 (file)
@@ -70,6 +70,7 @@ struct perf_session *perf_session__new(const char *filename, int mode, bool forc
 
        memcpy(self->filename, filename, len);
        self->threads = RB_ROOT;
+       self->stats_by_id = RB_ROOT;
        self->last_match = NULL;
        self->mmap_window = 32;
        self->cwd = NULL;
index 31950fcd8a4d4cfcb5db948ad41a7f7371c2b584..5c33417eebb396599d77caa15798e5bce5293063 100644 (file)
@@ -20,6 +20,7 @@ struct perf_session {
        struct thread           *last_match;
        struct map              *vmlinux_maps[MAP__NR_TYPES];
        struct events_stats     events_stats;
+       struct rb_root          stats_by_id;
        unsigned long           event_total[PERF_RECORD_MAX];
        unsigned long           unknown_events;
        struct rb_root          hists;