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] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 16 Nov 2012 13:51:54 +0100
From:	Jiri Olsa <jolsa@...hat.com>
To:	Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>
Cc:	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Paul Mackerras <paulus@...ba.org>,
	Ingo Molnar <mingo@...hat.com>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	Anton Blanchard <anton@....ibm.com>, robert.richter@....com,
	linuxppc-dev@...abs.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/4] perf/POWER7: Make event translations available in
 sysfs

On Wed, Nov 14, 2012 at 10:20:45AM -0800, Sukadev Bhattiprolu wrote:
> Jiri Olsa [jolsa@...hat.com] wrote:
> | On Wed, Nov 07, 2012 at 11:19:28AM -0800, Sukadev Bhattiprolu wrote:
> | 
> | SNIP
> | 
> | > +struct perf_pmu_events_attr {
> | > +	struct device_attribute attr;
> | > +	u64 id;
> | > +};
> | > +
> | > +extern ssize_t power_events_sysfs_show(struct device *dev,
> | > +				struct device_attribute *attr, char *page);
> | > +
> | > +#define EVENT_VAR(_id)	event_attr_##_id
> | > +#define EVENT_PTR(_id) &event_attr_##_id.attr.attr
> | > +
> | > +#define EVENT_ATTR(_name, _id)                                             \
> | > +	static struct perf_pmu_events_attr EVENT_VAR(_id) = {              \
> | > +		.attr = __ATTR(_name, 0444, power_events_sysfs_show, NULL),\
> | > +		.id   = PM_##_id,                                               \
> | > +	};
> | 
> | this is duplicating the x86 code, perhaps it could be moved
> | to include/linux/perf_event.h and shared globaly
> 
> Ok.
> 
> Can we remove the assumption that the event id is a generic event that
> has PERF_COUNT_HW_ prefix and also let the architectures pass in a "show"
> function ? This would allow architectures to display any arch specific
> events that don't yet have a generic counterpart.
> 
> IOW, can we do something like this (untested) and make PERF_EVENT_ATTR global:

hm, then you probably can use following:

http://www.spinics.net/lists/kernel/msg1434233.html
http://www.spinics.net/lists/kernel/msg1434235.html
http://www.spinics.net/lists/kernel/msg1434226.html

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