[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201031202307.GB3380099@krava>
Date: Sat, 31 Oct 2020 21:23:07 +0100
From: Jiri Olsa <jolsa@...hat.com>
To: Leo Yan <leo.yan@...aro.org>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Namhyung Kim <namhyung@...nel.org>,
John Garry <john.garry@...wei.com>,
Will Deacon <will@...nel.org>,
Mathieu Poirier <mathieu.poirier@...aro.org>,
Kemeng Shi <shikemeng@...wei.com>,
"Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com>,
Ian Rogers <irogers@...gle.com>, Al Grant <Al.Grant@....com>,
James Clark <james.clark@....com>,
Wei Li <liwei391@...wei.com>,
André Przywara <andre.przywara@....com>,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v3 3/9] perf mem: Support new memory event
PERF_MEM_EVENTS__LOAD_STORE
On Wed, Oct 28, 2020 at 02:38:07PM +0800, Leo Yan wrote:
SNIP
> struct stat st;
>
> + /*
> + * If the event entry isn't valid, skip initialization
> + * and "e->supported" will keep false.
> + */
> + if (!e->tag)
> + continue;
> +
> scnprintf(path, PATH_MAX, "%s/devices/%s",
> mnt, e->sysfs_name);
>
> @@ -123,7 +134,7 @@ void perf_mem_events__list(void)
> struct perf_mem_event *e = perf_mem_events__ptr(j);
>
> fprintf(stderr, "%-13s%-*s%s\n",
> - e->tag,
> + e->tag ? e->tag : "",
nit, could be: e->tag ?: "",
jirka
> verbose > 0 ? 25 : 0,
> verbose > 0 ? perf_mem_events__name(j) : "",
> e->supported ? ": available" : "");
> diff --git a/tools/perf/util/mem-events.h b/tools/perf/util/mem-events.h
> index 726a9c8103e4..5ef178278909 100644
> --- a/tools/perf/util/mem-events.h
> +++ b/tools/perf/util/mem-events.h
> @@ -28,6 +28,7 @@ struct mem_info {
> enum {
> PERF_MEM_EVENTS__LOAD,
> PERF_MEM_EVENTS__STORE,
> + PERF_MEM_EVENTS__LOAD_STORE,
> PERF_MEM_EVENTS__MAX,
> };
>
> --
> 2.17.1
>
Powered by blists - more mailing lists