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
| ||
|
Message-ID: <CAP-5=fUHT29Z8Y5pMdTWK4mLKAXrNTtC5RBpet6UsAy4TLDfDw@mail.gmail.com> Date: Mon, 17 Jan 2022 08:28:07 -0800 From: Ian Rogers <irogers@...gle.com> To: German Gomez <german.gomez@....com> Cc: James Clark <james.clark@....com>, linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org, Chase Conklin <chase.conklin@....com>, Mark Rutland <mark.rutland@....com>, Alexander Shishkin <alexander.shishkin@...ux.intel.com>, Jiri Olsa <jolsa@...hat.com>, Namhyung Kim <namhyung@...nel.org>, Martin KaFai Lau <kafai@...com>, Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>, John Fastabend <john.fastabend@...il.com>, KP Singh <kpsingh@...nel.org>, Arnaldo Carvalho de Melo <acme@...hat.com>, Stephane Eranian <eranian@...gle.com>, netdev@...r.kernel.org, bpf@...r.kernel.org, "acme@...nel.org" <acme@...nel.org> Subject: Re: [PATCH] perf record/arm-spe: Override attr->sample_period for non-libpfm4 events On Mon, Jan 17, 2022 at 2:27 AM German Gomez <german.gomez@....com> wrote: > > Hi James, > > On 17/01/2022 09:59, James Clark wrote: > > > > On 14/01/2022 21:21, German Gomez wrote: > >> A previous commit preventing attr->sample_period values from being > >> overridden in pfm events changed a related behaviour in arm_spe. > >> > >> Before this patch: > >> perf record -c 10000 -e arm_spe_0// -- sleep 1 > >> > >> Would not yield an SPE event with period=10000, because the arm-spe code > > Just to clarify, this seems like it should say "Would yield", not "Would not yield", > > as in it was previously working? > > "this patch" refers to the patch I'm sending, not the one it's fixing. > I might have to rewrite this to make it more clear. How about: > > === > A previous patch preventing "attr->sample_period" values from being > overridden in pfm events changed a related behaviour in arm-spe. > > Before said patch: > perf record -c 10000 -e arm_spe_0// -- sleep 1 > > Would yield an SPE event with period=10000. After the patch, the period > in "-c 10000" was being ignored because the arm-spe code initializes > sample_period to a non-zero value. > > This patch restores the previous behaviour for non-libpfm4 events. > === Thanks for fixing this, I can add an acked-by for the v2 patch. Could we add a test for this to avoid future regressions? There are similar tests for frequency like: https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/tree/tools/perf/tests/attr/test-record-freq based on the attr.py test: https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/tree/tools/perf/tests/attr.py The test specifies a base type of event attribute and then what is modified by the test. It takes a little to get your head around but having a test for this would be a welcome addition. Thanks! Ian > Thanks for the review, > German
Powered by blists - more mailing lists