summaryrefslogtreecommitdiff
path: root/tools/perf/tests/thread-stack.c
AgeCommit message (Collapse)Author
9 daysperf sample: Allow decoders to supply branch return addressesLeo Yan
The thread stack derives return addresses from IP + insn_len. For an interrupt or fault, the return address can instead be the sample IP even when instruction bytes at that address are available. Add ret_addr to perf_sample and prefer it in thread_stack__trace_end() and thread_stack__process() when supplied. Initialize it to zero so other samples retain the IP + insn_len calculation. Add a regression test for explicit exception return addresses and the ordinary call fallback when the return address is zero. Reviewed-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: James Clark <james.clark@linaro.org> Signed-off-by: Leo Yan <leo.yan@arm.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org>