Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1730110 > unrolled thread

Re: [PATCH v1 1/4] perf annotate: create a new hists to manage multiple events samples

Started by"Jin, Yao" <yao.jin@linux.intel.com>
First post2017-09-11 03:40 +0200
Last post2017-09-14 16:40 +0200
Articles 4 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v1 1/4] perf annotate: create a new hists to manage  multiple events samples "Jin, Yao" <yao.jin@linux.intel.com> - 2017-09-11 03:40 +0200
    Re: [PATCH v1 1/4] perf annotate: create a new hists to manage  multiple events samples "Jin, Yao" <yao.jin@linux.intel.com> - 2017-09-14 03:10 +0200
      Re: [PATCH v1 1/4] perf annotate: create a new hists to manage  multiple events samples Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-09-14 16:10 +0200
        Re: [PATCH v1 1/4] perf annotate: create a new hists to manage  multiple events samples "Jin, Yao" <yao.jin@linux.intel.com> - 2017-09-14 16:40 +0200

#1730110 — Re: [PATCH v1 1/4] perf annotate: create a new hists to manage multiple events samples

From"Jin, Yao" <yao.jin@linux.intel.com>
Date2017-09-11 03:40 +0200
SubjectRe: [PATCH v1 1/4] perf annotate: create a new hists to manage multiple events samples
Message-ID<uolRD-3XZ-1@gated-at.bofh.it>

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

[toc] | [next] | [standalone]


#1732003

From"Jin, Yao" <yao.jin@linux.intel.com>
Date2017-09-14 03:10 +0200
Message-ID<upqPg-6w0-13@gated-at.bofh.it>
In reply to#1730110

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

[toc] | [prev] | [next] | [standalone]


#1732289

FromArnaldo Carvalho de Melo <acme@kernel.org>
Date2017-09-14 16:10 +0200
Message-ID<upD06-62C-1@gated-at.bofh.it>
In reply to#1732003
Em Thu, Sep 14, 2017 at 09:03:55AM +0800, Jin, Yao escreveu:
> 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?

> > 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.
> 
> Could the solution of using a new hists for multiple events be accepted?
> 
> Or anything I should update in the patches?

I'm not having time at this moment for doing a proper review, wait a bit
more please.

- Arnaldo

[toc] | [prev] | [next] | [standalone]


#1732315

From"Jin, Yao" <yao.jin@linux.intel.com>
Date2017-09-14 16:40 +0200
Message-ID<upDt8-6ey-19@gated-at.bofh.it>
In reply to#1732289

On 9/14/2017 10:05 PM, Arnaldo Carvalho de Melo wrote:
> Em Thu, Sep 14, 2017 at 09:03:55AM +0800, Jin, Yao escreveu:
>> 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?
> 
>>> 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.
>>
>> Could the solution of using a new hists for multiple events be accepted?
>>
>> Or anything I should update in the patches?
> 
> I'm not having time at this moment for doing a proper review, wait a bit
> more please.
> 
> - Arnaldo
> 

No problem, that's fine. Thanks in advance. 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web