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: <a2a5e3ab-18ca-d61a-73bb-d60b9c2c8929@arm.com>
Date:   Wed, 28 Sep 2022 11:41:22 +0100
From:   James Clark <james.clark@....com>
To:     Namhyung Kim <namhyung@...nel.org>
Cc:     Ingo Molnar <mingo@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Ian Rogers <irogers@...gle.com>,
        Adrian Hunter <adrian.hunter@...el.com>,
        linux-perf-users@...r.kernel.org, Andi Kleen <ak@...ux.intel.com>,
        Kan Liang <kan.liang@...ux.intel.com>,
        Leo Yan <leo.yan@...aro.org>,
        Zhengjun Xing <zhengjun.xing@...ux.intel.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Jiri Olsa <jolsa@...nel.org>
Subject: Re: [PATCH 2/6] perf stat: Don't call perf_stat_evsel_id_init()
 repeatedly



On 26/09/2022 21:07, Namhyung Kim wrote:
> The evsel__reset_stat_priv() is called more than once if user gave -r
> option for multiple run.  But it doesn't need to re-initialize the id.
> 
> Signed-off-by: Namhyung Kim <namhyung@...nel.org>
> ---
>  tools/perf/util/stat.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Reviewed-by: James Clark <james.clark@....com>

> diff --git a/tools/perf/util/stat.c b/tools/perf/util/stat.c
> index 6bcd3dc32a71..e1d3152ce664 100644
> --- a/tools/perf/util/stat.c
> +++ b/tools/perf/util/stat.c
> @@ -135,7 +135,6 @@ static void evsel__reset_stat_priv(struct evsel *evsel)
>  	struct perf_stat_evsel *ps = evsel->stats;
>  
>  	init_stats(&ps->res_stats);
> -	perf_stat_evsel_id_init(evsel);
>  }
>  
>  static int evsel__alloc_stat_priv(struct evsel *evsel)
> @@ -143,6 +142,7 @@ static int evsel__alloc_stat_priv(struct evsel *evsel)
>  	evsel->stats = zalloc(sizeof(struct perf_stat_evsel));
>  	if (evsel->stats == NULL)
>  		return -ENOMEM;
> +	perf_stat_evsel_id_init(evsel);
>  	evsel__reset_stat_priv(evsel);
>  	return 0;
>  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ