mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	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: Sat, 27 Nov 2010 00:55:24 +0100 (CET)	[thread overview]
Message-ID: <alpine.LFD.2.00.1011270042520.2900@localhost6.localdomain6> (raw)
In-Reply-To: <1290808041-16535-3-git-send-email-acme@infradead.org>

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.

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.

There are only two files, which implement their own lost handling:
builtin-inject.c and builtin-script.c

So everything else looks at incomplete data and let's the user wonder
about the resulting crap in the output.

Thanks,

	tglx

  reply	other threads:[~2010-11-26 23:56 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 [this message]
2010-11-27  0:18     ` Arnaldo Carvalho de Melo
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=alpine.LFD.2.00.1011270042520.2900@localhost6.localdomain6 \
    --to=tglx@linutronix.de \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@infradead.org \
    --cc=acme@redhat.com \
    --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=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

all inboxes | Powered by JetHome®