lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20120210133159.GF2526@infradead.org>
Date:	Fri, 10 Feb 2012 11:31:59 -0200
From:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>
To:	Joerg Roedel <joerg.roedel@....com>
Cc:	Ingo Molnar <mingo@...e.hu>, Paul Mackerras <paulus@...ba.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	linux-kernel@...r.kernel.org, David Ahern <dsahern@...il.com>,
	Jason Wang <jasowang@...hat.com>
Subject: Re: [PATCH 1/2] perf-tool: Don't process samples with no valid
 machine object

Em Thu, Feb 09, 2012 at 06:13:34PM +0100, Joerg Roedel escreveu:
> On Thu, Feb 09, 2012 at 02:34:41PM -0200, Arnaldo Carvalho de Melo wrote:
> > Em Thu, Feb 09, 2012 at 05:07:38PM +0100, Joerg Roedel escreveu:
> > > -		if (event->header.type == PERF_RECORD_SAMPLE) {
> > > +		if (event->header.type == PERF_RECORD_SAMPLE && machine != NULL) {
> > 
> > Shouldn't we warn the user, even if just once, on the status (last line
> > on the screen) line?
> 
> Probably yes, what would be a good message? I guess something like
> 
> 	"no machine object for sample"
> 
> is not helpful to the user. Maybe something like
> 
> 	"Unresolvable sample(s) recorded"?
> 
> Or something completly different?

This is not completely standardized or harminized across the sources,
but we have things like:

	if (verbose)
		error("Failed to resolve callchain.  Skipping\n");

---

        if (perf_event__preprocess_sample(event, machine, &al, sample,
                                          NULL) < 0) {
                error("problem processing %d event, skipping it.\n",
                        event->header.type);
                return;
        }

---

       if (!ip_callchain__valid(sample->callchain, event)) {
                pr_debug("call-chain problem with event, skipping it.\n");
                ++session->hists.stats.nr_invalid_chains;

---


	What has been done more recently is like the above, account the
number of different problems and then, at the end do like:

        if (session->hists.stats.nr_unknown_id != 0) {
                ui__warning("%u samples with id not present in the header\n",
                            session->hists.stats.nr_unknown_id);
        }


	But this is for perf report or other tools that process all
events and then provide some post processed results, just before
presenting these results.

	I guess we could do that too for 'perf top' like tools, that
continuously show results while collecting more. Perhaps call
ui__warning() if some threshold happens, i.e. if way too many errors of
some kind are happening and then at the end provide a summary of errors
found.

- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ