lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YnqfxD60graVBJq5@kernel.org>
Date:   Tue, 10 May 2022 14:24:20 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Adrian Hunter <adrian.hunter@...el.com>
Cc:     Jiri Olsa <jolsa@...hat.com>, Ian Rogers <irogers@...gle.com>,
        Alexey Bayduraev <alexey.v.bayduraev@...ux.intel.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Leo Yan <leo.yan@...aro.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2 04/23] perf auxtrace: Move evlist__enable_event_idx()
 to auxtrace.c

Em Fri, May 06, 2022 at 03:25:42PM +0300, Adrian Hunter escreveu:
> evlist__enable_event_idx() is used only by auxtrace. Move it to auxtrace.c
> in preparation for making it even more auxtrace specific.
> 
> Acked-by: Ian Rogers <irogers@...gle.com>
> Signed-off-by: Adrian Hunter <adrian.hunter@...el.com>

Thanks, applied.

- Arnaldo

> ---
>  tools/perf/util/auxtrace.c | 10 ++++++++++
>  tools/perf/util/evlist.c   | 10 ----------
>  tools/perf/util/evlist.h   |  2 --
>  3 files changed, 10 insertions(+), 12 deletions(-)
> 
> diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c
> index df1c5bbbaa0d..10936a38031f 100644
> --- a/tools/perf/util/auxtrace.c
> +++ b/tools/perf/util/auxtrace.c
> @@ -636,6 +636,16 @@ int auxtrace_parse_snapshot_options(struct auxtrace_record *itr,
>  	return -EINVAL;
>  }
>  
> +static int evlist__enable_event_idx(struct evlist *evlist, struct evsel *evsel, int idx)
> +{
> +	bool per_cpu_mmaps = !perf_cpu_map__empty(evlist->core.user_requested_cpus);
> +
> +	if (per_cpu_mmaps)
> +		return perf_evsel__enable_cpu(&evsel->core, idx);
> +
> +	return perf_evsel__enable_thread(&evsel->core, idx);
> +}
> +
>  int auxtrace_record__read_finish(struct auxtrace_record *itr, int idx)
>  {
>  	struct evsel *evsel;
> diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
> index 9fcecf7daa62..f1309b39afe4 100644
> --- a/tools/perf/util/evlist.c
> +++ b/tools/perf/util/evlist.c
> @@ -538,16 +538,6 @@ void evlist__toggle_enable(struct evlist *evlist)
>  	(evlist->enabled ? evlist__disable : evlist__enable)(evlist);
>  }
>  
> -int evlist__enable_event_idx(struct evlist *evlist, struct evsel *evsel, int idx)
> -{
> -	bool per_cpu_mmaps = !perf_cpu_map__empty(evlist->core.user_requested_cpus);
> -
> -	if (per_cpu_mmaps)
> -		return perf_evsel__enable_cpu(&evsel->core, idx);
> -
> -	return perf_evsel__enable_thread(&evsel->core, idx);
> -}
> -
>  int evlist__add_pollfd(struct evlist *evlist, int fd)
>  {
>  	return perf_evlist__add_pollfd(&evlist->core, fd, NULL, POLLIN, fdarray_flag__default);
> diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h
> index a21daaa5fc1b..4062f5aebfc1 100644
> --- a/tools/perf/util/evlist.h
> +++ b/tools/perf/util/evlist.h
> @@ -196,8 +196,6 @@ void evlist__toggle_enable(struct evlist *evlist);
>  void evlist__disable_evsel(struct evlist *evlist, char *evsel_name);
>  void evlist__enable_evsel(struct evlist *evlist, char *evsel_name);
>  
> -int evlist__enable_event_idx(struct evlist *evlist, struct evsel *evsel, int idx);
> -
>  void evlist__set_selected(struct evlist *evlist, struct evsel *evsel);
>  
>  int evlist__create_maps(struct evlist *evlist, struct target *target);
> -- 
> 2.25.1

-- 

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ