OSDN Git Service

perf test arm64: Test unwinding using fame-pointer (fp) mode
authorGerman Gomez <german.gomez@arm.com>
Wed, 16 Mar 2022 17:20:15 +0000 (17:20 +0000)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 21 Mar 2022 21:05:23 +0000 (18:05 -0300)
commitcd6382d82752737e43ef3617bb9e72913d2b1d47
tree2103c66be2694c238d66681c465029b79646ab80
parent5edc3c618bb877b3a071b7ea93450bef42f53850
perf test arm64: Test unwinding using fame-pointer (fp) mode

Add a shell script to check that the call-graphs generated using frame
pointers (--call-graph fp) are complete and not missing leaf functions:

  | $ perf test 88 -v
  |  88: Check Arm64 callgraphs are complete in fp mode                  :
  | --- start ---
  | test child forked, pid 8734
  |  + Compiling test program (/tmp/test_program.Cz3yL)...
  |  + Recording (PID=8749)...
  |  + Stopping perf-record...
  | test_program.Cz
  |                  728 leaf
  |                  753 parent
  |                  76c main
  | test child finished with 0
  | ---- end ----
  | Check Arm SPE callgraphs are complete in fp mode: Ok

It's supposed to work with both unwinders:

  | $ make                # for libunwind (default)
  | $ make NO_LIBUNWIND=1 # for libdw

Tester notes:

Ran it on N1SDP and it passes, and it fails if b9f6fbb3b2c29736 ("perf
arm64: Inject missing frames when using 'perf record --call-graph=fp'")
isn't applied.

Fixes: b9f6fbb3b2c29736 ("perf arm64: Inject missing frames when using 'perf record --call-graph=fp'")
Suggested-by: Jiri Olsa <jolsa@kernel.org>
Reviewed-by: James Clark <james.clark@arm.com>
Tested-by: James Clark <james.clark@arm.com>
Signed-off-by: German Gomez <german.gomez@arm.com>
Cc: Alexandre Truong <alexandre.truong@arm.com>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20220316172015.98000-1-german.gomez@arm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/shell/test_arm_callgraph_fp.sh [new file with mode: 0755]