summaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-report.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2011-01-29 13:02:00 -0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2011-01-29 16:25:20 -0200
commit8d50e5b4171a69cf48ca94a1e7c14033d0b4771d (patch)
tree6ebf659f92f0770917c7f47c24449ebfe048ce61 /tools/perf/builtin-report.c
parent93fc64f14472ae24fd640bf3834a178f59142842 (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/perf/builtin-report.c')
-rw-r--r--tools/perf/builtin-report.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index f6a43493d1d..bbbadcc0409 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,
return new;
}
-static int perf_session__add_hist_entry(struct perf_session *self,
+static int perf_session__add_hist_entry(struct perf_session *session,
struct addr_location *al,
- struct sample_data *data)
+ struct perf_sample *sample)
{
struct symbol *parent = NULL;
int err = 0;
@@ -87,28 +87,28 @@ static int perf_session__add_hist_entry(struct perf_session *self,
struct hists *hists;
struct perf_event_attr *attr;
- if ((sort__has_parent || symbol_conf.use_callchain) && data->callchain) {
- err = perf_session__resolve_callchain(self, al->thread,
- data->callchain, &parent);
+ if ((sort__has_parent || symbol_conf.use_callchain) && sample->callchain) {
+ err = perf_session__resolve_callchain(session, al->thread,
+ sample->callchain, &parent);
if (err)
return err;
}
- attr = perf_header__find_attr(data->id, &self->header);
+ attr = perf_header__find_attr(sample->id, &session->header);
if (attr)
- hists = perf_session__hists_findnew(self, data->id, attr->type, attr->config);
+ hists = perf_session__hists_findnew(session, sample->id, attr->type, attr->config);
else
- hists = perf_session__hists_findnew(self, data->id, 0, 0);
+ hists = perf_session__hists_findnew(session, sample->id, 0, 0);
if (hists == NULL)
return -ENOMEM;
- he = __hists__add_entry(hists, al, parent, data->period);
+ he = __hists__add_entry(hists, al, parent, sample->period);
if (he == NULL)
return -ENOMEM;
if (symbol_conf.use_callchain) {
- err = callchain_append(he->callchain, &self->callchain_cursor,
- data->period);
+ err = callchain_append(he->callchain, &session->callchain_cursor,
+ sample->period);
if (err)
return err;
}
@@ -124,32 +124,32 @@ static int perf_session__add_hist_entry(struct perf_session *self,
}
static int add_event_total(struct perf_session *session,
- struct sample_data *data,
+ struct perf_sample *sample,
struct perf_event_attr *attr)
{
struct hists *hists;
if (attr)
- hists = perf_session__hists_findnew(session, data->id,
+ hists = perf_session__hists_findnew(session, sample->id,
attr->type, attr->config);
else
- hists = perf_session__hists_findnew(session, data->id, 0, 0);
+ hists = perf_session__hists_findnew(session, sample->id, 0, 0);
if (!hists)
return -ENOMEM;
- hists->stats.total_period += data->period;
+ hists->stats.total_period += sample->period;
/*
* FIXME: add_event_total should be moved from here to
* perf_session__process_event so that the proper hist is passed to
* the event_op methods.
*/
hists__inc_nr_events(hists, PERF_RECORD_SAMPLE);
- session->hists.stats.total_period += data->period;
+ session->hists.stats.total_period += sample->period;
return 0;
}
-static int process_sample_event(event_t *event, struct sample_data *sample,
+static int process_sample_event(event_t *event, struct perf_sample *sample,
struct perf_session *session)
{
struct addr_location al;
@@ -179,7 +179,7 @@ static int process_sample_event(event_t *event, struct sample_data *sample,
return 0;
}
-static int process_read_event(event_t *event, struct sample_data *sample __used,
+static int process_read_event(event_t *event, struct perf_sample *sample __used,
struct perf_session *session __used)
{
struct perf_event_attr *attr;