linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Jin, Yao" <yao.jin@linux.intel.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: acme@kernel.org, jolsa@kernel.org, peterz@infradead.org,
	mingo@redhat.com, alexander.shishkin@linux.intel.com,
	Linux-kernel@vger.kernel.org, ak@linux.intel.com,
	kan.liang@intel.com, yao.jin@intel.com,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v4 4/5] perf report: Show branch type statistics for stdio mode
Date: Wed, 19 Apr 2017 12:11:49 +0800	[thread overview]
Message-ID: <8a75c7ac-5802-7e45-08d2-a83ec2e05f8e@linux.intel.com> (raw)
In-Reply-To: <2cc8fa33-f0f8-d202-f663-d3b6cfef43d0@linux.intel.com>



On 4/19/2017 8:53 AM, Jin, Yao wrote:
>
>
> 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

After considering again, yes, creating util/branch.c should be better. I 
will do that.

Thanks
Jin Yao

  reply	other threads:[~2017-04-19  4:11 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-11 22:21 [PATCH v4 0/5] perf report: Show branch type Jin Yao
2017-04-11 22:21 ` [PATCH v4 1/5] perf/core: Define the common branch type classification Jin Yao
2017-04-11 22:21 ` [PATCH v4 2/5] perf/x86/intel: Record branch type Jin Yao
2017-04-11 22:21 ` [PATCH v4 3/5] perf record: Create a new option save_type in --branch-filter Jin Yao
2017-04-11 22:21 ` [PATCH v4 4/5] perf report: Show branch type statistics for stdio mode Jin Yao
2017-04-18 18:53   ` Jiri Olsa
2017-04-19  0:53     ` Jin, Yao
2017-04-19  4:11       ` Jin, Yao [this message]
2017-04-18 18:53   ` Jiri Olsa
2017-04-19  0:41     ` Jin, Yao
2017-04-11 22:21 ` [PATCH v4 5/5] perf report: Show branch type in callchain entry Jin Yao
2017-04-18 18:53   ` Jiri Olsa
2017-04-19  0:33     ` Jin, Yao
2017-04-18 18:53   ` Jiri Olsa
2017-04-19  0:32     ` Jin, Yao
2017-04-12 10:58 ` [PATCH v4 0/5] perf report: Show branch type Jiri Olsa
2017-04-12 12:25   ` Jin, Yao
2017-04-12 14:26     ` Jiri Olsa
2017-04-12 15:42       ` Jin, Yao
2017-04-12 15:46         ` Jiri Olsa
2017-04-13  2:00   ` Jin, Yao
2017-04-13  3:25     ` Jin, Yao
2017-04-13  8:26       ` Jiri Olsa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8a75c7ac-5802-7e45-08d2-a83ec2e05f8e@linux.intel.com \
    --to=yao.jin@linux.intel.com \
    --cc=Linux-kernel@vger.kernel.org \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=jolsa@kernel.org \
    --cc=jolsa@redhat.com \
    --cc=kan.liang@intel.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=yao.jin@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).