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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YS6ExQdtIkejH46k@kernel.org>
Date:   Tue, 31 Aug 2021 16:36:37 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Riccardo Mancini <rickyman7@...il.com>
Cc:     Ian Rogers <irogers@...gle.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Mark Rutland <mark.rutland@....com>,
        Jiri Olsa <jolsa@...hat.com>, linux-kernel@...r.kernel.org,
        linux-perf-users@...r.kernel.org
Subject: Re: [RFC PATCH v1 18/37] perf evsel: add evsel__prepare_open function

Em Sat, Aug 21, 2021 at 11:19:24AM +0200, Riccardo Mancini escreveu:
> This function will prepare the evsel and disable the missing features.
> It will be used in one of the following patches.

Applied, fixed up this:

int evsel__prepare_open(struct evsel *evsel, struct perf_cpu_map *cpus,
                        struct perf_thread_map *threads)

I.e. the alignment of the second line with parms, please use this form
in your next patches.

- Arnaldo
 
> Signed-off-by: Riccardo Mancini <rickyman7@...il.com>
> ---
>  tools/perf/util/evsel.c | 14 ++++++++++++++
>  tools/perf/util/evsel.h |  2 ++
>  2 files changed, 16 insertions(+)
> 
> diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
> index f0bc89f743915800..4e9a3e62075305f1 100644
> --- a/tools/perf/util/evsel.c
> +++ b/tools/perf/util/evsel.c
> @@ -1827,6 +1827,20 @@ static void evsel__disable_missing_features(struct evsel *evsel)
>  		evsel->core.attr.sample_id_all = 0;
>  }
>  
> +int evsel__prepare_open(struct evsel *evsel, struct perf_cpu_map *cpus,
> +		struct perf_thread_map *threads)
> +{
> +	int err;
> +
> +	err = __evsel__prepare_open(evsel, cpus, threads);
> +	if (err)
> +		return err;
> +
> +	evsel__disable_missing_features(evsel);
> +
> +	return err;
> +}
> +
>  static int evsel__open_cpu(struct evsel *evsel, struct perf_cpu_map *cpus,
>  		struct perf_thread_map *threads,
>  		int start_cpu, int end_cpu)
> diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
> index 1c0057e80d080f2f..58aa998e1814ac9e 100644
> --- a/tools/perf/util/evsel.h
> +++ b/tools/perf/util/evsel.h
> @@ -286,6 +286,8 @@ int evsel__open_per_thread(struct evsel *evsel, struct perf_thread_map *threads)
>  int evsel__open(struct evsel *evsel, struct perf_cpu_map *cpus,
>  		struct perf_thread_map *threads);
>  void evsel__close(struct evsel *evsel);
> +int evsel__prepare_open(struct evsel *evsel, struct perf_cpu_map *cpus,
> +		struct perf_thread_map *threads);
>  
>  struct perf_sample;
>  
> -- 
> 2.31.1

-- 

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ