lkml.org 
[lkml]   [2022]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH V6 6/8] perf/tools: Extend branch type classification
From
Date

On 15/06/2022 04:21, Anshuman Khandual wrote:
> [...]
>
> +const char *get_branch_type(struct branch_entry *e)
> +{
> + if (e->flags.type == PERF_BR_UNKNOWN)
> + return "";
>> There is a small change of behavior in "perf script --field brstack".
>> Unknown branches were printed as "-" before but now it's an empty
>> string.
> get_branch_type() replaces print output in two different functions.
> branch_stack__printf() used to print a space " " for PERF_BR_UNKNOWN,
> and print_bstack_flags() used to print a "-" for PERF_BR_UNKNOWN.
> When they are factorized via get_branch_type(), one of those print
> formats need to be choosen.

Thanks for clarifying, Anshuman. I only bring it up in case somebody is
parsing this line for their use case. While running on x86 I came across
some UNKNOWN branches during my runs.

I have updated and sent a generic branch stack sampling perf test that
supports both ("-" and empty string) just in case. Hope it's useful.

https://lore.kernel.org/all/20220615130901.1151397-1-german.gomez@arm.com/

Thanks,
German

\
 
 \ /
  Last update: 2022-06-15 15:39    [W:0.060 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site