[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bbffa9eb-0102-4c35-8b1a-4e26634aa878@amd.com>
Date: Tue, 15 Oct 2024 09:51:50 +0530
From: Ravi Bangoria <ravi.bangoria@....com>
To: Namhyung Kim <namhyung@...nel.org>, Ian Rogers <irogers@...gle.com>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>,
Kan Liang <kan.liang@...ux.intel.com>, Jiri Olsa <jolsa@...nel.org>,
Adrian Hunter <adrian.hunter@...el.com>,
Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...nel.org>,
LKML <linux-kernel@...r.kernel.org>, linux-perf-users@...r.kernel.org,
Mark Rutland <mark.rutland@....com>, James Clark <james.clark@....com>,
Kajol Jain <kjain@...ux.ibm.com>, Thomas Richter <tmricht@...ux.ibm.com>,
Atish Patra <atishp@...shpatra.org>, Palmer Dabbelt <palmer@...osinc.com>,
Mingwei Zhang <mizhang@...gle.com>, Ravi Bangoria <ravi.bangoria@....com>
Subject: Re: [PATCH 7/8] perf tools: Check fallback error and order
> @@ -2366,9 +2403,6 @@ static int evsel__open_cpu(struct evsel *evsel, struct perf_cpu_map *cpus,
> return 0;
>
> try_fallback:
> - if (evsel__precise_ip_fallback(evsel))
> - goto retry_open;
> -
> if (evsel__ignore_missing_thread(evsel, perf_cpu_map__nr(cpus),
> idx, threads, thread, err)) {
> /* We just removed 1 thread, so lower the upper nthreads limit. */
> @@ -2385,11 +2419,15 @@ static int evsel__open_cpu(struct evsel *evsel, struct perf_cpu_map *cpus,
> if (err == -EMFILE && rlimit__increase_nofile(&set_rlimit))
> goto retry_open;
>
> - if (err != -EINVAL || idx > 0 || thread > 0)
> - goto out_close;
> + if (err == -EOPNOTSUPP && evsel__precise_ip_fallback(evsel))
> + goto retry_open;
This will change the behavior of events like instructions:P on AMD.
Without patch:
$ ./perf record -e instructions:P -- true
[ perf record: Woken up 2 times to write data ]
[ perf record: Captured and wrote 0.009 MB perf.data (9 samples) ]
With the patch:
$ ./perf record -e instructions:P -- true
Error:
The instructions:Pu event is not supported.
Thanks,
Ravi
Powered by blists - more mailing lists