Commit 6ec17b4e authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo
Browse files

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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 30f7c591
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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);
	}

+1 −1
Original line number Diff line number Diff line
@@ -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());

+10 −12
Original line number Diff line number Diff line
@@ -686,8 +686,7 @@ 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,
static void __evsel__config_callchain(struct evsel *evsel, struct record_opts *opts,
				      struct callchain_param *param)
{
	bool function = perf_evsel__is_function_event(evsel);
@@ -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,
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, &param);
			evsel__config_callchain(evsel, opts, &param);
		}
	}
}
@@ -953,7 +951,7 @@ 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,
void evsel__config(struct evsel *evsel, struct record_opts *opts,
		   struct callchain_param *callchain)
{
	struct evsel *leader = evsel->leader;
@@ -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;
+4 −6
Original line number Diff line number Diff line
@@ -188,11 +188,9 @@ void evsel__delete(struct evsel *evsel);

struct callchain_param;

void perf_evsel__config(struct evsel *evsel,
			struct record_opts *opts,
void 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,
void evsel__config_callchain(struct evsel *evsel, struct record_opts *opts,
			     struct callchain_param *callchain);

int __perf_evsel__sample_size(u64 sample_type);
+1 −1
Original line number Diff line number Diff line
@@ -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.
*/
Loading