mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-13 14:24:11 +08:00
perf evsel: Rename perf_evsel__config*() to evsel__config*()
As they are all '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
30f7c59124
commit
6ec17b4e25
@ -3124,8 +3124,8 @@ static int trace__add_syscall_newtp(struct trace *trace)
|
||||
if (perf_evsel__init_sc_tp_uint_field(sys_exit, ret))
|
||||
goto out_delete_sys_exit;
|
||||
|
||||
perf_evsel__config_callchain(sys_enter, &trace->opts, &callchain_param);
|
||||
perf_evsel__config_callchain(sys_exit, &trace->opts, &callchain_param);
|
||||
evsel__config_callchain(sys_enter, &trace->opts, &callchain_param);
|
||||
evsel__config_callchain(sys_exit, &trace->opts, &callchain_param);
|
||||
|
||||
evlist__add(evlist, sys_enter);
|
||||
evlist__add(evlist, sys_exit);
|
||||
@ -3849,7 +3849,7 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
|
||||
pgfault_maj = perf_evsel__new_pgfault(PERF_COUNT_SW_PAGE_FAULTS_MAJ);
|
||||
if (pgfault_maj == NULL)
|
||||
goto out_error_mem;
|
||||
perf_evsel__config_callchain(pgfault_maj, &trace->opts, &callchain_param);
|
||||
evsel__config_callchain(pgfault_maj, &trace->opts, &callchain_param);
|
||||
evlist__add(evlist, pgfault_maj);
|
||||
}
|
||||
|
||||
@ -3857,7 +3857,7 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
|
||||
pgfault_min = perf_evsel__new_pgfault(PERF_COUNT_SW_PAGE_FAULTS_MIN);
|
||||
if (pgfault_min == NULL)
|
||||
goto out_error_mem;
|
||||
perf_evsel__config_callchain(pgfault_min, &trace->opts, &callchain_param);
|
||||
evsel__config_callchain(pgfault_min, &trace->opts, &callchain_param);
|
||||
evlist__add(evlist, pgfault_min);
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ int test__syscall_openat_tp_fields(struct test *test __maybe_unused, int subtest
|
||||
goto out_delete_evlist;
|
||||
}
|
||||
|
||||
perf_evsel__config(evsel, &opts, NULL);
|
||||
evsel__config(evsel, &opts, NULL);
|
||||
|
||||
perf_thread_map__set_pid(evlist->core.threads, 0, getpid());
|
||||
|
||||
|
@ -686,9 +686,8 @@ int perf_evsel__group_desc(struct evsel *evsel, char *buf, size_t size)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void __perf_evsel__config_callchain(struct evsel *evsel,
|
||||
struct record_opts *opts,
|
||||
struct callchain_param *param)
|
||||
static void __evsel__config_callchain(struct evsel *evsel, struct record_opts *opts,
|
||||
struct callchain_param *param)
|
||||
{
|
||||
bool function = perf_evsel__is_function_event(evsel);
|
||||
struct perf_event_attr *attr = &evsel->core.attr;
|
||||
@ -746,12 +745,11 @@ static void __perf_evsel__config_callchain(struct evsel *evsel,
|
||||
}
|
||||
}
|
||||
|
||||
void perf_evsel__config_callchain(struct evsel *evsel,
|
||||
struct record_opts *opts,
|
||||
struct callchain_param *param)
|
||||
void evsel__config_callchain(struct evsel *evsel, struct record_opts *opts,
|
||||
struct callchain_param *param)
|
||||
{
|
||||
if (param->enabled)
|
||||
return __perf_evsel__config_callchain(evsel, opts, param);
|
||||
return __evsel__config_callchain(evsel, opts, param);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -832,7 +830,7 @@ static void apply_config_terms(struct evsel *evsel,
|
||||
case PERF_EVSEL__CONFIG_TERM_INHERIT:
|
||||
/*
|
||||
* attr->inherit should has already been set by
|
||||
* perf_evsel__config. If user explicitly set
|
||||
* evsel__config. If user explicitly set
|
||||
* inherit using config terms, override global
|
||||
* opt->no_inherit setting.
|
||||
*/
|
||||
@ -901,7 +899,7 @@ static void apply_config_terms(struct evsel *evsel,
|
||||
perf_evsel__set_sample_bit(evsel, DATA_SRC);
|
||||
evsel->core.attr.mmap_data = track;
|
||||
}
|
||||
perf_evsel__config_callchain(evsel, opts, ¶m);
|
||||
evsel__config_callchain(evsel, opts, ¶m);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -953,8 +951,8 @@ struct perf_evsel_config_term *__perf_evsel__get_config_term(struct evsel *evsel
|
||||
* enable/disable events specifically, as there's no
|
||||
* initial traced exec call.
|
||||
*/
|
||||
void perf_evsel__config(struct evsel *evsel, struct record_opts *opts,
|
||||
struct callchain_param *callchain)
|
||||
void evsel__config(struct evsel *evsel, struct record_opts *opts,
|
||||
struct callchain_param *callchain)
|
||||
{
|
||||
struct evsel *leader = evsel->leader;
|
||||
struct perf_event_attr *attr = &evsel->core.attr;
|
||||
@ -1027,7 +1025,7 @@ void perf_evsel__config(struct evsel *evsel, struct record_opts *opts,
|
||||
evsel->core.attr.exclude_callchain_user = 1;
|
||||
|
||||
if (callchain && callchain->enabled && !evsel->no_aux_samples)
|
||||
perf_evsel__config_callchain(evsel, opts, callchain);
|
||||
evsel__config_callchain(evsel, opts, callchain);
|
||||
|
||||
if (opts->sample_intr_regs) {
|
||||
attr->sample_regs_intr = opts->sample_intr_regs;
|
||||
|
@ -188,12 +188,10 @@ void evsel__delete(struct evsel *evsel);
|
||||
|
||||
struct callchain_param;
|
||||
|
||||
void perf_evsel__config(struct evsel *evsel,
|
||||
struct record_opts *opts,
|
||||
struct callchain_param *callchain);
|
||||
void perf_evsel__config_callchain(struct evsel *evsel,
|
||||
struct record_opts *opts,
|
||||
struct callchain_param *callchain);
|
||||
void evsel__config(struct evsel *evsel, struct record_opts *opts,
|
||||
struct callchain_param *callchain);
|
||||
void evsel__config_callchain(struct evsel *evsel, struct record_opts *opts,
|
||||
struct callchain_param *callchain);
|
||||
|
||||
int __perf_evsel__sample_size(u64 sample_type);
|
||||
void perf_evsel__calc_id_pos(struct evsel *evsel);
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
/*
|
||||
* The 'struct perf_evsel_config_term' is used to pass event
|
||||
* specific configuration data to perf_evsel__config routine.
|
||||
* specific configuration data to evsel__config routine.
|
||||
* It is allocated within event parsing and attached to
|
||||
* perf_evsel::config_terms list head.
|
||||
*/
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include "../perf-sys.h"
|
||||
|
||||
/*
|
||||
* perf_evsel__config_leader_sampling() uses special rules for leader sampling.
|
||||
* evsel__config_leader_sampling() uses special rules for leader sampling.
|
||||
* However, if the leader is an AUX area event, then assume the event to sample
|
||||
* is the next event.
|
||||
*/
|
||||
@ -34,8 +34,7 @@ static struct evsel *perf_evsel__read_sampler(struct evsel *evsel,
|
||||
return leader;
|
||||
}
|
||||
|
||||
static void perf_evsel__config_leader_sampling(struct evsel *evsel,
|
||||
struct evlist *evlist)
|
||||
static void evsel__config_leader_sampling(struct evsel *evsel, struct evlist *evlist)
|
||||
{
|
||||
struct perf_event_attr *attr = &evsel->core.attr;
|
||||
struct evsel *leader = evsel->leader;
|
||||
@ -93,14 +92,14 @@ void perf_evlist__config(struct evlist *evlist, struct record_opts *opts,
|
||||
use_comm_exec = perf_can_comm_exec();
|
||||
|
||||
evlist__for_each_entry(evlist, evsel) {
|
||||
perf_evsel__config(evsel, opts, callchain);
|
||||
evsel__config(evsel, opts, callchain);
|
||||
if (evsel->tracking && use_comm_exec)
|
||||
evsel->core.attr.comm_exec = 1;
|
||||
}
|
||||
|
||||
/* Configure leader sampling here now that the sample type is known */
|
||||
evlist__for_each_entry(evlist, evsel)
|
||||
perf_evsel__config_leader_sampling(evsel, evlist);
|
||||
evsel__config_leader_sampling(evsel, evlist);
|
||||
|
||||
if (opts->full_auxtrace) {
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user