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 b9f6fbb3b2 ("perf
arm64: Inject missing frames when using 'perf record --call-graph=fp'")
isn't applied.
Fixes: b9f6fbb3b2 ("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>