Commit 55aa640f authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo Committed by Ingo Molnar

perf session: Remove redundant prefix & suffix from perf_event_ops

Since now all that we have are perf event handlers, leave just
the name of the event.
Signed-off-by: default avatarArnaldo 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-9-git-send-email-acme@infradead.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent f7d87444
...@@ -451,10 +451,10 @@ static void perf_session__find_annotations(struct perf_session *self) ...@@ -451,10 +451,10 @@ static void perf_session__find_annotations(struct perf_session *self)
} }
static struct perf_event_ops event_ops = { static struct perf_event_ops event_ops = {
.process_sample_event = process_sample_event, .sample = process_sample_event,
.process_mmap_event = event__process_mmap, .mmap = event__process_mmap,
.process_comm_event = event__process_comm, .comm = event__process_comm,
.process_fork_event = event__process_task, .fork = event__process_task,
}; };
static int __cmd_annotate(void) static int __cmd_annotate(void)
......
...@@ -66,12 +66,12 @@ static int diff__process_sample_event(event_t *event, struct perf_session *sessi ...@@ -66,12 +66,12 @@ static int diff__process_sample_event(event_t *event, struct perf_session *sessi
} }
static struct perf_event_ops event_ops = { static struct perf_event_ops event_ops = {
.process_sample_event = diff__process_sample_event, .sample = diff__process_sample_event,
.process_mmap_event = event__process_mmap, .mmap = event__process_mmap,
.process_comm_event = event__process_comm, .comm = event__process_comm,
.process_exit_event = event__process_task, .exit = event__process_task,
.process_fork_event = event__process_task, .fork = event__process_task,
.process_lost_event = event__process_lost, .lost = event__process_lost,
}; };
static void perf_session__insert_hist_entry_by_name(struct rb_root *root, static void perf_session__insert_hist_entry_by_name(struct rb_root *root,
......
...@@ -343,8 +343,8 @@ static int process_sample_event(event_t *event, struct perf_session *session) ...@@ -343,8 +343,8 @@ static int process_sample_event(event_t *event, struct perf_session *session)
} }
static struct perf_event_ops event_ops = { static struct perf_event_ops event_ops = {
.process_sample_event = process_sample_event, .sample = process_sample_event,
.process_comm_event = event__process_comm, .comm = event__process_comm,
}; };
static double fragmentation(unsigned long n_req, unsigned long n_alloc) static double fragmentation(unsigned long n_req, unsigned long n_alloc)
......
...@@ -184,13 +184,13 @@ static int perf_session__setup_sample_type(struct perf_session *self) ...@@ -184,13 +184,13 @@ static int perf_session__setup_sample_type(struct perf_session *self)
} }
static struct perf_event_ops event_ops = { static struct perf_event_ops event_ops = {
.process_sample_event = process_sample_event, .sample = process_sample_event,
.process_mmap_event = event__process_mmap, .mmap = event__process_mmap,
.process_comm_event = event__process_comm, .comm = event__process_comm,
.process_exit_event = event__process_task, .exit = event__process_task,
.process_fork_event = event__process_task, .fork = event__process_task,
.process_lost_event = event__process_lost, .lost = event__process_lost,
.process_read_event = process_read_event, .read = process_read_event,
}; };
static int __cmd_report(void) static int __cmd_report(void)
......
...@@ -1654,9 +1654,9 @@ static int process_lost_event(event_t *event __used, ...@@ -1654,9 +1654,9 @@ static int process_lost_event(event_t *event __used,
} }
static struct perf_event_ops event_ops = { static struct perf_event_ops event_ops = {
.process_sample_event = process_sample_event, .sample = process_sample_event,
.process_comm_event = event__process_comm, .comm = event__process_comm,
.process_lost_event = process_lost_event, .lost = process_lost_event,
}; };
static int read_events(void) static int read_events(void)
......
...@@ -1030,10 +1030,10 @@ static void process_samples(struct perf_session *session) ...@@ -1030,10 +1030,10 @@ static void process_samples(struct perf_session *session)
} }
static struct perf_event_ops event_ops = { static struct perf_event_ops event_ops = {
.process_comm_event = process_comm_event, .comm = process_comm_event,
.process_fork_event = process_fork_event, .fork = process_fork_event,
.process_exit_event = process_exit_event, .exit = process_exit_event,
.process_sample_event = queue_sample_event, .sample = queue_sample_event,
}; };
static int __cmd_timechart(void) static int __cmd_timechart(void)
......
...@@ -104,8 +104,8 @@ static int process_sample_event(event_t *event, struct perf_session *session) ...@@ -104,8 +104,8 @@ static int process_sample_event(event_t *event, struct perf_session *session)
} }
static struct perf_event_ops event_ops = { static struct perf_event_ops event_ops = {
.process_sample_event = process_sample_event, .sample = process_sample_event,
.process_comm_event = event__process_comm, .comm = event__process_comm,
}; };
static int __cmd_trace(struct perf_session *session) static int __cmd_trace(struct perf_session *session)
......
...@@ -161,24 +161,24 @@ static int process_event_stub(event_t *event __used, ...@@ -161,24 +161,24 @@ static int process_event_stub(event_t *event __used,
static void perf_event_ops__fill_defaults(struct perf_event_ops *handler) static void perf_event_ops__fill_defaults(struct perf_event_ops *handler)
{ {
if (handler->process_sample_event == NULL) if (handler->sample == NULL)
handler->process_sample_event = process_event_stub; handler->sample = process_event_stub;
if (handler->process_mmap_event == NULL) if (handler->mmap == NULL)
handler->process_mmap_event = process_event_stub; handler->mmap = process_event_stub;
if (handler->process_comm_event == NULL) if (handler->comm == NULL)
handler->process_comm_event = process_event_stub; handler->comm = process_event_stub;
if (handler->process_fork_event == NULL) if (handler->fork == NULL)
handler->process_fork_event = process_event_stub; handler->fork = process_event_stub;
if (handler->process_exit_event == NULL) if (handler->exit == NULL)
handler->process_exit_event = process_event_stub; handler->exit = process_event_stub;
if (handler->process_lost_event == NULL) if (handler->lost == NULL)
handler->process_lost_event = process_event_stub; handler->lost = process_event_stub;
if (handler->process_read_event == NULL) if (handler->read == NULL)
handler->process_read_event = process_event_stub; handler->read = process_event_stub;
if (handler->process_throttle_event == NULL) if (handler->throttle == NULL)
handler->process_throttle_event = process_event_stub; handler->throttle = process_event_stub;
if (handler->process_unthrottle_event == NULL) if (handler->unthrottle == NULL)
handler->process_unthrottle_event = process_event_stub; handler->unthrottle = process_event_stub;
} }
static const char *event__name[] = { static const char *event__name[] = {
...@@ -222,23 +222,23 @@ static int perf_session__process_event(struct perf_session *self, ...@@ -222,23 +222,23 @@ static int perf_session__process_event(struct perf_session *self,
switch (event->header.type) { switch (event->header.type) {
case PERF_RECORD_SAMPLE: case PERF_RECORD_SAMPLE:
return ops->process_sample_event(event, self); return ops->sample(event, self);
case PERF_RECORD_MMAP: case PERF_RECORD_MMAP:
return ops->process_mmap_event(event, self); return ops->mmap(event, self);
case PERF_RECORD_COMM: case PERF_RECORD_COMM:
return ops->process_comm_event(event, self); return ops->comm(event, self);
case PERF_RECORD_FORK: case PERF_RECORD_FORK:
return ops->process_fork_event(event, self); return ops->fork(event, self);
case PERF_RECORD_EXIT: case PERF_RECORD_EXIT:
return ops->process_exit_event(event, self); return ops->exit(event, self);
case PERF_RECORD_LOST: case PERF_RECORD_LOST:
return ops->process_lost_event(event, self); return ops->lost(event, self);
case PERF_RECORD_READ: case PERF_RECORD_READ:
return ops->process_read_event(event, self); return ops->read(event, self);
case PERF_RECORD_THROTTLE: case PERF_RECORD_THROTTLE:
return ops->process_throttle_event(event, self); return ops->throttle(event, self);
case PERF_RECORD_UNTHROTTLE: case PERF_RECORD_UNTHROTTLE:
return ops->process_unthrottle_event(event, self); return ops->unthrottle(event, self);
default: default:
self->unknown_events++; self->unknown_events++;
return -1; return -1;
......
...@@ -32,15 +32,15 @@ struct perf_session { ...@@ -32,15 +32,15 @@ struct perf_session {
typedef int (*event_op)(event_t *self, struct perf_session *session); typedef int (*event_op)(event_t *self, struct perf_session *session);
struct perf_event_ops { struct perf_event_ops {
event_op process_sample_event; event_op sample,
event_op process_mmap_event; mmap,
event_op process_comm_event; comm,
event_op process_fork_event; fork,
event_op process_exit_event; exit,
event_op process_lost_event; lost,
event_op process_read_event; read,
event_op process_throttle_event; throttle,
event_op process_unthrottle_event; unthrottle;
}; };
struct perf_session *perf_session__new(const char *filename, int mode, bool force); struct perf_session *perf_session__new(const char *filename, int mode, bool force);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment