diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-01-29 10:02:00 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-01-29 13:25:20 -0500 |
commit | 8d50e5b4171a69cf48ca94a1e7c14033d0b4771d (patch) | |
tree | 6ebf659f92f0770917c7f47c24449ebfe048ce61 /tools | |
parent | 93fc64f14472ae24fd640bf3834a178f59142842 (diff) |
perf tools: Rename 'struct sample_data' to 'struct perf_sample'
Making the namespace more uniform.
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/builtin-annotate.c | 2 | ||||
-rw-r--r-- | tools/perf/builtin-diff.c | 2 | ||||
-rw-r--r-- | tools/perf/builtin-inject.c | 8 | ||||
-rw-r--r-- | tools/perf/builtin-kmem.c | 2 | ||||
-rw-r--r-- | tools/perf/builtin-lock.c | 2 | ||||
-rw-r--r-- | tools/perf/builtin-record.c | 2 | ||||
-rw-r--r-- | tools/perf/builtin-report.c | 36 | ||||
-rw-r--r-- | tools/perf/builtin-sched.c | 2 | ||||
-rw-r--r-- | tools/perf/builtin-script.c | 2 | ||||
-rw-r--r-- | tools/perf/builtin-test.c | 2 | ||||
-rw-r--r-- | tools/perf/builtin-timechart.c | 8 | ||||
-rw-r--r-- | tools/perf/builtin-top.c | 4 | ||||
-rw-r--r-- | tools/perf/util/build-id.c | 4 | ||||
-rw-r--r-- | tools/perf/util/event.c | 16 | ||||
-rw-r--r-- | tools/perf/util/event.h | 18 | ||||
-rw-r--r-- | tools/perf/util/evsel.c | 4 | ||||
-rw-r--r-- | tools/perf/util/session.c | 26 | ||||
-rw-r--r-- | tools/perf/util/session.h | 4 |
18 files changed, 72 insertions, 72 deletions
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index 8879463807e4..ef3675135414 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c | |||
@@ -58,7 +58,7 @@ static int hists__add_entry(struct hists *self, struct addr_location *al) | |||
58 | return hist_entry__inc_addr_samples(he, al->addr); | 58 | return hist_entry__inc_addr_samples(he, al->addr); |
59 | } | 59 | } |
60 | 60 | ||
61 | static int process_sample_event(event_t *event, struct sample_data *sample, | 61 | static int process_sample_event(event_t *event, struct perf_sample *sample, |
62 | struct perf_session *session) | 62 | struct perf_session *session) |
63 | { | 63 | { |
64 | struct addr_location al; | 64 | struct addr_location al; |
diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c index 3153e492dbcc..0822149dc768 100644 --- a/tools/perf/builtin-diff.c +++ b/tools/perf/builtin-diff.c | |||
@@ -31,7 +31,7 @@ static int hists__add_entry(struct hists *self, | |||
31 | } | 31 | } |
32 | 32 | ||
33 | static int diff__process_sample_event(event_t *event, | 33 | static int diff__process_sample_event(event_t *event, |
34 | struct sample_data *sample, | 34 | struct perf_sample *sample, |
35 | struct perf_session *session) | 35 | struct perf_session *session) |
36 | { | 36 | { |
37 | struct addr_location al; | 37 | struct addr_location al; |
diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c index 0c78ffa7bf67..4c9388ce878c 100644 --- a/tools/perf/builtin-inject.c +++ b/tools/perf/builtin-inject.c | |||
@@ -36,13 +36,13 @@ static int event__repipe_synth(event_t *event, | |||
36 | return 0; | 36 | return 0; |
37 | } | 37 | } |
38 | 38 | ||
39 | static int event__repipe(event_t *event, struct sample_data *sample __used, | 39 | static int event__repipe(event_t *event, struct perf_sample *sample __used, |
40 | struct perf_session *session) | 40 | struct perf_session *session) |
41 | { | 41 | { |
42 | return event__repipe_synth(event, session); | 42 | return event__repipe_synth(event, session); |
43 | } | 43 | } |
44 | 44 | ||
45 | static int event__repipe_mmap(event_t *self, struct sample_data *sample, | 45 | static int event__repipe_mmap(event_t *self, struct perf_sample *sample, |
46 | struct perf_session *session) | 46 | struct perf_session *session) |
47 | { | 47 | { |
48 | int err; | 48 | int err; |
@@ -53,7 +53,7 @@ static int event__repipe_mmap(event_t *self, struct sample_data *sample, | |||
53 | return err; | 53 | return err; |
54 | } | 54 | } |
55 | 55 | ||
56 | static int event__repipe_task(event_t *self, struct sample_data *sample, | 56 | static int event__repipe_task(event_t *self, struct perf_sample *sample, |
57 | struct perf_session *session) | 57 | struct perf_session *session) |
58 | { | 58 | { |
59 | int err; | 59 | int err; |
@@ -119,7 +119,7 @@ static int dso__inject_build_id(struct dso *self, struct perf_session *session) | |||
119 | return 0; | 119 | return 0; |
120 | } | 120 | } |
121 | 121 | ||
122 | static int event__inject_buildid(event_t *event, struct sample_data *sample, | 122 | static int event__inject_buildid(event_t *event, struct perf_sample *sample, |
123 | struct perf_session *session) | 123 | struct perf_session *session) |
124 | { | 124 | { |
125 | struct addr_location al; | 125 | struct addr_location al; |
diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c index d97256d65980..3c1cdcf29902 100644 --- a/tools/perf/builtin-kmem.c +++ b/tools/perf/builtin-kmem.c | |||
@@ -304,7 +304,7 @@ process_raw_event(event_t *raw_event __used, void *data, | |||
304 | } | 304 | } |
305 | } | 305 | } |
306 | 306 | ||
307 | static int process_sample_event(event_t *event, struct sample_data *sample, | 307 | static int process_sample_event(event_t *event, struct perf_sample *sample, |
308 | struct perf_session *session) | 308 | struct perf_session *session) |
309 | { | 309 | { |
310 | struct thread *thread = perf_session__findnew(session, event->ip.pid); | 310 | struct thread *thread = perf_session__findnew(session, event->ip.pid); |
diff --git a/tools/perf/builtin-lock.c b/tools/perf/builtin-lock.c index 2b36defc5d73..c3f512791344 100644 --- a/tools/perf/builtin-lock.c +++ b/tools/perf/builtin-lock.c | |||
@@ -834,7 +834,7 @@ static void dump_info(void) | |||
834 | die("Unknown type of information\n"); | 834 | die("Unknown type of information\n"); |
835 | } | 835 | } |
836 | 836 | ||
837 | static int process_sample_event(event_t *self, struct sample_data *sample, | 837 | static int process_sample_event(event_t *self, struct perf_sample *sample, |
838 | struct perf_session *s) | 838 | struct perf_session *s) |
839 | { | 839 | { |
840 | struct thread *thread = perf_session__findnew(s, sample->tid); | 840 | struct thread *thread = perf_session__findnew(s, sample->tid); |
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index caf927978d92..5d3e4b32072b 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c | |||
@@ -101,7 +101,7 @@ static void write_output(void *buf, size_t size) | |||
101 | } | 101 | } |
102 | 102 | ||
103 | static int process_synthesized_event(event_t *event, | 103 | static int process_synthesized_event(event_t *event, |
104 | struct sample_data *sample __used, | 104 | struct perf_sample *sample __used, |
105 | struct perf_session *self __used) | 105 | struct perf_session *self __used) |
106 | { | 106 | { |
107 | write_output(event, event->header.size); | 107 | write_output(event, event->header.size); |
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index f6a43493d1d0..bbbadcc04097 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c | |||
@@ -77,9 +77,9 @@ static struct hists *perf_session__hists_findnew(struct perf_session *self, | |||
77 | return new; | 77 | return new; |
78 | } | 78 | } |
79 | 79 | ||
80 | static int perf_session__add_hist_entry(struct perf_session *self, | 80 | static int perf_session__add_hist_entry(struct perf_session *session, |
81 | struct addr_location *al, | 81 | struct addr_location *al, |
82 | struct sample_data *data) | 82 | struct perf_sample *sample) |
83 | { | 83 | { |
84 | struct symbol *parent = NULL; | 84 | struct symbol *parent = NULL; |
85 | int err = 0; | 85 | int err = 0; |
@@ -87,28 +87,28 @@ static int perf_session__add_hist_entry(struct perf_session *self, | |||
87 | struct hists *hists; | 87 | struct hists *hists; |
88 | struct perf_event_attr *attr; | 88 | struct perf_event_attr *attr; |
89 | 89 | ||
90 | if ((sort__has_parent || symbol_conf.use_callchain) && data->callchain) { | 90 | if ((sort__has_parent || symbol_conf.use_callchain) && sample->callchain) { |
91 | err = perf_session__resolve_callchain(self, al->thread, | 91 | err = perf_session__resolve_callchain(session, al->thread, |
92 | data->callchain, &parent); | 92 | sample->callchain, &parent); |
93 | if (err) | 93 | if (err) |
94 | return err; | 94 | return err; |
95 | } | 95 | } |
96 | 96 | ||
97 | attr = perf_header__find_attr(data->id, &self->header); | 97 | attr = perf_header__find_attr(sample->id, &session->header); |
98 | if (attr) | 98 | if (attr) |
99 | hists = perf_session__hists_findnew(self, data->id, attr->type, attr->config); | 99 | hists = perf_session__hists_findnew(session, sample->id, attr->type, attr->config); |
100 | else | 100 | else |
101 | hists = perf_session__hists_findnew(self, data->id, 0, 0); | 101 | hists = perf_session__hists_findnew(session, sample->id, 0, 0); |
102 | if (hists == NULL) | 102 | if (hists == NULL) |
103 | return -ENOMEM; | 103 | return -ENOMEM; |
104 | 104 | ||
105 | he = __hists__add_entry(hists, al, parent, data->period); | 105 | he = __hists__add_entry(hists, al, parent, sample->period); |
106 | if (he == NULL) | 106 | if (he == NULL) |
107 | return -ENOMEM; | 107 | return -ENOMEM; |
108 | 108 | ||
109 | if (symbol_conf.use_callchain) { | 109 | if (symbol_conf.use_callchain) { |
110 | err = callchain_append(he->callchain, &self->callchain_cursor, | 110 | err = callchain_append(he->callchain, &session->callchain_cursor, |
111 | data->period); | 111 | sample->period); |
112 | if (err) | 112 | if (err) |
113 | return err; | 113 | return err; |
114 | } | 114 | } |
@@ -124,32 +124,32 @@ static int perf_session__add_hist_entry(struct perf_session *self, | |||
124 | } | 124 | } |
125 | 125 | ||
126 | static int add_event_total(struct perf_session *session, | 126 | static int add_event_total(struct perf_session *session, |
127 | struct sample_data *data, | 127 | struct perf_sample *sample, |
128 | struct perf_event_attr *attr) | 128 | struct perf_event_attr *attr) |
129 | { | 129 | { |
130 | struct hists *hists; | 130 | struct hists *hists; |
131 | 131 | ||
132 | if (attr) | 132 | if (attr) |
133 | hists = perf_session__hists_findnew(session, data->id, | 133 | hists = perf_session__hists_findnew(session, sample->id, |
134 | attr->type, attr->config); | 134 | attr->type, attr->config); |
135 | else | 135 | else |
136 | hists = perf_session__hists_findnew(session, data->id, 0, 0); | 136 | hists = perf_session__hists_findnew(session, sample->id, 0, 0); |
137 | 137 | ||
138 | if (!hists) | 138 | if (!hists) |
139 | return -ENOMEM; | 139 | return -ENOMEM; |
140 | 140 | ||
141 | hists->stats.total_period += data->period; | 141 | hists->stats.total_period += sample->period; |
142 | /* | 142 | /* |
143 | * FIXME: add_event_total should be moved from here to | 143 | * FIXME: add_event_total should be moved from here to |
144 | * perf_session__process_event so that the proper hist is passed to | 144 | * perf_session__process_event so that the proper hist is passed to |
145 | * the event_op methods. | 145 | * the event_op methods. |
146 | */ | 146 | */ |
147 | hists__inc_nr_events(hists, PERF_RECORD_SAMPLE); | 147 | hists__inc_nr_events(hists, PERF_RECORD_SAMPLE); |
148 | session->hists.stats.total_period += data->period; | 148 | session->hists.stats.total_period += sample->period; |
149 | return 0; | 149 | return 0; |
150 | } | 150 | } |
151 | 151 | ||
152 | static int process_sample_event(event_t *event, struct sample_data *sample, | 152 | static int process_sample_event(event_t *event, struct perf_sample *sample, |
153 | struct perf_session *session) | 153 | struct perf_session *session) |
154 | { | 154 | { |
155 | struct addr_location al; | 155 | struct addr_location al; |
@@ -179,7 +179,7 @@ static int process_sample_event(event_t *event, struct sample_data *sample, | |||
179 | return 0; | 179 | return 0; |
180 | } | 180 | } |
181 | 181 | ||
182 | static int process_read_event(event_t *event, struct sample_data *sample __used, | 182 | static int process_read_event(event_t *event, struct perf_sample *sample __used, |
183 | struct perf_session *session __used) | 183 | struct perf_session *session __used) |
184 | { | 184 | { |
185 | struct perf_event_attr *attr; | 185 | struct perf_event_attr *attr; |
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c index 29acb894e035..ff993c8b175d 100644 --- a/tools/perf/builtin-sched.c +++ b/tools/perf/builtin-sched.c | |||
@@ -1607,7 +1607,7 @@ process_raw_event(event_t *raw_event __used, struct perf_session *session, | |||
1607 | process_sched_migrate_task_event(data, session, event, cpu, timestamp, thread); | 1607 | process_sched_migrate_task_event(data, session, event, cpu, timestamp, thread); |
1608 | } | 1608 | } |
1609 | 1609 | ||
1610 | static int process_sample_event(event_t *event, struct sample_data *sample, | 1610 | static int process_sample_event(event_t *event, struct perf_sample *sample, |
1611 | struct perf_session *session) | 1611 | struct perf_session *session) |
1612 | { | 1612 | { |
1613 | struct thread *thread; | 1613 | struct thread *thread; |
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index b766c2a9ac97..5c4c809008af 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c | |||
@@ -63,7 +63,7 @@ static int cleanup_scripting(void) | |||
63 | 63 | ||
64 | static char const *input_name = "perf.data"; | 64 | static char const *input_name = "perf.data"; |
65 | 65 | ||
66 | static int process_sample_event(event_t *event, struct sample_data *sample, | 66 | static int process_sample_event(event_t *event, struct perf_sample *sample, |
67 | struct perf_session *session) | 67 | struct perf_session *session) |
68 | { | 68 | { |
69 | struct thread *thread = perf_session__findnew(session, event->ip.pid); | 69 | struct thread *thread = perf_session__findnew(session, event->ip.pid); |
diff --git a/tools/perf/builtin-test.c b/tools/perf/builtin-test.c index 738830d298e8..df62433a34a7 100644 --- a/tools/perf/builtin-test.c +++ b/tools/perf/builtin-test.c | |||
@@ -550,7 +550,7 @@ static int test__basic_mmap(void) | |||
550 | } | 550 | } |
551 | 551 | ||
552 | while ((event = perf_evlist__read_on_cpu(evlist, 0)) != NULL) { | 552 | while ((event = perf_evlist__read_on_cpu(evlist, 0)) != NULL) { |
553 | struct sample_data sample; | 553 | struct perf_sample sample; |
554 | 554 | ||
555 | if (event->header.type != PERF_RECORD_SAMPLE) { | 555 | if (event->header.type != PERF_RECORD_SAMPLE) { |
556 | pr_debug("unexpected %s event\n", | 556 | pr_debug("unexpected %s event\n", |
diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c index 746cf03cb05d..01cf0c3771a6 100644 --- a/tools/perf/builtin-timechart.c +++ b/tools/perf/builtin-timechart.c | |||
@@ -276,21 +276,21 @@ static int cpus_cstate_state[MAX_CPUS]; | |||
276 | static u64 cpus_pstate_start_times[MAX_CPUS]; | 276 | static u64 cpus_pstate_start_times[MAX_CPUS]; |
277 | static u64 cpus_pstate_state[MAX_CPUS]; | 277 | static u64 cpus_pstate_state[MAX_CPUS]; |
278 | 278 | ||
279 | static int process_comm_event(event_t *event, struct sample_data *sample __used, | 279 | static int process_comm_event(event_t *event, struct perf_sample *sample __used, |
280 | struct perf_session *session __used) | 280 | struct perf_session *session __used) |
281 | { | 281 | { |
282 | pid_set_comm(event->comm.tid, event->comm.comm); | 282 | pid_set_comm(event->comm.tid, event->comm.comm); |
283 | return 0; | 283 | return 0; |
284 | } | 284 | } |
285 | 285 | ||
286 | static int process_fork_event(event_t *event, struct sample_data *sample __used, | 286 | static int process_fork_event(event_t *event, struct perf_sample *sample __used, |
287 | struct perf_session *session __used) | 287 | struct perf_session *session __used) |
288 | { | 288 | { |
289 | pid_fork(event->fork.pid, event->fork.ppid, event->fork.time); | 289 | pid_fork(event->fork.pid, event->fork.ppid, event->fork.time); |
290 | return 0; | 290 | return 0; |
291 | } | 291 | } |
292 | 292 | ||
293 | static int process_exit_event(event_t *event, struct sample_data *sample __used, | 293 | static int process_exit_event(event_t *event, struct perf_sample *sample __used, |
294 | struct perf_session *session __used) | 294 | struct perf_session *session __used) |
295 | { | 295 | { |
296 | pid_exit(event->fork.pid, event->fork.time); | 296 | pid_exit(event->fork.pid, event->fork.time); |
@@ -487,7 +487,7 @@ static void sched_switch(int cpu, u64 timestamp, struct trace_entry *te) | |||
487 | 487 | ||
488 | 488 | ||
489 | static int process_sample_event(event_t *event __used, | 489 | static int process_sample_event(event_t *event __used, |
490 | struct sample_data *sample, | 490 | struct perf_sample *sample, |
491 | struct perf_session *session) | 491 | struct perf_session *session) |
492 | { | 492 | { |
493 | struct trace_entry *te; | 493 | struct trace_entry *te; |
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 7f92ab7696f7..d923127b41b6 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c | |||
@@ -997,7 +997,7 @@ static int symbol_filter(struct map *map, struct symbol *sym) | |||
997 | } | 997 | } |
998 | 998 | ||
999 | static void event__process_sample(const event_t *self, | 999 | static void event__process_sample(const event_t *self, |
1000 | struct sample_data *sample, | 1000 | struct perf_sample *sample, |
1001 | struct perf_session *session) | 1001 | struct perf_session *session) |
1002 | { | 1002 | { |
1003 | u64 ip = self->ip.ip; | 1003 | u64 ip = self->ip.ip; |
@@ -1107,7 +1107,7 @@ static void event__process_sample(const event_t *self, | |||
1107 | 1107 | ||
1108 | static void perf_session__mmap_read_cpu(struct perf_session *self, int cpu) | 1108 | static void perf_session__mmap_read_cpu(struct perf_session *self, int cpu) |
1109 | { | 1109 | { |
1110 | struct sample_data sample; | 1110 | struct perf_sample sample; |
1111 | event_t *event; | 1111 | event_t *event; |
1112 | 1112 | ||
1113 | while ((event = perf_evlist__read_on_cpu(evsel_list, cpu)) != NULL) { | 1113 | while ((event = perf_evlist__read_on_cpu(evsel_list, cpu)) != NULL) { |
diff --git a/tools/perf/util/build-id.c b/tools/perf/util/build-id.c index deffb8c96071..b184a7fa0843 100644 --- a/tools/perf/util/build-id.c +++ b/tools/perf/util/build-id.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #include "debug.h" | 15 | #include "debug.h" |
16 | 16 | ||
17 | static int build_id__mark_dso_hit(event_t *event, | 17 | static int build_id__mark_dso_hit(event_t *event, |
18 | struct sample_data *sample __used, | 18 | struct perf_sample *sample __used, |
19 | struct perf_session *session) | 19 | struct perf_session *session) |
20 | { | 20 | { |
21 | struct addr_location al; | 21 | struct addr_location al; |
@@ -37,7 +37,7 @@ static int build_id__mark_dso_hit(event_t *event, | |||
37 | return 0; | 37 | return 0; |
38 | } | 38 | } |
39 | 39 | ||
40 | static int event__exit_del_thread(event_t *self, struct sample_data *sample __used, | 40 | static int event__exit_del_thread(event_t *self, struct perf_sample *sample __used, |
41 | struct perf_session *session) | 41 | struct perf_session *session) |
42 | { | 42 | { |
43 | struct thread *thread = perf_session__findnew(session, self->fork.tid); | 43 | struct thread *thread = perf_session__findnew(session, self->fork.tid); |
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index b9d4ac87f9f7..5c886fbd50ce 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c | |||
@@ -34,7 +34,7 @@ const char *event__get_event_name(unsigned int id) | |||
34 | return event__name[id]; | 34 | return event__name[id]; |
35 | } | 35 | } |
36 | 36 | ||
37 | static struct sample_data synth_sample = { | 37 | static struct perf_sample synth_sample = { |
38 | .pid = -1, | 38 | .pid = -1, |
39 | .tid = -1, | 39 | .tid = -1, |
40 | .time = -1, | 40 | .time = -1, |
@@ -440,7 +440,7 @@ static int thread__set_comm_adjust(struct thread *self, const char *comm, | |||
440 | return 0; | 440 | return 0; |
441 | } | 441 | } |
442 | 442 | ||
443 | int event__process_comm(event_t *self, struct sample_data *sample __used, | 443 | int event__process_comm(event_t *self, struct perf_sample *sample __used, |
444 | struct perf_session *session) | 444 | struct perf_session *session) |
445 | { | 445 | { |
446 | struct thread *thread = perf_session__findnew(session, self->comm.tid); | 446 | struct thread *thread = perf_session__findnew(session, self->comm.tid); |
@@ -456,7 +456,7 @@ int event__process_comm(event_t *self, struct sample_data *sample __used, | |||
456 | return 0; | 456 | return 0; |
457 | } | 457 | } |
458 | 458 | ||
459 | int event__process_lost(event_t *self, struct sample_data *sample __used, | 459 | int event__process_lost(event_t *self, struct perf_sample *sample __used, |
460 | struct perf_session *session) | 460 | struct perf_session *session) |
461 | { | 461 | { |
462 | dump_printf(": id:%" PRIu64 ": lost:%" PRIu64 "\n", | 462 | dump_printf(": id:%" PRIu64 ": lost:%" PRIu64 "\n", |
@@ -567,7 +567,7 @@ out_problem: | |||
567 | return -1; | 567 | return -1; |
568 | } | 568 | } |
569 | 569 | ||
570 | int event__process_mmap(event_t *self, struct sample_data *sample __used, | 570 | int event__process_mmap(event_t *self, struct perf_sample *sample __used, |
571 | struct perf_session *session) | 571 | struct perf_session *session) |
572 | { | 572 | { |
573 | struct machine *machine; | 573 | struct machine *machine; |
@@ -609,7 +609,7 @@ out_problem: | |||
609 | return 0; | 609 | return 0; |
610 | } | 610 | } |
611 | 611 | ||
612 | int event__process_task(event_t *self, struct sample_data *sample __used, | 612 | int event__process_task(event_t *self, struct perf_sample *sample __used, |
613 | struct perf_session *session) | 613 | struct perf_session *session) |
614 | { | 614 | { |
615 | struct thread *thread = perf_session__findnew(session, self->fork.tid); | 615 | struct thread *thread = perf_session__findnew(session, self->fork.tid); |
@@ -632,7 +632,7 @@ int event__process_task(event_t *self, struct sample_data *sample __used, | |||
632 | return 0; | 632 | return 0; |
633 | } | 633 | } |
634 | 634 | ||
635 | int event__process(event_t *event, struct sample_data *sample, | 635 | int event__process(event_t *event, struct perf_sample *sample, |
636 | struct perf_session *session) | 636 | struct perf_session *session) |
637 | { | 637 | { |
638 | switch (event->header.type) { | 638 | switch (event->header.type) { |
@@ -757,7 +757,7 @@ static void dso__calc_col_width(struct dso *self, struct hists *hists) | |||
757 | } | 757 | } |
758 | 758 | ||
759 | int event__preprocess_sample(const event_t *self, struct perf_session *session, | 759 | int event__preprocess_sample(const event_t *self, struct perf_session *session, |
760 | struct addr_location *al, struct sample_data *data, | 760 | struct addr_location *al, struct perf_sample *sample, |
761 | symbol_filter_t filter) | 761 | symbol_filter_t filter) |
762 | { | 762 | { |
763 | u8 cpumode = self->header.misc & PERF_RECORD_MISC_CPUMODE_MASK; | 763 | u8 cpumode = self->header.misc & PERF_RECORD_MISC_CPUMODE_MASK; |
@@ -788,7 +788,7 @@ int event__preprocess_sample(const event_t *self, struct perf_session *session, | |||
788 | al->map ? al->map->dso->long_name : | 788 | al->map ? al->map->dso->long_name : |
789 | al->level == 'H' ? "[hypervisor]" : "<not found>"); | 789 | al->level == 'H' ? "[hypervisor]" : "<not found>"); |
790 | al->sym = NULL; | 790 | al->sym = NULL; |
791 | al->cpu = data->cpu; | 791 | al->cpu = sample->cpu; |
792 | 792 | ||
793 | if (al->map) { | 793 | if (al->map) { |
794 | if (symbol_conf.dso_list && | 794 | if (symbol_conf.dso_list && |
diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index d79e4edd82f9..84fd71ffd619 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h | |||
@@ -61,7 +61,7 @@ struct sample_event { | |||
61 | u64 array[]; | 61 | u64 array[]; |
62 | }; | 62 | }; |
63 | 63 | ||
64 | struct sample_data { | 64 | struct perf_sample { |
65 | u64 ip; | 65 | u64 ip; |
66 | u32 pid, tid; | 66 | u32 pid, tid; |
67 | u64 time; | 67 | u64 time; |
@@ -138,7 +138,7 @@ struct perf_session; | |||
138 | 138 | ||
139 | typedef int (*event__handler_synth_t)(event_t *event, | 139 | typedef int (*event__handler_synth_t)(event_t *event, |
140 | struct perf_session *session); | 140 | struct perf_session *session); |
141 | typedef int (*event__handler_t)(event_t *event, struct sample_data *sample, | 141 | typedef int (*event__handler_t)(event_t *event, struct perf_sample *sample, |
142 | struct perf_session *session); | 142 | struct perf_session *session); |
143 | 143 | ||
144 | int event__synthesize_thread(pid_t pid, event__handler_t process, | 144 | int event__synthesize_thread(pid_t pid, event__handler_t process, |
@@ -154,25 +154,25 @@ int event__synthesize_modules(event__handler_t process, | |||
154 | struct perf_session *session, | 154 | struct perf_session *session, |
155 | struct machine *machine); | 155 | struct machine *machine); |
156 | 156 | ||
157 | int event__process_comm(event_t *self, struct sample_data *sample, | 157 | int event__process_comm(event_t *event, struct perf_sample *sample, |
158 | struct perf_session *session); | 158 | struct perf_session *session); |
159 | int event__process_lost(event_t *self, struct sample_data *sample, | 159 | int event__process_lost(event_t *event, struct perf_sample *sample, |
160 | struct perf_session *session); | 160 | struct perf_session *session); |
161 | int event__process_mmap(event_t *self, struct sample_data *sample, | 161 | int event__process_mmap(event_t *event, struct perf_sample *sample, |
162 | struct perf_session *session); | 162 | struct perf_session *session); |
163 | int event__process_task(event_t *self, struct sample_data *sample, | 163 | int event__process_task(event_t *event, struct perf_sample *sample, |
164 | struct perf_session *session); | 164 | struct perf_session *session); |
165 | int event__process(event_t *event, struct sample_data *sample, | 165 | int event__process(event_t *event, struct perf_sample *sample, |
166 | struct perf_session *session); | 166 | struct perf_session *session); |
167 | 167 | ||
168 | struct addr_location; | 168 | struct addr_location; |
169 | int event__preprocess_sample(const event_t *self, struct perf_session *session, | 169 | int event__preprocess_sample(const event_t *self, struct perf_session *session, |
170 | struct addr_location *al, struct sample_data *data, | 170 | struct addr_location *al, struct perf_sample *sample, |
171 | symbol_filter_t filter); | 171 | symbol_filter_t filter); |
172 | 172 | ||
173 | const char *event__get_event_name(unsigned int id); | 173 | const char *event__get_event_name(unsigned int id); |
174 | 174 | ||
175 | int event__parse_sample(const event_t *event, u64 type, bool sample_id_all, | 175 | int event__parse_sample(const event_t *event, u64 type, bool sample_id_all, |
176 | struct sample_data *sample); | 176 | struct perf_sample *sample); |
177 | 177 | ||
178 | #endif /* __PERF_RECORD_H */ | 178 | #endif /* __PERF_RECORD_H */ |
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index f98b3e585039..a13488511880 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c | |||
@@ -368,7 +368,7 @@ out_unmap: | |||
368 | } | 368 | } |
369 | 369 | ||
370 | static int event__parse_id_sample(const event_t *event, u64 type, | 370 | static int event__parse_id_sample(const event_t *event, u64 type, |
371 | struct sample_data *sample) | 371 | struct perf_sample *sample) |
372 | { | 372 | { |
373 | const u64 *array = event->sample.array; | 373 | const u64 *array = event->sample.array; |
374 | 374 | ||
@@ -406,7 +406,7 @@ static int event__parse_id_sample(const event_t *event, u64 type, | |||
406 | } | 406 | } |
407 | 407 | ||
408 | int event__parse_sample(const event_t *event, u64 type, bool sample_id_all, | 408 | int event__parse_sample(const event_t *event, u64 type, bool sample_id_all, |
409 | struct sample_data *data) | 409 | struct perf_sample *data) |
410 | { | 410 | { |
411 | const u64 *array; | 411 | const u64 *array; |
412 | 412 | ||
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index e6a07408669e..ee0b61102571 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c | |||
@@ -67,7 +67,7 @@ out_close: | |||
67 | 67 | ||
68 | static void perf_session__id_header_size(struct perf_session *session) | 68 | static void perf_session__id_header_size(struct perf_session *session) |
69 | { | 69 | { |
70 | struct sample_data *data; | 70 | struct perf_sample *data; |
71 | u64 sample_type = session->sample_type; | 71 | u64 sample_type = session->sample_type; |
72 | u16 size = 0; | 72 | u16 size = 0; |
73 | 73 | ||
@@ -299,7 +299,7 @@ static int process_event_synth_stub(event_t *event __used, | |||
299 | } | 299 | } |
300 | 300 | ||
301 | static int process_event_stub(event_t *event __used, | 301 | static int process_event_stub(event_t *event __used, |
302 | struct sample_data *sample __used, | 302 | struct perf_sample *sample __used, |
303 | struct perf_session *session __used) | 303 | struct perf_session *session __used) |
304 | { | 304 | { |
305 | dump_printf(": unhandled!\n"); | 305 | dump_printf(": unhandled!\n"); |
@@ -475,7 +475,7 @@ static void perf_session_free_sample_buffers(struct perf_session *session) | |||
475 | 475 | ||
476 | static int perf_session_deliver_event(struct perf_session *session, | 476 | static int perf_session_deliver_event(struct perf_session *session, |
477 | event_t *event, | 477 | event_t *event, |
478 | struct sample_data *sample, | 478 | struct perf_sample *sample, |
479 | struct perf_event_ops *ops, | 479 | struct perf_event_ops *ops, |
480 | u64 file_offset); | 480 | u64 file_offset); |
481 | 481 | ||
@@ -485,7 +485,7 @@ static void flush_sample_queue(struct perf_session *s, | |||
485 | struct ordered_samples *os = &s->ordered_samples; | 485 | struct ordered_samples *os = &s->ordered_samples; |
486 | struct list_head *head = &os->samples; | 486 | struct list_head *head = &os->samples; |
487 | struct sample_queue *tmp, *iter; | 487 | struct sample_queue *tmp, *iter; |
488 | struct sample_data sample; | 488 | struct perf_sample sample; |
489 | u64 limit = os->next_flush; | 489 | u64 limit = os->next_flush; |
490 | u64 last_ts = os->last_sample ? os->last_sample->timestamp : 0ULL; | 490 | u64 last_ts = os->last_sample ? os->last_sample->timestamp : 0ULL; |
491 | 491 | ||
@@ -610,11 +610,11 @@ static void __queue_event(struct sample_queue *new, struct perf_session *s) | |||
610 | #define MAX_SAMPLE_BUFFER (64 * 1024 / sizeof(struct sample_queue)) | 610 | #define MAX_SAMPLE_BUFFER (64 * 1024 / sizeof(struct sample_queue)) |
611 | 611 | ||
612 | static int perf_session_queue_event(struct perf_session *s, event_t *event, | 612 | static int perf_session_queue_event(struct perf_session *s, event_t *event, |
613 | struct sample_data *data, u64 file_offset) | 613 | struct perf_sample *sample, u64 file_offset) |
614 | { | 614 | { |
615 | struct ordered_samples *os = &s->ordered_samples; | 615 | struct ordered_samples *os = &s->ordered_samples; |
616 | struct list_head *sc = &os->sample_cache; | 616 | struct list_head *sc = &os->sample_cache; |
617 | u64 timestamp = data->time; | 617 | u64 timestamp = sample->time; |
618 | struct sample_queue *new; | 618 | struct sample_queue *new; |
619 | 619 | ||
620 | if (!timestamp || timestamp == ~0ULL) | 620 | if (!timestamp || timestamp == ~0ULL) |
@@ -650,7 +650,7 @@ static int perf_session_queue_event(struct perf_session *s, event_t *event, | |||
650 | return 0; | 650 | return 0; |
651 | } | 651 | } |
652 | 652 | ||
653 | static void callchain__printf(struct sample_data *sample) | 653 | static void callchain__printf(struct perf_sample *sample) |
654 | { | 654 | { |
655 | unsigned int i; | 655 | unsigned int i; |
656 | 656 | ||
@@ -663,7 +663,7 @@ static void callchain__printf(struct sample_data *sample) | |||
663 | 663 | ||
664 | static void perf_session__print_tstamp(struct perf_session *session, | 664 | static void perf_session__print_tstamp(struct perf_session *session, |
665 | event_t *event, | 665 | event_t *event, |
666 | struct sample_data *sample) | 666 | struct perf_sample *sample) |
667 | { | 667 | { |
668 | if (event->header.type != PERF_RECORD_SAMPLE && | 668 | if (event->header.type != PERF_RECORD_SAMPLE && |
669 | !session->sample_id_all) { | 669 | !session->sample_id_all) { |
@@ -679,7 +679,7 @@ static void perf_session__print_tstamp(struct perf_session *session, | |||
679 | } | 679 | } |
680 | 680 | ||
681 | static void dump_event(struct perf_session *session, event_t *event, | 681 | static void dump_event(struct perf_session *session, event_t *event, |
682 | u64 file_offset, struct sample_data *sample) | 682 | u64 file_offset, struct perf_sample *sample) |
683 | { | 683 | { |
684 | if (!dump_trace) | 684 | if (!dump_trace) |
685 | return; | 685 | return; |
@@ -697,7 +697,7 @@ static void dump_event(struct perf_session *session, event_t *event, | |||
697 | } | 697 | } |
698 | 698 | ||
699 | static void dump_sample(struct perf_session *session, event_t *event, | 699 | static void dump_sample(struct perf_session *session, event_t *event, |
700 | struct sample_data *sample) | 700 | struct perf_sample *sample) |
701 | { | 701 | { |
702 | if (!dump_trace) | 702 | if (!dump_trace) |
703 | return; | 703 | return; |
@@ -712,7 +712,7 @@ static void dump_sample(struct perf_session *session, event_t *event, | |||
712 | 712 | ||
713 | static int perf_session_deliver_event(struct perf_session *session, | 713 | static int perf_session_deliver_event(struct perf_session *session, |
714 | event_t *event, | 714 | event_t *event, |
715 | struct sample_data *sample, | 715 | struct perf_sample *sample, |
716 | struct perf_event_ops *ops, | 716 | struct perf_event_ops *ops, |
717 | u64 file_offset) | 717 | u64 file_offset) |
718 | { | 718 | { |
@@ -745,7 +745,7 @@ static int perf_session_deliver_event(struct perf_session *session, | |||
745 | } | 745 | } |
746 | 746 | ||
747 | static int perf_session__preprocess_sample(struct perf_session *session, | 747 | static int perf_session__preprocess_sample(struct perf_session *session, |
748 | event_t *event, struct sample_data *sample) | 748 | event_t *event, struct perf_sample *sample) |
749 | { | 749 | { |
750 | if (event->header.type != PERF_RECORD_SAMPLE || | 750 | if (event->header.type != PERF_RECORD_SAMPLE || |
751 | !(session->sample_type & PERF_SAMPLE_CALLCHAIN)) | 751 | !(session->sample_type & PERF_SAMPLE_CALLCHAIN)) |
@@ -789,7 +789,7 @@ static int perf_session__process_event(struct perf_session *session, | |||
789 | struct perf_event_ops *ops, | 789 | struct perf_event_ops *ops, |
790 | u64 file_offset) | 790 | u64 file_offset) |
791 | { | 791 | { |
792 | struct sample_data sample; | 792 | struct perf_sample sample; |
793 | int ret; | 793 | int ret; |
794 | 794 | ||
795 | if (session->header.needs_swap && event__swap_ops[event->header.type]) | 795 | if (session->header.needs_swap && event__swap_ops[event->header.type]) |
diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h index 78239767011e..365bf533a396 100644 --- a/tools/perf/util/session.h +++ b/tools/perf/util/session.h | |||
@@ -57,7 +57,7 @@ struct perf_session { | |||
57 | 57 | ||
58 | struct perf_event_ops; | 58 | struct perf_event_ops; |
59 | 59 | ||
60 | typedef int (*event_op)(event_t *self, struct sample_data *sample, | 60 | typedef int (*event_op)(event_t *self, struct perf_sample *sample, |
61 | struct perf_session *session); | 61 | struct perf_session *session); |
62 | typedef int (*event_synth_op)(event_t *self, struct perf_session *session); | 62 | typedef int (*event_synth_op)(event_t *self, struct perf_session *session); |
63 | typedef int (*event_op2)(event_t *self, struct perf_session *session, | 63 | typedef int (*event_op2)(event_t *self, struct perf_session *session, |
@@ -158,7 +158,7 @@ size_t perf_session__fprintf_nr_events(struct perf_session *self, FILE *fp) | |||
158 | 158 | ||
159 | static inline int perf_session__parse_sample(struct perf_session *session, | 159 | static inline int perf_session__parse_sample(struct perf_session *session, |
160 | const event_t *event, | 160 | const event_t *event, |
161 | struct sample_data *sample) | 161 | struct perf_sample *sample) |
162 | { | 162 | { |
163 | return event__parse_sample(event, session->sample_type, | 163 | return event__parse_sample(event, session->sample_type, |
164 | session->sample_id_all, sample); | 164 | session->sample_id_all, sample); |