linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@infradead.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Mike Galbraith <efault@gmx.de>, Paul Mackerras <paulus@samba.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Stephane Eranian <eranian@google.com>,
	Tom Zanussi <tzanussi@gmail.com>
Subject: Re: [PATCH 2/5] perf events: Default to using event__process_lost
Date: Fri, 26 Nov 2010 22:18:17 -0200	[thread overview]
Message-ID: <20101127001817.GA17400@ghostprotocols.net> (raw)
In-Reply-To: <alpine.LFD.2.00.1011270042520.2900@localhost6.localdomain6>

Em Sat, Nov 27, 2010 at 12:55:24AM +0100, Thomas Gleixner escreveu:
> On Fri, 26 Nov 2010, Arnaldo Carvalho de Melo wrote:
> 
> > From: Arnaldo Carvalho de Melo <acme@redhat.com>
> > 
> > Tool developers have to fill in a 'perf_event_ops' method table to
> > specify how to handle each event, so far the ones that were not
> > explicitely especified would get a stub that would just discard the
> > event.
> > 
> > Change that so that tool developers can get the lost event details and
> > the total number of such events at the end of 'perf report -D' output.
> 
> That should be always displayed if the subcommand does not have it's
> own lost event handling. I stared long enough into the wrong place,
> just because the stupid thing just was silent about it. And with this
> patch it's still silent for the normal use case.

Will make it holler if perf_event_ops->lost == event__process_lost and
self->hists.stats.total_lost != 0, as you suggest.
 
> We really want to tell the user when something went wrong. Users do
> not run perf report -D when the tool shows fancy events, why should
> they? Just because they know that the tool is hiding problems? If
> that's the case then the trust into perf tools is about 0.
> 
> Darn, being silent about a known problem is the most stupid error
> handling ever.
> 
> That's what I added at the end of perf_session__process_events()
> 
> +	if (self->hists.stats.total_lost)
> +		fprintf(stderr, "Lost events. Check IO/CPU overload!\n");
> 
> It's hacky, but it does the job and tells me clearly that the trace is
> only halfways useful.

Ok, will implement it like you suggested, in a followon patch, in both
the --stdio and --tui modes.

- Arnaldo

  reply	other threads:[~2010-11-27  0:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-26 21:47 [GIT PULL 0/5] perf/core improvements and fixes Arnaldo Carvalho de Melo
2010-11-26 21:47 ` [PATCH 1/5] perf record: Add option to disable collecting build-ids Arnaldo Carvalho de Melo
2010-11-26 21:47 ` [PATCH 2/5] perf events: Default to using event__process_lost Arnaldo Carvalho de Melo
2010-11-26 23:55   ` Thomas Gleixner
2010-11-27  0:18     ` Arnaldo Carvalho de Melo [this message]
2010-11-26 21:47 ` [PATCH 3/5] perf tools: Add GCC optimization to memory allocating functions Arnaldo Carvalho de Melo
2010-11-27  0:30   ` Arnaldo Carvalho de Melo
2010-11-29 12:54     ` Davidlohr Bueso
2010-11-26 21:47 ` [PATCH 4/5] perf symbols: Correct final kernel map guesses Arnaldo Carvalho de Melo
2010-11-26 21:47 ` [PATCH 5/5] perf trace: Handle DT_UNKNOWN on filesystems that don't support d_type 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=20101127001817.GA17400@ghostprotocols.net \
    --to=acme@infradead.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=efault@gmx.de \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=tglx@linutronix.de \
    --cc=tzanussi@gmail.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;
as well as URLs for NNTP newsgroup(s).