public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Gui Jianfeng <guijianfeng@cn.fujitsu.com>,
	Yanmin Zhang <yanmin_zhang@linux.intel.com>,
	mingo@elte.hu,
	linux kernel mailing list <linux-kernel@vger.kernel.org>,
	Paul Mundt <lethal@linux-sh.org>
Subject: Re: [PATCH 2/3] perf: Remove dead code in buildin-record.c
Date: Fri, 25 Jun 2010 16:48:05 +0200	[thread overview]
Message-ID: <1277477285.32034.666.camel@twins> (raw)
In-Reply-To: <20100625131356.GB4078@ghostprotocols.net>

On Fri, 2010-06-25 at 10:13 -0300, Arnaldo Carvalho de Melo wrote:
> Em Fri, Jun 25, 2010 at 10:16:59AM +0800, Gui Jianfeng escreveu:
> > group_fd related code is dead here, remove them.
> 
> I agree it is dead at the moment, but I think Peter (or was it Ingo at
> the time?) had a reason for it to live, Peter, care to take a look?

Ah, yes, it would be nice for SH (which doesn't have a PMI) to couple a
software timer with their hardware counter to get samples.

Never got around to actually implementing that though, maybe Paul has a
minion interested in making that work?

> > Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
> > ---
> >  tools/perf/builtin-record.c |   12 +-----------
> >  1 files changed, 1 insertions(+), 11 deletions(-)
> > 
> > diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
> > index abaf0f8..84d58b7 100644
> > --- a/tools/perf/builtin-record.c
> > +++ b/tools/perf/builtin-record.c
> > @@ -45,7 +45,6 @@ static int			freq				=   1000;
> >  static int			output;
> >  static int			pipe_output			=      0;
> >  static const char		*output_name			= "perf.data";
> > -static int			group				=      0;
> >  static int			realtime_prio			=      0;
> >  static bool			raw_samples			=  false;
> >  static bool			system_wide			=  false;
> > @@ -203,8 +202,6 @@ static void sig_atexit(void)
> >  	kill(getpid(), signr);
> >  }
> >  
> > -static int group_fd;
> > -
> >  static struct perf_header_attr *get_header_attr(struct perf_event_attr *a, int nr)
> >  {
> >  	struct perf_header_attr *h_attr;
> > @@ -291,7 +288,7 @@ static void create_counter(int counter, int cpu)
> >  	for (thread_index = 0; thread_index < thread_num; thread_index++) {
> >  try_again:
> >  		fd[nr_cpu][counter][thread_index] = sys_perf_event_open(attr,
> > -				all_tids[thread_index], cpu, group_fd, 0);
> > +				all_tids[thread_index], cpu, -1, 0);
> >  
> >  		if (fd[nr_cpu][counter][thread_index] < 0) {
> >  			int err = errno;
> > @@ -359,12 +356,6 @@ try_again:
> >  		assert(fd[nr_cpu][counter][thread_index] >= 0);
> >  		fcntl(fd[nr_cpu][counter][thread_index], F_SETFL, O_NONBLOCK);
> >  
> > -		/*
> > -		 * First counter acts as the group leader:
> > -		 */
> > -		if (group && group_fd == -1)
> > -			group_fd = fd[nr_cpu][counter][thread_index];
> > -
> >  		if (counter || thread_index) {
> >  			ret = ioctl(fd[nr_cpu][counter][thread_index],
> >  					PERF_EVENT_IOC_SET_OUTPUT,
> > @@ -406,7 +397,6 @@ static void open_counters(int cpu)
> >  {
> >  	int counter;
> >  
> > -	group_fd = -1;
> >  	for (counter = 0; counter < nr_counters; counter++)
> >  		create_counter(counter, cpu);
> >  
> > -- 1.6.5.2 


  reply	other threads:[~2010-06-25 14:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-25  2:15 [PATCH 1/3] perf kvm: Get rid of unused guest_kallsyms Gui Jianfeng
2010-06-25  2:16 ` [PATCH 2/3] perf: Remove dead code in buildin-record.c Gui Jianfeng
2010-06-25 13:13   ` Arnaldo Carvalho de Melo
2010-06-25 14:48     ` Peter Zijlstra [this message]
2010-06-26 15:14       ` Matt Fleming
2010-06-26 18:12         ` Arnaldo Carvalho de Melo
2010-07-18 20:06         ` Matt Fleming
2010-08-04 10:56           ` Peter Zijlstra
2010-08-04 11:25             ` Matt Fleming
2010-06-25  2:18 ` [PATCH 3/3] perf: Fix the bug which fails to put memory mapping to record file Gui Jianfeng
2010-06-25 15:29 ` [tip:perf/core] perf kvm: Get rid of unused guest_kallsyms tip-bot for Gui Jianfeng

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=1277477285.32034.666.camel@twins \
    --to=peterz@infradead.org \
    --cc=acme@redhat.com \
    --cc=guijianfeng@cn.fujitsu.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=yanmin_zhang@linux.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