Hi Stephane,

I wonder if you have considered this possibility for getting symbolic event 
naming ability into the perf tool:

Create a wrapper program, call it "sperf" (for symbolic perf), and what it 
would 
do is scan the command line for any -e (event) switches.  If it finds a -e 
switch, it would try running the event string through libpfm's function to 
produce a config value.  If that failed, it would leave the event alone (for 
the 
case where the events are recognized only by the perf tool).  If it passed, 
you'd replace that symbol with the calculated config hex value with an 'r' 
pre-pended to it.  Once all of the arguments are processed, you call the perf 
with this set of arguments.

sperf could be built anywhere that has visibility to libpfm, and it would find 
the perf tool by using
/lib/modules/`uname -r`/source/tools/perf/perf
or it could be overridden by an environment variable, say "PERF_PATH".

We have a near-term need for such a tool, and I will likely be prototyping this 
idea soon.

-- 
Regards,

- Corey

Corey Ashford
Software Engineer
IBM Linux Technology Center, Linux Toolchain
Beaverton, OR
503-578-3507
cjash...@us.ibm.com


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to