提交 31d337c4 编写于 作者: A Arnaldo Carvalho de Melo 提交者: Ingo Molnar

perf session: Move total_unknown to perf_session->unknown events

As this is a session property, not belonging to perf_event_ops,
that can be shared by many perf_session instances.
Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1261957026-15580-7-git-send-email-acme@infradead.org>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 d549c769
......@@ -66,6 +66,7 @@ struct perf_session *perf_session__new(const char *filename, int mode, bool forc
self->mmap_window = 32;
self->cwd = NULL;
self->cwdlen = 0;
self->unknown_events = 0;
map_groups__init(&self->kmaps);
if (perf_session__create_kernel_maps(self) < 0)
......@@ -239,7 +240,7 @@ static int perf_session__process_event(struct perf_session *self,
case PERF_RECORD_UNTHROTTLE:
return ops->process_unthrottle_event(event, self);
default:
ops->total_unknown++;
self->unknown_events++;
return -1;
}
}
......
......@@ -20,6 +20,7 @@ struct perf_session {
struct thread *last_match;
struct events_stats events_stats;
unsigned long event_total[PERF_RECORD_MAX];
unsigned long unknown_events;
struct rb_root hists;
u64 sample_type;
int fd;
......@@ -40,7 +41,6 @@ struct perf_event_ops {
event_op process_read_event;
event_op process_throttle_event;
event_op process_unthrottle_event;
unsigned long total_unknown;
bool full_paths;
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册