Re: [PATCH v5 00/14] A patch series improving data quality of perf test for CoreSight
From: Mike Leach
Date: Thu Aug 11 2022 - 12:35:21 EST
Hi Carsten,
Been running the tests on my Dragonboard DB410 and see the following:-
1) for every test I get a warning of the form:-
[ 4167.796633] cma: cma_alloc: reserved: alloc failed, req-size: 4096
pages, ret: -12
meaning the initial allocation for teh perf buffer has failed.
is the allocation size for the perf buffer mmap fixed or can it be set
for the individual target?
Not sure if this is a worry - as far as I recall, if the ETR driver
cannot set a buffer size it reduces till it can.
2) A couple of the TID tests fail in my case, but the interesting
output I get if I use -v is=>
77: CoreSight / Thread Loop 10 Threads - Check TID :
--- start ---
test child forked, pid 4646
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 2.005 MB
./perf-thread_loop-check-tid-10th.data ]
Warning:
Please install libunwind or libdw development packages during the perf build.
Warning:
AUX data lost 2 times out of 2!
Thread IDs 4662 4662 4662 4662 4662 4662 4662 4662 not found in perf AUX data
test child finished with -1
---- end ----
CoreSight / Thread Loop 10 Threads - Check TID: FAILED!
78: CoreSight / Thread Loop 2 Threads - Check TID :
--- start ---
test child forked, pid 4693
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.005 MB
./perf-thread_loop-check-tid-2th.data ]
Warning:
Please install libunwind or libdw development packages during the perf build.
Thread IDs 4699 4699 not found in perf AUX data
test child finished with -1
---- end ----
Are we expecting the same TID to be repeated in that way?
Regards
Mike
On Thu, 28 Jul 2022 at 15:53, <carsten.haitzler@xxxxxxxxxxxx> wrote:
>
> From: "Carsten Haitzler (Rasterman)" <raster@xxxxxxxxxxxxx>
>
> This is a prelude to adding more tests to shell tests and in order to
> support putting those tests into subdirectories, I need to change the
> test code that scans/finds and runs them.
>
> To support subdirs I have to recurse so it's time to refactor the code to
> allow this and centralize the shell script finding into one location and
> only one single scan that builds a list of all the found tests in memory
> instead of it being duplicated in 3 places.
>
> This code also optimizes things like knowing the max width of desciption
> strings (as we can do that while we scan instead of a whole new pass
> of opening files). It also more cleanly filters scripts to see only
> *.sh files thus skipping random other files in directories like *~
> backup files, other random junk/data files that may appear and the
> scripts must be executable to make the cut (this ensures the script
> lib dir is not seen as scripts to run). This avoids perf test running
> previous older versions of test scripts that are editor backup files
> as well as skipping perf.data files that may appear and so on.
>
> Signed-off-by: Carsten Haitzler <carsten.haitzler@xxxxxxx>
>
> Carsten Haitzler (Rasterman) (14):
> perf test: Refactor shell tests allowing subdirs
> perf test: Add CoreSight shell lib shared code for future tests
> perf test: Add build infra for perf test tools for CoreSight tests
> perf test: Add asm pureloop test tool
> perf test: Add asm pureloop test shell script
> perf test: Add git ignore for perf data generated by the CoreSight
> tests
> perf test: Add memcpy thread test tool
> perf test: Add memcpy thread test shell script
> perf test: Add thread loop test tool
> perf test: Add thread loop test shell scripts
> perf test: Add unroll thread test tool
> perf test: Add unroll thread test shell script
> perf test: Add git ignore for tmp and output files of CoreSight tests
> perf test: Add relevant documentation about CoreSight testing
>
> .../trace/coresight/coresight-perf.rst | 160 ++++++++++++++
> MAINTAINERS | 1 +
> tools/perf/.gitignore | 6 +-
> tools/perf/Documentation/arm-coresight.txt | 5 +
> tools/perf/Makefile.perf | 18 +-
> tools/perf/tests/Build | 1 +
> tools/perf/tests/builtin-test-list.c | 207 ++++++++++++++++++
> tools/perf/tests/builtin-test-list.h | 12 +
> tools/perf/tests/builtin-test.c | 152 ++-----------
> tools/perf/tests/shell/coresight/Makefile | 30 +++
> .../tests/shell/coresight/Makefile.miniconfig | 24 ++
> .../tests/shell/coresight/asm_pure_loop.sh | 18 ++
> .../shell/coresight/asm_pure_loop/.gitignore | 1 +
> .../shell/coresight/asm_pure_loop/Makefile | 34 +++
> .../coresight/asm_pure_loop/asm_pure_loop.S | 28 +++
> .../shell/coresight/memcpy_thread/.gitignore | 1 +
> .../shell/coresight/memcpy_thread/Makefile | 33 +++
> .../coresight/memcpy_thread/memcpy_thread.c | 79 +++++++
> .../shell/coresight/memcpy_thread_16k_10.sh | 18 ++
> .../shell/coresight/thread_loop/.gitignore | 1 +
> .../shell/coresight/thread_loop/Makefile | 33 +++
> .../shell/coresight/thread_loop/thread_loop.c | 86 ++++++++
> .../coresight/thread_loop_check_tid_10.sh | 19 ++
> .../coresight/thread_loop_check_tid_2.sh | 19 ++
> .../coresight/unroll_loop_thread/.gitignore | 1 +
> .../coresight/unroll_loop_thread/Makefile | 33 +++
> .../unroll_loop_thread/unroll_loop_thread.c | 74 +++++++
> .../shell/coresight/unroll_loop_thread_10.sh | 18 ++
> tools/perf/tests/shell/lib/coresight.sh | 132 +++++++++++
> 29 files changed, 1105 insertions(+), 139 deletions(-)
> create mode 100644 Documentation/trace/coresight/coresight-perf.rst
> create mode 100644 tools/perf/Documentation/arm-coresight.txt
> create mode 100644 tools/perf/tests/builtin-test-list.c
> create mode 100644 tools/perf/tests/builtin-test-list.h
> create mode 100644 tools/perf/tests/shell/coresight/Makefile
> create mode 100644 tools/perf/tests/shell/coresight/Makefile.miniconfig
> create mode 100755 tools/perf/tests/shell/coresight/asm_pure_loop.sh
> create mode 100644 tools/perf/tests/shell/coresight/asm_pure_loop/.gitignore
> create mode 100644 tools/perf/tests/shell/coresight/asm_pure_loop/Makefile
> create mode 100644 tools/perf/tests/shell/coresight/asm_pure_loop/asm_pure_loop.S
> create mode 100644 tools/perf/tests/shell/coresight/memcpy_thread/.gitignore
> create mode 100644 tools/perf/tests/shell/coresight/memcpy_thread/Makefile
> create mode 100644 tools/perf/tests/shell/coresight/memcpy_thread/memcpy_thread.c
> create mode 100755 tools/perf/tests/shell/coresight/memcpy_thread_16k_10.sh
> create mode 100644 tools/perf/tests/shell/coresight/thread_loop/.gitignore
> create mode 100644 tools/perf/tests/shell/coresight/thread_loop/Makefile
> create mode 100644 tools/perf/tests/shell/coresight/thread_loop/thread_loop.c
> create mode 100755 tools/perf/tests/shell/coresight/thread_loop_check_tid_10.sh
> create mode 100755 tools/perf/tests/shell/coresight/thread_loop_check_tid_2.sh
> create mode 100644 tools/perf/tests/shell/coresight/unroll_loop_thread/.gitignore
> create mode 100644 tools/perf/tests/shell/coresight/unroll_loop_thread/Makefile
> create mode 100644 tools/perf/tests/shell/coresight/unroll_loop_thread/unroll_loop_thread.c
> create mode 100755 tools/perf/tests/shell/coresight/unroll_loop_thread_10.sh
> create mode 100644 tools/perf/tests/shell/lib/coresight.sh
>
> --
> 2.32.0
>
--
Mike Leach
Principal Engineer, ARM Ltd.
Manchester Design Centre. UK