public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Lin Ming <ming.m.lin@intel.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	Matt Fleming <matt@console-pimps.org>,
	Zhang Rui <rui.zhang@intel.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	lkml <linux-kernel@vger.kernel.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: Re: [RFC PATCH 2/2] perf stat: Use event group to simulate PMI on PMI-less hardware counter
Date: Wed, 10 Nov 2010 13:21:49 +0100	[thread overview]
Message-ID: <1289391709.2191.102.camel@laptop> (raw)
In-Reply-To: <1289369725.2430.39.camel@minggr.sh.intel.com>

On Wed, 2010-11-10 at 14:15 +0800, Lin Ming wrote:
> Some hardware counters(for example, Intel RAPL) can't generate interrupt
> when overflow. So we need to simulate the interrupt to periodically
> record the counter values. Otherwise, the counter may overflow and the
> wrong value is read.
> 
> This patch uses event group to simulate PMI as suggested by Peter
> Zijlstra, http://marc.info/?l=linux-kernel&m=128220854801819&w=2
> 
> create_group_counters() will create a group with 2 events, one hrtimer
> based event as the group leader, and the other event to count. The
> hrtimer is fired periodically, so the sibling event can record its
> counter value periodically as well.

I'm terribly confused here....

 - you introduce perf_event_attr:pmi_simulate, but then you never
implement it -- nor do we need it afaict.


 - you use grouped counters for perf-stat, perf-stat doesn't use
sampling so I don't see a need to group events to simulate the PMI.



  reply	other threads:[~2010-11-10 12:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-10  6:15 [RFC PATCH 2/2] perf stat: Use event group to simulate PMI on PMI-less hardware counter Lin Ming
2010-11-10 12:21 ` Peter Zijlstra [this message]
2010-11-10 14:45   ` Lin Ming
2010-11-10 14:53     ` Peter Zijlstra
2010-11-10 15:06       ` Lin Ming
2010-11-10 15:08         ` Peter Zijlstra
2010-11-10 15:17           ` Matt Fleming
2010-11-11  2:00       ` Zhang Rui
2010-11-11 12:46         ` Peter Zijlstra
2010-11-12  0:32           ` Zhang Rui

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=1289391709.2191.102.camel@laptop \
    --to=peterz@infradead.org \
    --cc=acme@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt@console-pimps.org \
    --cc=ming.m.lin@intel.com \
    --cc=mingo@elte.hu \
    --cc=rui.zhang@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