forked from luck/tmp_suning_uos_patched
perf evsel: Rename perf_evsel__parse_sample*() to evsel__parse_sample*()
As these are 'struct evsel' methods, not part of tools/lib/perf/, aka libperf, to whom the perf_ prefix belongs. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
ea08969273
commit
6b6017a206
|
@ -130,13 +130,11 @@ int test__perf_time_to_tsc(struct test *test __maybe_unused, int subtest __maybe
|
|||
goto next_event;
|
||||
|
||||
if (strcmp(event->comm.comm, comm1) == 0) {
|
||||
CHECK__(perf_evsel__parse_sample(evsel, event,
|
||||
&sample));
|
||||
CHECK__(evsel__parse_sample(evsel, event, &sample));
|
||||
comm1_time = sample.time;
|
||||
}
|
||||
if (strcmp(event->comm.comm, comm2) == 0) {
|
||||
CHECK__(perf_evsel__parse_sample(evsel, event,
|
||||
&sample));
|
||||
CHECK__(evsel__parse_sample(evsel, event, &sample));
|
||||
comm2_time = sample.time;
|
||||
}
|
||||
next_event:
|
||||
|
|
|
@ -546,7 +546,7 @@ static int perf_inject__sched_stat(struct perf_tool *tool,
|
|||
return 0;
|
||||
found:
|
||||
event_sw = &ent->event[0];
|
||||
perf_evsel__parse_sample(evsel, event_sw, &sample_sw);
|
||||
evsel__parse_sample(evsel, event_sw, &sample_sw);
|
||||
|
||||
sample_sw.period = sample->period;
|
||||
sample_sw.time = sample->time;
|
||||
|
|
|
@ -108,7 +108,7 @@ int test__syscall_openat_tp_fields(struct test *test __maybe_unused, int subtest
|
|||
continue;
|
||||
}
|
||||
|
||||
err = perf_evsel__parse_sample(evsel, event, &sample);
|
||||
err = evsel__parse_sample(evsel, event, &sample);
|
||||
if (err) {
|
||||
pr_debug("Can't parse sample, err = %d\n", err);
|
||||
goto out_delete_evlist;
|
||||
|
|
|
@ -298,10 +298,10 @@ static int do_test(u64 sample_type, u64 sample_regs, u64 read_format)
|
|||
|
||||
evsel.sample_size = __evsel__sample_size(sample_type);
|
||||
|
||||
err = perf_evsel__parse_sample(&evsel, event, &sample_out);
|
||||
err = evsel__parse_sample(&evsel, event, &sample_out);
|
||||
if (err) {
|
||||
pr_debug("%s failed for sample_type %#"PRIx64", error %d\n",
|
||||
"perf_evsel__parse_sample", sample_type, err);
|
||||
"evsel__parse_sample", sample_type, err);
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
|
|
|
@ -1439,7 +1439,7 @@ int perf_evlist__parse_sample(struct evlist *evlist, union perf_event *event,
|
|||
|
||||
if (!evsel)
|
||||
return -EFAULT;
|
||||
return perf_evsel__parse_sample(evsel, event, sample);
|
||||
return evsel__parse_sample(evsel, event, sample);
|
||||
}
|
||||
|
||||
int perf_evlist__parse_sample_timestamp(struct evlist *evlist,
|
||||
|
@ -1450,7 +1450,7 @@ int perf_evlist__parse_sample_timestamp(struct evlist *evlist,
|
|||
|
||||
if (!evsel)
|
||||
return -EFAULT;
|
||||
return perf_evsel__parse_sample_timestamp(evsel, event, timestamp);
|
||||
return evsel__parse_sample_timestamp(evsel, event, timestamp);
|
||||
}
|
||||
|
||||
int perf_evlist__strerror_open(struct evlist *evlist,
|
||||
|
|
|
@ -1964,8 +1964,8 @@ perf_event__check_size(union perf_event *event, unsigned int sample_size)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int perf_evsel__parse_sample(struct evsel *evsel, union perf_event *event,
|
||||
struct perf_sample *data)
|
||||
int evsel__parse_sample(struct evsel *evsel, union perf_event *event,
|
||||
struct perf_sample *data)
|
||||
{
|
||||
u64 type = evsel->core.attr.sample_type;
|
||||
bool swapped = evsel->needs_swap;
|
||||
|
@ -2267,9 +2267,8 @@ int perf_evsel__parse_sample(struct evsel *evsel, union perf_event *event,
|
|||
return 0;
|
||||
}
|
||||
|
||||
int perf_evsel__parse_sample_timestamp(struct evsel *evsel,
|
||||
union perf_event *event,
|
||||
u64 *timestamp)
|
||||
int evsel__parse_sample_timestamp(struct evsel *evsel, union perf_event *event,
|
||||
u64 *timestamp)
|
||||
{
|
||||
u64 type = evsel->core.attr.sample_type;
|
||||
const __u64 *array;
|
||||
|
|
|
@ -293,12 +293,11 @@ static inline int evsel__read_on_cpu_scaled(struct evsel *evsel, int cpu, int th
|
|||
return __evsel__read_on_cpu(evsel, cpu, thread, true);
|
||||
}
|
||||
|
||||
int perf_evsel__parse_sample(struct evsel *evsel, union perf_event *event,
|
||||
struct perf_sample *sample);
|
||||
int evsel__parse_sample(struct evsel *evsel, union perf_event *event,
|
||||
struct perf_sample *sample);
|
||||
|
||||
int perf_evsel__parse_sample_timestamp(struct evsel *evsel,
|
||||
union perf_event *event,
|
||||
u64 *timestamp);
|
||||
int evsel__parse_sample_timestamp(struct evsel *evsel, union perf_event *event,
|
||||
u64 *timestamp);
|
||||
|
||||
static inline struct evsel *perf_evsel__next(struct evsel *evsel)
|
||||
{
|
||||
|
|
|
@ -1044,7 +1044,7 @@ static PyObject *pyrf_evlist__read_on_cpu(struct pyrf_evlist *pevlist,
|
|||
|
||||
pevent->evsel = evsel;
|
||||
|
||||
err = perf_evsel__parse_sample(evsel, event, &pevent->sample);
|
||||
err = evsel__parse_sample(evsel, event, &pevent->sample);
|
||||
|
||||
/* Consume the even only after we parsed it out. */
|
||||
perf_mmap__consume(&md->core);
|
||||
|
|
Loading…
Reference in New Issue
Block a user