[PATCH v4 4/6] perf tools: enable dwarf_callchain_users on arm64
German Gomez
german.gomez at arm.com
Fri Dec 17 04:08:59 PST 2021
On 15/12/2021 16:37, Mark Rutland wrote:
> On Wed, Dec 15, 2021 at 03:11:36PM +0000, German Gomez wrote:
>> [...]
>>
>> +
>> + /*
>> + * It's possible to determine the caller of leaf frames with omitted
>> + * frame pointers on aarch64 using libunwind, so enable it.
>> + */
> I reckon it's worth mentioning *why* we need to do this; how about:
>
> /*
> * It's necessary to use libunwind to reliably determine the caller of
> * a leaf function on aarch64, as otherwise we cannot know whether to
> * start from the LR or FP.
> *
> * Always starting from the LR can result in duplicate or entirely
> * erroneous entries. Always skipping the LR and starting from the FP
> * can result in missing entries.
> */
>
> Other than that, this looks fine to me!
>
> Thanks,
> Mark.
Ack, I will update this
Thanks,
German
>
>> + if (callchain_param.record_mode == CALLCHAIN_FP && !strcmp(arch, "arm64"))
>> + dwarf_callchain_users = true;
>> }
>>
>> static bool chain_match(struct callchain_list *base_chain,
>> diff --git a/tools/perf/util/callchain.h b/tools/perf/util/callchain.h
>> index 77fba053c677..d95615daed73 100644
>> --- a/tools/perf/util/callchain.h
>> +++ b/tools/perf/util/callchain.h
>> @@ -300,7 +300,7 @@ int callchain_branch_counts(struct callchain_root *root,
>> u64 *branch_count, u64 *predicted_count,
>> u64 *abort_count, u64 *cycles_count);
>>
>> -void callchain_param_setup(u64 sample_type);
>> +void callchain_param_setup(u64 sample_type, const char *arch);
>>
>> bool callchain_cnode_matched(struct callchain_node *base_cnode,
>> struct callchain_node *pair_cnode);
>> --
>> 2.25.1
>>
More information about the linux-arm-kernel
mailing list