public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: "Steinar H. Gunderson" <sesse@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf intel-pt: Synthesize cycle events
Date: Tue, 15 Mar 2022 22:11:54 +0200	[thread overview]
Message-ID: <52903e58-e74c-5ea0-36b4-277ea3610af4@intel.com> (raw)
In-Reply-To: <YjDUO6bbyfGw/u0C@google.com>

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.

  reply	other threads:[~2022-03-15 20:12 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-10  9:38 [PATCH] perf intel-pt: Synthesize cycle events Steinar H. Gunderson
2022-03-11  9:10 ` Adrian Hunter
2022-03-11 17:42   ` Steinar H. Gunderson
2022-03-14 16:24     ` Adrian Hunter
2022-03-15 10:16       ` Steinar H. Gunderson
2022-03-15 11:32         ` Adrian Hunter
2022-03-15 18:00           ` Steinar H. Gunderson
2022-03-15 20:11             ` Adrian Hunter [this message]
2022-03-16  8:19               ` Steinar H. Gunderson
2022-03-16 11:19                 ` Adrian Hunter
2022-03-16 12:59                   ` Steinar H. Gunderson
2022-03-21  9:16                     ` Adrian Hunter
2022-03-21 10:33                       ` Steinar H. Gunderson
2022-03-21 13:09                         ` Adrian Hunter
2022-03-21 16:58                           ` Steinar H. Gunderson
2022-03-21 17:40                             ` Adrian Hunter
2022-03-22 11:57                             ` Steinar H. Gunderson
2022-03-29 12:31                               ` Steinar H. Gunderson
2022-03-29 14:16                                 ` Steinar H. Gunderson

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=52903e58-e74c-5ea0-36b4-277ea3610af4@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=sesse@google.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