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]
Message-Id: <1273566031.30322.31.camel@minggr.sh.intel.com>
Date:	Tue, 11 May 2010 16:20:31 +0800
From:	Lin Ming <ming.m.lin@...el.com>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	"eranian@...il.com" <eranian@...il.com>,
	"Gary.Mohr@...l.com" <Gary.Mohr@...l.com>,
	"arjan@...ux.intel.com" <arjan@...ux.intel.com>,
	"Zhang, Yanmin" <yanmin_zhang@...ux.intel.com>,
	Paul Mackerras <paulus@...ba.org>,
	"David S. Miller" <davem@...emloft.net>,
	Russell King <rmk+kernel@....linux.org.uk>,
	Paul Mundt <lethal@...ux-sh.org>,
	lkml <linux-kernel@...r.kernel.org>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Will Deacon <will.deacon@....com>,
	Maynard Johnson <mpjohn@...ibm.com>,
	Carl Love <carll@...ibm.com>
Subject: Re: [RFC][PATCH 3/9] perf: export registerred pmus via sysfs

On Tue, 2010-05-11 at 15:21 +0800, Ingo Molnar wrote:
> * Peter Zijlstra <peterz@...radead.org> wrote:
> 
> > What we do not want are exhaustive event lists for specific PMU 
> > implementations, those are best left for userspace.
> 
> I'd refine this the following way:
> 
>  - We mandate proper in-kernel enumeration of all things event sources, for
>    example /sys/devices/system/node/nodeN/node_events. Obviously an event source
>    needs to be addressable for it to be useful to userspace.
> 
>  - We want generalized events expressed in those event containers that
>    are used commonly. Whatever people find useful we can enumerate and what
>    is enumerated is an ABI.
> 
>  - The 'rest' can go into /sys/devices/system/node/nodeN/node_events/raw_event/.
>    These will never be guaranteed in an ABI way really (although will work in
>    some cases) - those using raw event codes are really up to themselves and 
>    if it ever gets in the way of proper, more expressive 
>    enumeration/generalization it will have to yield.
> 
> These are the ground rules as i see them.
> 
> 	Ingo

How will this sysfs interface be used for userspace tool?

 /sys/devices/system/node/nodeN/node_events
                               node_events/event_source_id

                               node_events/local_misses/event_id
                                          /local_hits/event_id
                                          /remote_misses/event_id
                                          /remote_hits/event_id

For example, to monitor node event local_misses on node 0, does it work
as below?

1. perf top -e local_misses -n 0 (-n 0 means node 0)

2. read /sys/devices/system/node/node0/node_events/event_source_id to
get the pmu_id

3. read /sys/devices/system/node/node0/node_events/local_misses/event_id
to get the event_id

4. event_attr::pmu_id=pmu_id, event::config=event_id

5. other setting...

6. call syscall perf_event_open(....)

--
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