summaryrefslogtreecommitdiffstats
path: root/tools/perf/util
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/util
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/util')
-rw-r--r--tools/perf/util/build-id.c4
-rw-r--r--tools/perf/util/event.c16
-rw-r--r--tools/perf/util/event.h18
-rw-r--r--tools/perf/util/evsel.c4
-rw-r--r--tools/perf/util/session.c26
-rw-r--r--tools/perf/util/session.h4
6 files changed, 36 insertions, 36 deletions
diff --git a/tools/perf/util/build-id.c b/tools/perf/util/build-id.c
index deffb8c9607..b184a7fa084 100644
--- a/tools/perf/util/build-id.c
+++ b/tools/perf/util/build-id.c
@@ -15,7 +15,7 @@
#include "debug.h"
static int build_id__mark_dso_hit(event_t *event,
- struct sample_data *sample __used,
+ struct perf_sample *sample __used,
struct perf_session *session)
{
struct addr_location al;
@@ -37,7 +37,7 @@ static int build_id__mark_dso_hit(event_t *event,
return 0;
}
-static int event__exit_del_thread(event_t *self, struct sample_data *sample __used,
+static int event__exit_del_thread(event_t *self, struct perf_sample *sample __used,
struct perf_session *session)
{
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 b9d4ac87f9f..5c886fbd50c 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)
return event__name[id];
}
-static struct sample_data synth_sample = {
+static struct perf_sample synth_sample = {
.pid = -1,
.tid = -1,
.time = -1,
@@ -440,7 +440,7 @@ static int thread__set_comm_adjust(struct thread *self, const char *comm,
return 0;
}
-int event__process_comm(event_t *self, struct sample_data *sample __used,
+int event__process_comm(event_t *self, struct perf_sample *sample __used,
struct perf_session *session)
{
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,
return 0;
}
-int event__process_lost(event_t *self, struct sample_data *sample __used,
+int event__process_lost(event_t *self, struct perf_sample *sample __used,
struct perf_session *session)
{
dump_printf(": id:%" PRIu64 ": lost:%" PRIu64 "\n",
@@ -567,7 +567,7 @@ out_problem:
return -1;
}
-int event__process_mmap(event_t *self, struct sample_data *sample __used,
+int event__process_mmap(event_t *self, struct perf_sample *sample __used,
struct perf_session *session)
{
struct machine *machine;
@@ -609,7 +609,7 @@ out_problem:
return 0;
}
-int event__process_task(event_t *self, struct sample_data *sample __used,
+int event__process_task(event_t *self, struct perf_sample *sample __used,
struct perf_session *session)
{
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,
return 0;
}
-int event__process(event_t *event, struct sample_data *sample,
+int event__process(event_t *event, struct perf_sample *sample,
struct perf_session *session)
{
switch (event->header.type) {
@@ -757,7 +757,7 @@ static void dso__calc_col_width(struct dso *self, struct hists *hists)
}
int event__preprocess_sample(const event_t *self, struct perf_session *session,
- struct addr_location *al, struct sample_data *data,
+ struct addr_location *al, struct perf_sample *sample,
symbol_filter_t filter)
{
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,
al->map ? al->map->dso->long_name :
al->level == 'H' ? "[hypervisor]" : "<not found>");
al->sym = NULL;
- al->cpu = data->cpu;
+ al->cpu = sample->cpu;
if (al->map) {
if (symbol_conf.dso_list &&
diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h
index d79e4edd82f..84fd71ffd61 100644
--- a/tools/perf/util/event.h
+++ b/tools/perf/util/event.h
@@ -61,7 +61,7 @@ struct sample_event {
u64 array[];
};
-struct sample_data {
+struct perf_sample {
u64 ip;
u32 pid, tid;
u64 time;
@@ -138,7 +138,7 @@ struct perf_session;
typedef int (*event__handler_synth_t)(event_t *event,
struct perf_session *session);
-typedef int (*event__handler_t)(event_t *event, struct sample_data *sample,
+typedef int (*event__handler_t)(event_t *event, struct perf_sample *sample,
struct perf_session *session);
int event__synthesize_thread(pid_t pid, event__handler_t process,
@@ -154,25 +154,25 @@ int event__synthesize_modules(event__handler_t process,
struct perf_session *session,
struct machine *machine);
-int event__process_comm(event_t *self, struct sample_data *sample,
+int event__process_comm(event_t *event, struct perf_sample *sample,
struct perf_session *session);
-int event__process_lost(event_t *self, struct sample_data *sample,
+int event__process_lost(event_t *event, struct perf_sample *sample,
struct perf_session *session);
-int event__process_mmap(event_t *self, struct sample_data *sample,
+int event__process_mmap(event_t *event, struct perf_sample *sample,
struct perf_session *session);
-int event__process_task(event_t *self, struct sample_data *sample,
+int event__process_task(event_t *event, struct perf_sample *sample,
struct perf_session *session);
-int event__process(event_t *event, struct sample_data *sample,
+int event__process(event_t *event, struct perf_sample *sample,
struct perf_session *session);
struct addr_location;
int event__preprocess_sample(const event_t *self, struct perf_session *session,
- struct addr_location *al, struct sample_data *data,
+ struct addr_location *al, struct perf_sample *sample,
symbol_filter_t filter);
const char *event__get_event_name(unsigned int id);
int event__parse_sample(const event_t *event, u64 type, bool sample_id_all,
- struct sample_data *sample);
+ struct perf_sample *sample);
#endif /* __PERF_RECORD_H */
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index f98b3e58503..a1348851188 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -368,7 +368,7 @@ out_unmap:
}
static int event__parse_id_sample(const event_t *event, u64 type,
- struct sample_data *sample)
+ struct perf_sample *sample)
{
const u64 *array = event->sample.array;
@@ -406,7 +406,7 @@ static int event__parse_id_sample(const event_t *event, u64 type,
}
int event__parse_sample(const event_t *event, u64 type, bool sample_id_all,
- struct sample_data *data)
+ struct perf_sample *data)
{
const u64 *array;
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index e6a07408669..ee0b6110257 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -67,7 +67,7 @@ out_close:
static void perf_session__id_header_size(struct perf_session *session)
{
- struct sample_data *data;
+ struct perf_sample *data;
u64 sample_type = session->sample_type;
u16 size = 0;
@@ -299,7 +299,7 @@ static int process_event_synth_stub(event_t *event __used,
}
static int process_event_stub(event_t *event __used,
- struct sample_data *sample __used,
+ struct perf_sample *sample __used,
struct perf_session *session __used)
{
dump_printf(": unhandled!\n");
@@ -475,7 +475,7 @@ static void perf_session_free_sample_buffers(struct perf_session *session)
static int perf_session_deliver_event(struct perf_session *session,
event_t *event,
- struct sample_data *sample,
+ struct perf_sample *sample,
struct perf_event_ops *ops,
u64 file_offset);
@@ -485,7 +485,7 @@ static void flush_sample_queue(struct perf_session *s,
struct ordered_samples *os = &s->ordered_samples;
struct list_head *head = &os->samples;
struct sample_queue *tmp, *iter;
- struct sample_data sample;
+ struct perf_sample sample;
u64 limit = os->next_flush;
u64 last_ts = os->last_sample ? os->last_sample->timestamp : 0ULL;
@@ -610,11 +610,11 @@ static void __queue_event(struct sample_queue *new, struct perf_session *s)
#define MAX_SAMPLE_BUFFER (64 * 1024 / sizeof(struct sample_queue))
static int perf_session_queue_event(struct perf_session *s, event_t *event,
- struct sample_data *data, u64 file_offset)
+ struct perf_sample *sample, u64 file_offset)
{
struct ordered_samples *os = &s->ordered_samples;
struct list_head *sc = &os->sample_cache;
- u64 timestamp = data->time;
+ u64 timestamp = sample->time;
struct sample_queue *new;
if (!timestamp || timestamp == ~0ULL)
@@ -650,7 +650,7 @@ static int perf_session_queue_event(struct perf_session *s, event_t *event,
return 0;
}
-static void callchain__printf(struct sample_data *sample)
+static void callchain__printf(struct perf_sample *sample)
{
unsigned int i;
@@ -663,7 +663,7 @@ static void callchain__printf(struct sample_data *sample)
static void perf_session__print_tstamp(struct perf_session *session,
event_t *event,
- struct sample_data *sample)
+ struct perf_sample *sample)
{
if (event->header.type != PERF_RECORD_SAMPLE &&
!session->sample_id_all) {
@@ -679,7 +679,7 @@ static void perf_session__print_tstamp(struct perf_session *session,
}
static void dump_event(struct perf_session *session, event_t *event,
- u64 file_offset, struct sample_data *sample)
+ u64 file_offset, struct perf_sample *sample)
{
if (!dump_trace)
return;
@@ -697,7 +697,7 @@ static void dump_event(struct perf_session *session, event_t *event,
}
static void dump_sample(struct perf_session *session, event_t *event,
- struct sample_data *sample)
+ struct perf_sample *sample)
{
if (!dump_trace)
return;
@@ -712,7 +712,7 @@ static void dump_sample(struct perf_session *session, event_t *event,
static int perf_session_deliver_event(struct perf_session *session,
event_t *event,
- struct sample_data *sample,
+ struct perf_sample *sample,
struct perf_event_ops *ops,
u64 file_offset)
{
@@ -745,7 +745,7 @@ static int perf_session_deliver_event(struct perf_session *session,
}
static int perf_session__preprocess_sample(struct perf_session *session,
- event_t *event, struct sample_data *sample)
+ event_t *event, struct perf_sample *sample)
{
if (event->header.type != PERF_RECORD_SAMPLE ||
!(session->sample_type & PERF_SAMPLE_CALLCHAIN))
@@ -789,7 +789,7 @@ static int perf_session__process_event(struct perf_session *session,
struct perf_event_ops *ops,
u64 file_offset)
{
- struct sample_data sample;
+ struct perf_sample sample;
int ret;
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 78239767011..365bf533a39 100644
--- a/tools/perf/util/session.h
+++ b/tools/perf/util/session.h
@@ -57,7 +57,7 @@ struct perf_session {
struct perf_event_ops;
-typedef int (*event_op)(event_t *self, struct sample_data *sample,
+typedef int (*event_op)(event_t *self, struct perf_sample *sample,
struct perf_session *session);
typedef int (*event_synth_op)(event_t *self, struct perf_session *session);
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)
static inline int perf_session__parse_sample(struct perf_session *session,
const event_t *event,
- struct sample_data *sample)
+ struct perf_sample *sample)
{
return event__parse_sample(event, session->sample_type,
session->sample_id_all, sample);