From: "Jin, Yao" <yao.jin@linux.intel.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: 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
Subject: Re: [PATCH v1 1/4] perf annotate: create a new hists to manage multiple events samples
Date: Thu, 14 Sep 2017 09:03:55 +0800 [thread overview]
Message-ID: <561eb4d7-ce80-a62d-ade3-e9b95028748f@linux.intel.com> (raw)
In-Reply-To: <cc9bbc50-a97f-6cc3-7811-8cfbe022c56b@linux.intel.com>
On 9/11/2017 9:33 AM, Jin, Yao wrote:
>
>
> On 9/8/2017 9:43 PM, Arnaldo Carvalho de Melo wrote:
>> Em Wed, Aug 16, 2017 at 06:18:33PM +0800, Jin Yao escreveu:
>>> An issue is found during using perf annotate.
>>>
>>> perf record -e cycles,branches ...
>>> perf annotate main --stdio
>>>
>>> The result only shows cycles. It should show both cycles and
>>> branches on the left side. It works with "--group", but need
>>> this to work even without groups.
>>>
>>> In current design, the hists is per event. So we need a new
>>> hists to manage the samples for multiple events and use a new
>>> hist_event data structure to save the map/symbol information
>>> for per event.
>> Humm, why do we need another hists? Don't we have one per evsel, don't
>> we have a evlist from where to get all of those evsels, can't we just
>> use that to add one column per evsel?
>>
>> - Arnaldo
>>
>
> Hi Arnaldo,
>
> I'm considering a case.
>
> Suppose we sample 2 events ("branches" and "cache-misses"). The samples of "branches" are hit in function A and the samples of "cache-misses" are hit in function B.
>
> The branches evsel has one hists and cache-misses evsel has another hists.
>
> The hists of branches evsel has one hist-entry which stands for the function A symbol. The hists of cache-misses evsel has one hist-entry which stands for the function B symbol.
>
> If we start to show the instructions in function B from cache-misses evsel, we will lose the function A.
>
> Because even if we get the branches evsel from the link in cache-misses evsel, but the function A is before function B and function B has been displayed yet, so the function A is lost.
>
> Considering the number of events can be greater than 2, the code will be much more complicated. So using a global hists should be an easy solution.
>
> Thanks
> Jin Yao
>
Hi Arnaldo,
Could the solution of using a new hists for multiple events be accepted?
Or anything I should update in the patches?
Thanks
Jin Yao
next prev parent reply other threads:[~2017-09-14 1:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-16 10:18 [PATCH v1 0/4] perf annotate: Display multiple events on the left side of annotate view Jin Yao
2017-08-16 10:18 ` [PATCH v1 1/4] perf annotate: create a new hists to manage multiple events samples Jin Yao
2017-09-08 13:43 ` Arnaldo Carvalho de Melo
2017-09-11 1:33 ` Jin, Yao
2017-09-14 1:03 ` Jin, Yao [this message]
2017-09-14 14:05 ` Arnaldo Carvalho de Melo
2017-09-14 14:31 ` Jin, Yao
2017-10-05 13:21 ` Arnaldo Carvalho de Melo
2017-10-06 16:31 ` Jin, Yao
2017-10-06 18:54 ` Arnaldo Carvalho de Melo
2017-10-09 1:40 ` Jin, Yao
2017-10-12 1:39 ` Jin, Yao
2017-08-16 10:18 ` [PATCH v1 2/4] perf annotate: Display multiple events for stdio mode Jin Yao
2017-08-16 10:18 ` [PATCH v1 3/4] perf annotate: Display multiple events for tui mode Jin Yao
2017-08-16 10:18 ` [PATCH v1 4/4] perf annotate: Display multiple events for gtk mode Jin Yao
2017-09-08 7:31 ` [PATCH v1 0/4] perf annotate: Display multiple events on the left side of annotate view Jin, Yao
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=561eb4d7-ce80-a62d-ade3-e9b95028748f@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=kan.liang@intel.com \
--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
Powered by JetHome