lkml.org 
[lkml]   [2022]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] perf intel-pt: Synthesize cycle events
From
On 15.3.2022 20.00, Steinar H. Gunderson wrote:
> On Tue, Mar 15, 2022 at 01:32:38PM +0200, Adrian Hunter wrote:
>>> I think the structure looks good, but I'm not sure about updating
>>> e.g. ptq->last_cy_insn_cnt in both functions? Does that make sense?
>> It should only be updated in the new intel_pt_synth_cycle_sample().
>> intel_pt_synth_instruction_sample() should be unchanged.
>
> Hm, OK. But something definitely changed between my original patch and
> your change. (The first patch; I didn't try the last one yet.) With my
> patch, I got (on a specific trace, synthing cycles only with perf report
> --itrace=y0nse):
>
> Samples: 4M of event 'cycles:uH', Event count (approx.): 4844309
>
> With yours on the same file:
>
> Samples: 2M of event 'cycles:uH', Event count (approx.): 77622449
>
> The relative times between functions are also pretty different (although
> none of them are obviously crazy), so one of them has to be wrong.
> Is this to be expected, ie., would you expect your change to fix some
> bad bug on cycle-only synth? For reference, “perf script --itrace=i0ns
> -F +ipc | grep -c IPC:” (a quick proxy for the number of CYC packets :-) )
> yields 4836782, so I'm a bit surprised why there are only 2M events
> being emitted from that.

Sorry, my first suggestion has issues, but the second is better.

\
 
 \ /
  Last update: 2022-03-15 21:12    [W:0.249 / U:1.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site