perf evsel: Rename __perf_evsel__sample_size() to __evsel__sample_size()
As it is a 'struct evsel' related method, 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
4b5e87b741
commit
2aaefde4d9
@ -296,7 +296,7 @@ static int do_test(u64 sample_type, u64 sample_regs, u64 read_format)
|
|||||||
goto out_free;
|
goto out_free;
|
||||||
}
|
}
|
||||||
|
|
||||||
evsel.sample_size = __perf_evsel__sample_size(sample_type);
|
evsel.sample_size = __evsel__sample_size(sample_type);
|
||||||
|
|
||||||
err = perf_evsel__parse_sample(&evsel, event, &sample_out);
|
err = perf_evsel__parse_sample(&evsel, event, &sample_out);
|
||||||
if (err) {
|
if (err) {
|
||||||
|
@ -102,7 +102,7 @@ set_methods:
|
|||||||
|
|
||||||
#define FD(e, x, y) (*(int *)xyarray__entry(e->core.fd, x, y))
|
#define FD(e, x, y) (*(int *)xyarray__entry(e->core.fd, x, y))
|
||||||
|
|
||||||
int __perf_evsel__sample_size(u64 sample_type)
|
int __evsel__sample_size(u64 sample_type)
|
||||||
{
|
{
|
||||||
u64 mask = sample_type & PERF_SAMPLE_MASK;
|
u64 mask = sample_type & PERF_SAMPLE_MASK;
|
||||||
int size = 0;
|
int size = 0;
|
||||||
@ -249,7 +249,7 @@ void evsel__init(struct evsel *evsel,
|
|||||||
evsel->bpf_fd = -1;
|
evsel->bpf_fd = -1;
|
||||||
INIT_LIST_HEAD(&evsel->config_terms);
|
INIT_LIST_HEAD(&evsel->config_terms);
|
||||||
perf_evsel__object.init(evsel);
|
perf_evsel__object.init(evsel);
|
||||||
evsel->sample_size = __perf_evsel__sample_size(attr->sample_type);
|
evsel->sample_size = __evsel__sample_size(attr->sample_type);
|
||||||
evsel__calc_id_pos(evsel);
|
evsel__calc_id_pos(evsel);
|
||||||
evsel->cmdline_group_boundary = false;
|
evsel->cmdline_group_boundary = false;
|
||||||
evsel->metric_expr = NULL;
|
evsel->metric_expr = NULL;
|
||||||
|
@ -193,7 +193,7 @@ void evsel__config(struct evsel *evsel, struct record_opts *opts,
|
|||||||
void evsel__config_callchain(struct evsel *evsel, struct record_opts *opts,
|
void evsel__config_callchain(struct evsel *evsel, struct record_opts *opts,
|
||||||
struct callchain_param *callchain);
|
struct callchain_param *callchain);
|
||||||
|
|
||||||
int __perf_evsel__sample_size(u64 sample_type);
|
int __evsel__sample_size(u64 sample_type);
|
||||||
void evsel__calc_id_pos(struct evsel *evsel);
|
void evsel__calc_id_pos(struct evsel *evsel);
|
||||||
|
|
||||||
bool perf_evsel__is_cache_op_valid(u8 type, u8 op);
|
bool perf_evsel__is_cache_op_valid(u8 type, u8 op);
|
||||||
|
@ -825,10 +825,10 @@ static int intel_bts_synth_events(struct intel_bts *bts,
|
|||||||
bts->branches_id = id;
|
bts->branches_id = id;
|
||||||
/*
|
/*
|
||||||
* We only use sample types from PERF_SAMPLE_MASK so we can use
|
* We only use sample types from PERF_SAMPLE_MASK so we can use
|
||||||
* __perf_evsel__sample_size() here.
|
* __evsel__sample_size() here.
|
||||||
*/
|
*/
|
||||||
bts->branches_event_size = sizeof(struct perf_record_sample) +
|
bts->branches_event_size = sizeof(struct perf_record_sample) +
|
||||||
__perf_evsel__sample_size(attr.sample_type);
|
__evsel__sample_size(attr.sample_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user