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: <20121119203411.GB8002@krava.brq.redhat.com>
Date:	Mon, 19 Nov 2012 21:34:12 +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 Fri, Nov 16, 2012 at 11:35:37AM -0800, Sukadev Bhattiprolu wrote:
> Jiri Olsa [jolsa@...hat.com] wrote:
> | > 
> | > 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
> 
> For now, power events can simply be u64 - so am hoping to have something
> like this and replace the raw codes:
> 
> #define PM_CYC			0x1e
> #define PM_GCT_NOSLOT_CYC	0x100f8
> 
> EVENT_ATTR_STR() is interesting, but would require new/extra macros like
> 
> #define PM_CYC_STR		"0x1e"
> #define PM_GCT_NOSLOT_CYC_STR	"0x100f8"
> 
> I went down the path we discussed earlier - to have x86 and Power share
> the EVENT_ATTR() macros. This is making the x86 code less concise
> 
> 	EVENT_ATTR(cpu-cycles,	CPU_CYCLES)
> 
> becomes
> 
> 	EVENT_ATTR(cpu-cycles,	PERF_COUNT_HW_CPU_CYCLES, events_sysfs_show)
> 
> with each EVENT_ATTR() explcitly adding events_sysfs_show or needing another
> wrapper around the wrappers.
> 
> Still tweaking it, but would it be flexible to make 'struct pmu_events_attr'
> common and let architectures define the EVENT_ATTR() as needed ? Would
> duplicate some code but hopefully not a lot.

sounds good, let's see ;)

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