All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: perf top: losing events?
Date: Thu, 21 Jan 2010 10:22:25 -0200	[thread overview]
Message-ID: <20100121122224.GA21083@ghostprotocols.net> (raw)
In-Reply-To: <1264052528.26323.13.camel@marge.simson.net>

Em Thu, Jan 21, 2010 at 06:42:08AM +0100, Mike Galbraith escreveu:
> Greetings Arnaldo,
> 
> ------------------------------------------------------------------------------------------------------------------------------
>    PerfTop:     670 irqs/sec  kernel:14.6% [1000Hz cycles],  (all, cpu: 3)
> ------------------------------------------------------------------------------------------------------------------------------
> 
>              samples  pcnt function            DSO
>              _______ _____ ___________________ ________________________________________________________________
> 
>             12535.00 82.1% main                /root/bin/pert
>               302.00  2.0% clear_page_c        [kernel.kallsyms]
>               169.00  1.1% _int_malloc         /lib64/libc-2.9.so
>               168.00  1.1% page_fault          [kernel.kallsyms]
>               138.00  0.9% yylex               /usr/local/src/kernel/linux-2.6.33.git/scripts/genksyms/genksyms
>               121.00  0.8% __GI_memset         /lib64/libc-2.9.so
>               117.00  0.8% copy_page_c         [kernel.kallsyms]
>                96.00  0.6% _raw_spin_lock      [kernel.kallsyms]
>                79.00  0.5% use_config          /usr/local/src/kernel/linux-2.6.33.git/scripts/basic/fixdep
> 
> If only 100% userland hog (pert) is running, I see the expected 1KHz
> irqs/sec.  As soon as I start a kbuild with it, irqs/sec drops, though
> NMIs are indeed happening at 1KHz.
> 
> Bisection points to 5b2bb75 perf top: Support userspace symbols too.

Can you check if this one helps? 

- Arnaldo

diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 7a8a77e..8b04988 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -934,8 +934,11 @@ static void event__process_sample(const event_t *self,
 	struct addr_location al;
 	u8 origin = self->header.misc & PERF_RECORD_MISC_CPUMODE_MASK;
 
+	++samples;
+
 	switch (origin) {
 	case PERF_RECORD_MISC_USER:
+		++userspace_samples;
 		if (hide_user_symbols)
 			return;
 		break;
@@ -960,9 +963,6 @@ static void event__process_sample(const event_t *self,
 		if (list_empty(&syme->node) || !syme->node.next)
 			__list_insert_active_sym(syme);
 		pthread_mutex_unlock(&active_symbols_lock);
-		if (origin == PERF_RECORD_MISC_USER)
-			++userspace_samples;
-		++samples;
 	}
 }
 

  parent reply	other threads:[~2010-01-21 12:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-21  5:42 perf top: losing events? Mike Galbraith
2010-01-21  6:02 ` Mike Galbraith
2010-01-21 12:22 ` Arnaldo Carvalho de Melo [this message]
2010-01-21 14:28   ` Mike Galbraith
2010-01-21 14:49     ` Arnaldo Carvalho de Melo
2010-01-21 14:56       ` Mike Galbraith
2010-01-21 15:02         ` Arnaldo Carvalho de Melo

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=20100121122224.GA21083@ghostprotocols.net \
    --to=acme@redhat.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.