diff options
Diffstat (limited to 'tools/perf/util')
-rw-r--r-- | tools/perf/util/event.c | 6 | ||||
-rw-r--r-- | tools/perf/util/event.h | 5 | ||||
-rw-r--r-- | tools/perf/util/session.h | 3 |
3 files changed, 5 insertions, 9 deletions
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index 222efb1fc3bd..375fb6dca1cf 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c | |||
@@ -187,8 +187,6 @@ void event__synthesize_threads(int (*process)(event_t *event, | |||
187 | closedir(proc); | 187 | closedir(proc); |
188 | } | 188 | } |
189 | 189 | ||
190 | struct events_stats event__stats; | ||
191 | |||
192 | int event__process_comm(event_t *self, struct perf_session *session) | 190 | int event__process_comm(event_t *self, struct perf_session *session) |
193 | { | 191 | { |
194 | struct thread *thread = perf_session__findnew(session, self->comm.pid); | 192 | struct thread *thread = perf_session__findnew(session, self->comm.pid); |
@@ -203,10 +201,10 @@ int event__process_comm(event_t *self, struct perf_session *session) | |||
203 | return 0; | 201 | return 0; |
204 | } | 202 | } |
205 | 203 | ||
206 | int event__process_lost(event_t *self, struct perf_session *session __used) | 204 | int event__process_lost(event_t *self, struct perf_session *session) |
207 | { | 205 | { |
208 | dump_printf(": id:%Ld: lost:%Ld\n", self->lost.id, self->lost.lost); | 206 | dump_printf(": id:%Ld: lost:%Ld\n", self->lost.id, self->lost.lost); |
209 | event__stats.lost += self->lost.lost; | 207 | session->events_stats.lost += self->lost.lost; |
210 | return 0; | 208 | return 0; |
211 | } | 209 | } |
212 | 210 | ||
diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index 035ecf3c25cc..a92e0b039a6a 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h | |||
@@ -168,11 +168,6 @@ void event__synthesize_threads(int (*process)(event_t *event, | |||
168 | struct perf_session *session), | 168 | struct perf_session *session), |
169 | struct perf_session *session); | 169 | struct perf_session *session); |
170 | 170 | ||
171 | extern char *event__cwd; | ||
172 | extern int event__cwdlen; | ||
173 | extern struct events_stats event__stats; | ||
174 | extern unsigned long event__total[PERF_RECORD_MAX]; | ||
175 | |||
176 | int event__process_comm(event_t *self, struct perf_session *session); | 171 | int event__process_comm(event_t *self, struct perf_session *session); |
177 | int event__process_lost(event_t *self, struct perf_session *session); | 172 | int event__process_lost(event_t *self, struct perf_session *session); |
178 | int event__process_mmap(event_t *self, struct perf_session *session); | 173 | int event__process_mmap(event_t *self, struct perf_session *session); |
diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h index 4e8a21c5304c..bdfc4b8eee7a 100644 --- a/tools/perf/util/session.h +++ b/tools/perf/util/session.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #include "header.h" | 5 | #include "header.h" |
6 | #include "thread.h" | 6 | #include "thread.h" |
7 | #include <linux/rbtree.h> | 7 | #include <linux/rbtree.h> |
8 | #include "../../../include/linux/perf_event.h" | ||
8 | 9 | ||
9 | struct ip_callchain; | 10 | struct ip_callchain; |
10 | struct thread; | 11 | struct thread; |
@@ -18,6 +19,8 @@ struct perf_session { | |||
18 | struct map_groups kmaps; | 19 | struct map_groups kmaps; |
19 | struct rb_root threads; | 20 | struct rb_root threads; |
20 | struct thread *last_match; | 21 | struct thread *last_match; |
22 | struct events_stats events_stats; | ||
23 | unsigned long event_total[PERF_RECORD_MAX]; | ||
21 | struct rb_root hists; | 24 | struct rb_root hists; |
22 | u64 sample_type; | 25 | u64 sample_type; |
23 | int fd; | 26 | int fd; |