[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z1Jc/wZk5kSd+2Qc@xsang-OptiPlex-9020>
Date: Fri, 6 Dec 2024 10:10:07 +0800
From: Oliver Sang <oliver.sang@...el.com>
To: Namhyung Kim <namhyung@...nel.org>
CC: <oe-lkp@...ts.linux.dev>, <lkp@...el.com>, <linux-kernel@...r.kernel.org>,
Arnaldo Carvalho de Melo <acme@...nel.org>, James Clark
<james.clark@...aro.org>, Ravi Bangoria <ravi.bangoria@....com>, Kan Liang
<kan.liang@...ux.intel.com>, James Clark <james.clark@....com>, Atish Patra
<atishp@...shpatra.org>, Mingwei Zhang <mizhang@...gle.com>, Kajol Jain
<kjain@...ux.ibm.com>, Thomas Richter <tmricht@...ux.ibm.com>, Palmer Dabbelt
<palmer@...osinc.com>, <linux-perf-users@...r.kernel.org>,
<oliver.sang@...el.com>
Subject: Re: [linus:master] [perf tools] af954f76ee:
perf-sanity-tests.Test_data_symbol.fail
hi, Namhyung Kim,
On Wed, Dec 04, 2024 at 02:21:06PM -0800, Namhyung Kim wrote:
> On Wed, Dec 04, 2024 at 01:44:06PM -0800, Namhyung Kim wrote:
> [SNIP]
> > perf_event_attr:
> > type 4 (cpu)
> > size 136
> > config 0x1cd (mem-loads)
> > { sample_period, sample_freq } 4000
> > sample_type IP|TID|TIME|ADDR|CPU|PERIOD|IDENTIFIER|DATA_SRC|WEIGHT_STRUCT
> > read_format ID|LOST
> > freq 1
> > precise_ip 3
> > sample_id_all 1
> > { bp_addr, config1 } 0x1f
> > ------------------------------------------------------------
> > sys_perf_event_open: pid -1 cpu 0 group_fd 5 flags 0x8
> > sys_perf_event_open failed, error -22
> > Using PERF_SAMPLE_READ / :S modifier is not compatible with inherit, falling back to no-inherit.
> > Error:
> > The sys_perf_event_open() syscall returned with 22 (Invalid argument) for event (cpu/mem-loads,ldlat=30/).
> > "dmesg | grep -i perf" may provide additional information.
> >
> > There's an issue with fallback on the inherit bit with the sample read.
> > I'll take a look.
>
> Hmm, no. It doesn't have neight SAMPLE_READ nor inherit. So the error
> message was misleading. Maybe it should be printed when it actually
> clears the bits.
>
> Anyway, I've tested with the old code and realzed that it might be due
> to precise_ip being 3. I expected it'd return EOPNOTSUPP for the case
> but it seems to return EINVAL sometimes. Then it should check it after
> the missing features like below. Can you please test?
sorry that we are refining our config these days, then broke the test for this
case for now. we will fix it but it will delay the test for your patch.
fortunately, we saw Arnaldo tested patch. hope our delay won't cause too much
inconvenience.
>
> Thanks,
> Namhyung
>
>
> ---8<---
> diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
> index f745723d486ba962..d22c5df1701eccc5 100644
> --- a/tools/perf/util/evsel.c
> +++ b/tools/perf/util/evsel.c
> @@ -2571,12 +2571,12 @@ 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 == -EOPNOTSUPP && evsel__precise_ip_fallback(evsel))
> - goto retry_open;
> -
> if (err == -EINVAL && evsel__detect_missing_features(evsel))
> goto fallback_missing_features;
>
> + if (evsel__precise_ip_fallback(evsel))
> + goto retry_open;
> +
> if (evsel__handle_error_quirks(evsel, err))
> goto retry_open;
>
>
Powered by blists - more mailing lists