Hi Alexandre,

On Thu, Mar 04, 2021 at 04:32:54PM +0000, Alexandre Truong wrote:
> On arm64, enable dwarf_callchain_users which will be needed
> to do a dwarf unwind in order to get the caller of the leaf frame.
> 
> Signed-off-by: Alexandre Truong <alexandre.tru...@arm.com>
> Cc: John Garry <john.ga...@huawei.com>
> Cc: Will Deacon <w...@kernel.org>
> Cc: Mathieu Poirier <mathieu.poir...@linaro.org>
> Cc: Leo Yan <leo....@linaro.org>
> Cc: Peter Zijlstra <pet...@infradead.org>
> Cc: Ingo Molnar <mi...@redhat.com>
> Cc: Arnaldo Carvalho de Melo <a...@kernel.org>
> Cc: Mark Rutland <mark.rutl...@arm.com>
> Cc: Alexander Shishkin <alexander.shish...@linux.intel.com>
> Cc: Jiri Olsa <jo...@redhat.com>
> Cc: Namhyung Kim <namhy...@kernel.org>
> Cc: Kemeng Shi <shikem...@huawei.com>
> Cc: Ian Rogers <irog...@google.com>
> Cc: Andi Kleen <a...@linux.intel.com>
> Cc: Kan Liang <kan.li...@linux.intel.com>
> Cc: Jin Yao <yao....@linux.intel.com>
> Cc: Adrian Hunter <adrian.hun...@intel.com>
> Cc: Suzuki K Poulose <suzuki.poul...@arm.com>
> Cc: Al Grant <al.gr...@arm.com>
> Cc: James Clark <james.cl...@arm.com>
> Cc: Wilco Dijkstra <wilco.dijks...@arm.com>
> ---
>  tools/perf/builtin-report.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
> index 2a845d6cac09..93661a3eaeb1 100644
> --- a/tools/perf/builtin-report.c
> +++ b/tools/perf/builtin-report.c
> @@ -405,6 +405,10 @@ static int report__setup_sample_type(struct report *rep)
>  
>       callchain_param_setup(sample_type);
>  
> +     if (callchain_param.record_mode == CALLCHAIN_FP &&
> +                     strncmp(rep->session->header.env.arch, "aarch64", 7) == 
> 0)
> +             dwarf_callchain_users = true;
> +

I don't have knowledge for dwarf or FP.

This patch is suspicious for me that since it only fixes the issue for
"perf report" command, but it cannot support "perf script".

I did a quick testing for "perf script" command with the test code from
patch 04, seems to me it cannot fix the fp omitting issue for
"perf script" command:

  arm64_fp_test 11211  2282.355095:     176307 cycles: 
              aaaac2e40740 f2+0x10 (/root/arm64_fp_test)
              aaaac2e4061c main+0xc (/root/arm64_fp_test)
              ffff961fbd24 __libc_start_main+0xe4 
(/usr/lib/aarch64-linux-gnu/libc-2.28.so)
              aaaac2e4065c _start+0x34 (/root/arm64_fp_test)

Could you check for this?  Thanks!

Leo

>       if (rep->stitch_lbr && (callchain_param.record_mode != CALLCHAIN_LBR)) {
>               ui__warning("Can't find LBR callchain. Switch off 
> --stitch-lbr.\n"
>                           "Please apply --call-graph lbr when recording.\n");
> -- 
> 2.23.0
> 

Reply via email to