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]
Date:   Mon, 11 Nov 2019 14:30:33 +0100
From:   Jiri Olsa <jolsa@...hat.com>
To:     Andi Kleen <andi@...stfloor.org>
Cc:     jolsa@...nel.org, acme@...nel.org, linux-kernel@...r.kernel.org,
        Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH v5 09/13] perf evsel: Support opening on a specific CPU

On Thu, Nov 07, 2019 at 10:16:42AM -0800, Andi Kleen wrote:
> From: Andi Kleen <ak@...ux.intel.com>

SNIP

>  int perf_evsel__open_per_thread(struct evsel *evsel,
> diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
> index b10d5ba21966..54513d70c109 100644
> --- a/tools/perf/util/evsel.h
> +++ b/tools/perf/util/evsel.h
> @@ -223,7 +223,8 @@ int evsel__enable(struct evsel *evsel);
>  int evsel__disable(struct evsel *evsel);
>  
>  int perf_evsel__open_per_cpu(struct evsel *evsel,
> -			     struct perf_cpu_map *cpus);
> +			     struct perf_cpu_map *cpus,
> +			     int cpu);
>  int perf_evsel__open_per_thread(struct evsel *evsel,
>  				struct perf_thread_map *threads);
>  int evsel__open(struct evsel *evsel, struct perf_cpu_map *cpus,
> diff --git a/tools/perf/util/stat.c b/tools/perf/util/stat.c
> index 6822e4ffe224..36dc95032e4c 100644
> --- a/tools/perf/util/stat.c
> +++ b/tools/perf/util/stat.c
> @@ -517,7 +517,7 @@ int create_perf_stat_counter(struct evsel *evsel,
>  	}
>  
>  	if (target__has_cpu(target) && !target__has_per_thread(target))
> -		return perf_evsel__open_per_cpu(evsel, evsel__cpus(evsel));
> +		return perf_evsel__open_per_cpu(evsel, evsel__cpus(evsel), -1);

how will -1 owrk in here? it will end up as:

   perf_evsel__open_per_cpu
    evsel__open_cpu( ...., start_cpu = -1, end_cpu = -1 + 1)
      for (cpu = start_cpu; cpu < end_cpu; cpu++) {

?

jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ