Re: [PATCH 04/31] perf, core: Add generic intx/intx_checkpointed counter modifiers

From: Andi Kleen
Date: Fri Sep 28 2012 - 11:29:03 EST


On Fri, Sep 28, 2012 at 05:19:19PM +0200, Peter Zijlstra wrote:
> On Fri, 2012-09-28 at 16:53 +0200, Andi Kleen wrote:
> > If I moved this into sysfs this would imply that the perf stat -T
> > code would become Haswell specific. As far as I understand normally
> > you guys don't want things like that. Would everyone be ok with
> > having specific code there?
>
> Have a look at /sys/bus/event_source/devices/cpu/format/*, that's
> already very hardware specific.
>
> What I suggested is something like:
>
> PMU_FORMAT_ATTR(intx, "config:32");
> PMU_FORMAT_ATTR(intx_cp "config:33");
>
> For the HSW+ cpus. That should be enough for userspace to create such
> events.

Still would need new fields, but I presume that could be fit in.

perf stat -T uses these qualifiers and computes some derived
metrics. This would become HSW specific code which has to assume
HSW sysfs events. Is everyone ok with that?

I also still would like the :t, :c shortcuts, but those could be probably
just hardcoded.

-Andi

--
ak@xxxxxxxxxxxxxxx -- Speaking for myself only.
--
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/