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: <7b23aee2-9fec-e07c-4ca1-076a061c558b@linux.intel.com>
Date:   Thu, 1 Jun 2023 09:52:06 -0400
From:   "Liang, Kan" <kan.liang@...ux.intel.com>
To:     Ian Rogers <irogers@...gle.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Adrian Hunter <adrian.hunter@...el.com>,
        Rob Herring <robh@...nel.org>,
        Ravi Bangoria <ravi.bangoria@....com>,
        linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
        Thomas Richter <tmricht@...ux.ibm.com>
Subject: Re: [PATCH v2 1/4] perf pmu: Correct perf_pmu__auto_merge_stats
 affecting hybrid



On 2023-06-01 4:29 a.m., Ian Rogers wrote:
> Flip the return value correcting a bug.

The bug is that perf fails to create a normal core event on each hybrid
PMU even if the event is available on all hybrid PMUs.

Without the patch,

 # ./perf_old stat -e inst_retired.any -a sleep 1

 Performance counter stats for 'system wide':

        21,760,495      cpu_core/inst_retired.any/

       1.004010591 seconds time elapsed

With the patch,

 # ./perf stat -e inst_retired.any -a sleep 1

 Performance counter stats for 'system wide':

        19,874,833      cpu_core/inst_retired.any/
         3,102,256      cpu_atom/inst_retired.any/

       1.004081307 seconds time elapsed

I think we need to fold the above to the description.

Thanks,
Kan
> 
> Fixes: 6b9da2607030 ("perf pmu: Remove is_pmu_hybrid")
> Reported-by: Kan Liang <kan.liang@...ux.intel.com>
> Signed-off-by: Ian Rogers <irogers@...gle.com>
> ---
>  tools/perf/util/pmu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
> index 0520aa9fe991..36e163f38368 100644
> --- a/tools/perf/util/pmu.c
> +++ b/tools/perf/util/pmu.c
> @@ -1424,7 +1424,7 @@ bool perf_pmu__supports_legacy_cache(const struct perf_pmu *pmu)
>  
>  bool perf_pmu__auto_merge_stats(const struct perf_pmu *pmu)
>  {
> -	return pmu->is_core && perf_pmus__num_core_pmus() > 1;
> +	return pmu->is_core && perf_pmus__num_core_pmus() == 1;
>  }
>  
>  bool perf_pmu__have_event(const struct perf_pmu *pmu, const char *name)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ