On Fri, Oct 30, 2009 at 6:41 PM, Corey Ashford
<cjash...@linux.vnet.ibm.com> wrote:
> 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.
>
That's one way of doing it without touching perf.

The other way would be to have perf try to dlopen() libpfm4. It is finds it then
it can handle more symbolic events internally, otherwise it runs with
its builtin
events and rXXX notation.

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