lkml.org 
[lkml]   [2017]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v4 4/5] perf report: Show branch type statistics for stdio mode
From
Date


On 4/19/2017 2:53 AM, Jiri Olsa wrote:
> On Wed, Apr 12, 2017 at 06:21:05AM +0800, Jin Yao wrote:
>
> SNIP
>
>> +const char *branch_type_name(int type)
>> +{
>> + const char *branch_names[PERF_BR_MAX] = {
>> + "N/A",
>> + "JCC",
>> + "JMP",
>> + "IND_JMP",
>> + "CALL",
>> + "IND_CALL",
>> + "RET",
>> + "SYSCALL",
>> + "SYSRET",
>> + "IRQ",
>> + "INT",
>> + "IRET",
>> + "FAR_BRANCH",
>> + };
>> +
>> + if ((type >= 0) && (type < PERF_BR_MAX))
>> + return branch_names[type];
>> +
>> + return NULL;
> looks like we should add util/branch.c with above functions
> and merge it with util/parse-branch-options.c
>
> we create new file even for less code ;-)
>
> thanks,
> jirka

Could we directly add branch_type_name() in util/parse-branch-options.c?

I just feel it's a bit waste of creating a new file for less code. :)

Thanks
Jin Yao

\
 
 \ /
  Last update: 2017-04-19 02:53    [W:0.108 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site