aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/perf/builtin-annotate.c8
-rw-r--r--tools/perf/builtin-diff.c12
-rw-r--r--tools/perf/builtin-kmem.c4
-rw-r--r--tools/perf/builtin-report.c14
-rw-r--r--tools/perf/builtin-sched.c6
-rw-r--r--tools/perf/builtin-timechart.c8
-rw-r--r--tools/perf/builtin-trace.c4
-rw-r--r--tools/perf/util/session.c54
-rw-r--r--tools/perf/util/session.h18
9 files changed, 64 insertions, 64 deletions
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index 593ff25006de..117bbae844bf 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -451,10 +451,10 @@ static void perf_session__find_annotations(struct perf_session *self)
451} 451}
452 452
453static struct perf_event_ops event_ops = { 453static struct perf_event_ops event_ops = {
454 .process_sample_event = process_sample_event, 454 .sample = process_sample_event,
455 .process_mmap_event = event__process_mmap, 455 .mmap = event__process_mmap,
456 .process_comm_event = event__process_comm, 456 .comm = event__process_comm,
457 .process_fork_event = event__process_task, 457 .fork = event__process_task,
458}; 458};
459 459
460static int __cmd_annotate(void) 460static int __cmd_annotate(void)
diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
index e164b3d45cd4..1cbecaf029fa 100644
--- a/tools/perf/builtin-diff.c
+++ b/tools/perf/builtin-diff.c
@@ -66,12 +66,12 @@ static int diff__process_sample_event(event_t *event, struct perf_session *sessi
66} 66}
67 67
68static struct perf_event_ops event_ops = { 68static struct perf_event_ops event_ops = {
69 .process_sample_event = diff__process_sample_event, 69 .sample = diff__process_sample_event,
70 .process_mmap_event = event__process_mmap, 70 .mmap = event__process_mmap,
71 .process_comm_event = event__process_comm, 71 .comm = event__process_comm,
72 .process_exit_event = event__process_task, 72 .exit = event__process_task,
73 .process_fork_event = event__process_task, 73 .fork = event__process_task,
74 .process_lost_event = event__process_lost, 74 .lost = event__process_lost,
75}; 75};
76 76
77static void perf_session__insert_hist_entry_by_name(struct rb_root *root, 77static void perf_session__insert_hist_entry_by_name(struct rb_root *root,
diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
index 73b065022e27..4c06828fe39d 100644
--- a/tools/perf/builtin-kmem.c
+++ b/tools/perf/builtin-kmem.c
@@ -343,8 +343,8 @@ static int process_sample_event(event_t *event, struct perf_session *session)
343} 343}
344 344
345static struct perf_event_ops event_ops = { 345static struct perf_event_ops event_ops = {
346 .process_sample_event = process_sample_event, 346 .sample = process_sample_event,
347 .process_comm_event = event__process_comm, 347 .comm = event__process_comm,
348}; 348};
349 349
350static double fragmentation(unsigned long n_req, unsigned long n_alloc) 350static double fragmentation(unsigned long n_req, unsigned long n_alloc)
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index f695084910c0..508934b0140a 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -184,13 +184,13 @@ static int perf_session__setup_sample_type(struct perf_session *self)
184} 184}
185 185
186static struct perf_event_ops event_ops = { 186static struct perf_event_ops event_ops = {
187 .process_sample_event = process_sample_event, 187 .sample = process_sample_event,
188 .process_mmap_event = event__process_mmap, 188 .mmap = event__process_mmap,
189 .process_comm_event = event__process_comm, 189 .comm = event__process_comm,
190 .process_exit_event = event__process_task, 190 .exit = event__process_task,
191 .process_fork_event = event__process_task, 191 .fork = event__process_task,
192 .process_lost_event = event__process_lost, 192 .lost = event__process_lost,
193 .process_read_event = process_read_event, 193 .read = process_read_event,
194}; 194};
195 195
196static int __cmd_report(void) 196static int __cmd_report(void)
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index e862e71f4e68..702322f8fec1 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -1654,9 +1654,9 @@ static int process_lost_event(event_t *event __used,
1654} 1654}
1655 1655
1656static struct perf_event_ops event_ops = { 1656static struct perf_event_ops event_ops = {
1657 .process_sample_event = process_sample_event, 1657 .sample = process_sample_event,
1658 .process_comm_event = event__process_comm, 1658 .comm = event__process_comm,
1659 .process_lost_event = process_lost_event, 1659 .lost = process_lost_event,
1660}; 1660};
1661 1661
1662static int read_events(void) 1662static int read_events(void)
diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c
index 825283794985..5b68d81d93a1 100644
--- a/tools/perf/builtin-timechart.c
+++ b/tools/perf/builtin-timechart.c
@@ -1030,10 +1030,10 @@ static void process_samples(struct perf_session *session)
1030} 1030}
1031 1031
1032static struct perf_event_ops event_ops = { 1032static struct perf_event_ops event_ops = {
1033 .process_comm_event = process_comm_event, 1033 .comm = process_comm_event,
1034 .process_fork_event = process_fork_event, 1034 .fork = process_fork_event,
1035 .process_exit_event = process_exit_event, 1035 .exit = process_exit_event,
1036 .process_sample_event = queue_sample_event, 1036 .sample = queue_sample_event,
1037}; 1037};
1038 1038
1039static int __cmd_timechart(void) 1039static int __cmd_timechart(void)
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index e94f34631585..1831434aa938 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -104,8 +104,8 @@ static int process_sample_event(event_t *event, struct perf_session *session)
104} 104}
105 105
106static struct perf_event_ops event_ops = { 106static struct perf_event_ops event_ops = {
107 .process_sample_event = process_sample_event, 107 .sample = process_sample_event,
108 .process_comm_event = event__process_comm, 108 .comm = event__process_comm,
109}; 109};
110 110
111static int __cmd_trace(struct perf_session *session) 111static int __cmd_trace(struct perf_session *session)
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 4f2eeb584da8..7f0537d1add8 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -161,24 +161,24 @@ static int process_event_stub(event_t *event __used,
161 161
162static void perf_event_ops__fill_defaults(struct perf_event_ops *handler) 162static void perf_event_ops__fill_defaults(struct perf_event_ops *handler)
163{ 163{
164 if (handler->process_sample_event == NULL) 164 if (handler->sample == NULL)
165 handler->process_sample_event = process_event_stub; 165 handler->sample = process_event_stub;
166 if (handler->process_mmap_event == NULL) 166 if (handler->mmap == NULL)
167 handler->process_mmap_event = process_event_stub; 167 handler->mmap = process_event_stub;
168 if (handler->process_comm_event == NULL) 168 if (handler->comm == NULL)
169 handler->process_comm_event = process_event_stub; 169 handler->comm = process_event_stub;
170 if (handler->process_fork_event == NULL) 170 if (handler->fork == NULL)
171 handler->process_fork_event = process_event_stub; 171 handler->fork = process_event_stub;
172 if (handler->process_exit_event == NULL) 172 if (handler->exit == NULL)
173 handler->process_exit_event = process_event_stub; 173 handler->exit = process_event_stub;
174 if (handler->process_lost_event == NULL) 174 if (handler->lost == NULL)
175 handler->process_lost_event = process_event_stub; 175 handler->lost = process_event_stub;
176 if (handler->process_read_event == NULL) 176 if (handler->read == NULL)
177 handler->process_read_event = process_event_stub; 177 handler->read = process_event_stub;
178 if (handler->process_throttle_event == NULL) 178 if (handler->throttle == NULL)
179 handler->process_throttle_event = process_event_stub; 179 handler->throttle = process_event_stub;
180 if (handler->process_unthrottle_event == NULL) 180 if (handler->unthrottle == NULL)
181 handler->process_unthrottle_event = process_event_stub; 181 handler->unthrottle = process_event_stub;
182} 182}
183 183
184static const char *event__name[] = { 184static const char *event__name[] = {
@@ -222,23 +222,23 @@ static int perf_session__process_event(struct perf_session *self,
222 222
223 switch (event->header.type) { 223 switch (event->header.type) {
224 case PERF_RECORD_SAMPLE: 224 case PERF_RECORD_SAMPLE:
225 return ops->process_sample_event(event, self); 225 return ops->sample(event, self);
226 case PERF_RECORD_MMAP: 226 case PERF_RECORD_MMAP:
227 return ops->process_mmap_event(event, self); 227 return ops->mmap(event, self);
228 case PERF_RECORD_COMM: 228 case PERF_RECORD_COMM:
229 return ops->process_comm_event(event, self); 229 return ops->comm(event, self);
230 case PERF_RECORD_FORK: 230 case PERF_RECORD_FORK:
231 return ops->process_fork_event(event, self); 231 return ops->fork(event, self);
232 case PERF_RECORD_EXIT: 232 case PERF_RECORD_EXIT:
233 return ops->process_exit_event(event, self); 233 return ops->exit(event, self);
234 case PERF_RECORD_LOST: 234 case PERF_RECORD_LOST:
235 return ops->process_lost_event(event, self); 235 return ops->lost(event, self);
236 case PERF_RECORD_READ: 236 case PERF_RECORD_READ:
237 return ops->process_read_event(event, self); 237 return ops->read(event, self);
238 case PERF_RECORD_THROTTLE: 238 case PERF_RECORD_THROTTLE:
239 return ops->process_throttle_event(event, self); 239 return ops->throttle(event, self);
240 case PERF_RECORD_UNTHROTTLE: 240 case PERF_RECORD_UNTHROTTLE:
241 return ops->process_unthrottle_event(event, self); 241 return ops->unthrottle(event, self);
242 default: 242 default:
243 self->unknown_events++; 243 self->unknown_events++;
244 return -1; 244 return -1;
diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h
index 2ff77fea06ef..77c5ee2993c2 100644
--- a/tools/perf/util/session.h
+++ b/tools/perf/util/session.h
@@ -32,15 +32,15 @@ struct perf_session {
32typedef int (*event_op)(event_t *self, struct perf_session *session); 32typedef int (*event_op)(event_t *self, struct perf_session *session);
33 33
34struct perf_event_ops { 34struct perf_event_ops {
35 event_op process_sample_event; 35 event_op sample,
36 event_op process_mmap_event; 36 mmap,
37 event_op process_comm_event; 37 comm,
38 event_op process_fork_event; 38 fork,
39 event_op process_exit_event; 39 exit,
40 event_op process_lost_event; 40 lost,
41 event_op process_read_event; 41 read,
42 event_op process_throttle_event; 42 throttle,
43 event_op process_unthrottle_event; 43 unthrottle;
44}; 44};
45 45
46struct perf_session *perf_session__new(const char *filename, int mode, bool force); 46struct perf_session *perf_session__new(const char *filename, int mode, bool force);