Re: [PATCH 1/3] perf, tool: Add parser generator for eventsparsing

From: Vince Weaver
Date: Thu Dec 22 2011 - 14:32:36 EST


On Tue, 20 Dec 2011, Peter Zijlstra wrote:

>
> This would allow us to write things like:
>
> perf record -e cpu/event=0x34,umask=0x01,inv,cmask=2

I know this is beating a dead horse, but are you guys *really* that
against just linking against libpfm4?

Instead of (to use your example):
perf record -e cpu/event=0x34,umask=0x01,inv,cmask=2
Insn't
perf record -e nhm::UNC_CBO_CACHE_LOOKUP:M:i=1:cmask=2
much nicer?

And the code that translates that to bits for you already exists in a nice
library form. And it supports Pentium 4 already.

In PAPI we're finally moving to all string-based event names simply
because trying to create cross-platform ways of specifying bits like you
are just didn't work very well.

Vince

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/