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: <a7f01bb8-9b5a-6121-5fcc-38ddffa633fe@arm.com> Date: Wed, 19 Jan 2022 16:58:48 +0000 From: James Clark <james.clark@....com> To: carsten.haitzler@...s.arm.com, linux-kernel@...r.kernel.org Cc: coresight@...ts.linaro.org, inux-perf-users@...r.kernel.org, acme@...nel.org, mike.leach@...aro.org, suzuki K Poulose <suzuki.poulose@....com>, Leo Yan <leo.yan@...aro.org>, Mathieu Poirier <mathieu.poirier@...aro.org>, Anshuman Khandual <anshuman.khandual@....com> Subject: Re: [PATCH 04/12] perf test: Add beginning of test infra + test to exercise coresight On 15/12/2021 16:03, carsten.haitzler@...s.arm.com wrote: > From: Carsten Haitzler <carsten.haitzler@....com> > > This adds the initial test harness to run perf record and examine the > resuling output when coresight is enabled on arm64 and check the > resulting quality of the output as part of perf test. > > Signed-off-by: Carsten Haitzler <carsten.haitzler@....com> > --- [...] > diff --git a/tools/perf/tests/shell/coresight_asm_pure_loop.sh b/tools/perf/tests/shell/coresight_asm_pure_loop.sh > new file mode 100755 > index 000000000000..542d4a37e349 > --- /dev/null > +++ b/tools/perf/tests/shell/coresight_asm_pure_loop.sh > @@ -0,0 +1,18 @@ > +#!/bin/sh -e > +# Coresight / ASM Pure Loop > + > +# SPDX-License-Identifier: GPL-2.0 > +# Carsten Haitzler <carsten.haitzler@....com>, 2021 > + > +TEST="asm_pure_loop" > +. $(dirname $0)/lib/coresight.sh > +ARGS="" > +DATV="out" > +DATA="$DATD/perf-$TEST-$DATV.data" > + > +perf record $PERFRECOPT -o "$DATA" "$BIN" $ARGS > + > +perf_dump_aux_verify "$DATA" 2601 334 334 > + > +err=$? > +exit $err > diff --git a/tools/perf/tests/shell/lib/coresight.sh b/tools/perf/tests/shell/lib/coresight.sh > new file mode 100644 > index 000000000000..cd6c1283e6f5 > --- /dev/null > +++ b/tools/perf/tests/shell/lib/coresight.sh > @@ -0,0 +1,130 @@ > +# SPDX-License-Identifier: GPL-2.0 > +# Carsten Haitzler <carsten.haitzler@....com>, 2021 > + > +# This is sourced from a driver script so no need for #!/bin... etc. at the > +# top - the assumption below is that it runs as part of sourcing after the > +# test sets up some basic env vars to say what it is. > + > +# perf record options for the perf tests to use > +PERFRECMEM="-m ,128M" > +PERFRECOPT="$PERFRECMEM -e cs_etm//u" > + > +# These tests need to be run as root or coresight won't allow large buffers > +# and will not collect proper data I've somewhat fixed this with the change 7cc9680c4be. Can you re-test that it works without sudo? I think it's best to avoid it unless necessary and the cs_etm//u seems to suggest that it's not necessary. If 'proper data' can't be collected without root then it seems more like the tests have found a real issue to fix rather than something to be worked around. James
Powered by blists - more mailing lists