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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 26 Apr 2012 16:24:33 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Robert Richter <robert.richter@....com>
Cc:	Stephane Eranian <eranian@...gle.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Arnaldo Carvalho de Melo <acme@...hat.com>, mingo@...e.hu,
	David Ahern <dsahern@...il.com>,
	Frédéric Weisbecker <fweisbec@...il.com>,
	Jiri Olsa <jolsa@...hat.com>
Subject: Re: [BUG] perf stat: useless output for raw events with new event
 parser

On Thu, 2012-04-26 at 15:12 +0200, Robert Richter wrote:
> On 26.04.12 12:27:11, Peter Zijlstra wrote:
> > Furthermore, once we have a common format, we could even ask Intel/AMD
> > (and other vendors) to provide their data in this format.
> 
> I don't think that can be done with a reasonable effort. 

I'm thinking you mis-understand, all we're talking about is a copy of
your event list (BKDG Fam 10h Rev 3.48, section 3.14) in a usable
format.

> Why not simply pass an identifier for each kind of pmu and then only
> add pmu specific code in userland? Much easier than all this sysfs
> format thing, where the kernel tries to tell userland what to do,
> which the kernel never can do exactly. And even if we can describe
> everything with sysfs, kernel and userland code becomes bloated, it
> actually is already, looking at the recent perf tool and kernel
> updates.

The format is only about encoding rules, it doesn't do constraints. All
it wants to convey is if you have an event-code of: 0x4E2 where to stick
it in perf_event_attr::config*. It doesn't want to tell you if that
event exists and if there's a particular umask that ought to go with it.

Its an aid to simplify constructing raw events, nothing more.

When I want to use funny events I'm staring at the Intel-SDM/AMD-BKDG
anyway and I find writing:

  cpu/event=0x4e2,umask=0xf8/

A lot easier than:

  r40000f8e2

because while I like numbers I cannot actually count and would get that
4 wrong half the time, furthermore I'd have to actually remember the
encoding rules; or something like:

  cpu/event=L3_fills_caused_by_L2_evictions.modified_any_core/

Then again, some people are scared of numbers and prefer to wear down
their finger-tips writing silly names.

That said, a unique identifier in there might make sense, esp on things
like ARM that don't have CPUID and even if they do it doesn't actually
correlate to the PMU :-)

So I'd be perfectly ok with adding something
like /sys/bus/events/device/*/name or so.
--
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