Re: [PATCH V6 06/13] perf: Add Nehalem and Sandy Bridge uncore support

From: Stephane Eranian
Date: Fri Jun 15 2012 - 14:46:14 EST


On Fri, Jun 15, 2012 at 7:18 PM, Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> wrote:
> On Fri, 2012-06-15 at 14:31 +0800, Yan, Zheng wrote:
>> +static struct uncore_event_desc nhm_uncore_events[] = {
>> + Â Â Â INTEL_UNCORE_EVENT_DESC(CLOCKTICKS, "config=0xffff"),
>> + Â Â Â /* full cache line writes to DRAM */
>> + Â Â Â INTEL_UNCORE_EVENT_DESC(QMC_WRITES_FULL_ANY, "event=0x2f,umask=0xf"),
>> + Â Â Â /* Quickpath Memory Controller normal priority read requests */
>> + Â Â Â INTEL_UNCORE_EVENT_DESC(QMC_NORMAL_READS_ANY, "event=0x2c,umask=0xf"),
>> + Â Â Â /* Quickpath Home Logic read requests from the IOH */
>> + Â Â Â INTEL_UNCORE_EVENT_DESC(QHL_REQUEST_IOH_READS,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â "event=0x20,umask=0x1"),
>> + Â Â Â /* Quickpath Home Logic write requests from the IOH */
>> + Â Â Â INTEL_UNCORE_EVENT_DESC(QHL_REQUEST_IOH_WRITES,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â "event=0x20,umask=0x2"),
>> + Â Â Â /* Quickpath Home Logic read requests from a remote socket */
>> + Â Â Â INTEL_UNCORE_EVENT_DESC(QHL_REQUEST_REMOTE_READS,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â "event=0x20,umask=0x4"),
>> + Â Â Â /* Quickpath Home Logic write requests from a remote socket */
>> + Â Â Â INTEL_UNCORE_EVENT_DESC(QHL_REQUEST_REMOTE_WRITES,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â "event=0x20,umask=0x8"),
>> + Â Â Â /* Quickpath Home Logic read requests from the local socket */
>> + Â Â Â INTEL_UNCORE_EVENT_DESC(QHL_REQUEST_LOCAL_READS,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â "event=0x20,umask=0x10"),
>> + Â Â Â /* Quickpath Home Logic write requests from the local socket */
>> + Â Â Â INTEL_UNCORE_EVENT_DESC(QHL_REQUEST_LOCAL_WRITES,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â "event=0x20,umask=0x20"),
>> + Â Â Â { /* end: all zeroes */ },
>> +};
>
> Should we lowercase all event names as well?
>
Yes, and let the parser be case insensitive.

> /sys/bus/event_source/devices/uncore/events
> /sys/bus/event_source/devices/uncore/events/QHL_REQUEST_REMOTE_READS
> /sys/bus/event_source/devices/uncore/events/QHL_REQUEST_LOCAL_READS
> /sys/bus/event_source/devices/uncore/events/QHL_REQUEST_IOH_READS
> /sys/bus/event_source/devices/uncore/events/QHL_REQUEST_REMOTE_WRITES
> /sys/bus/event_source/devices/uncore/events/QMC_WRITES_FULL_ANY
> /sys/bus/event_source/devices/uncore/events/QMC_NORMAL_READS_ANY
> /sys/bus/event_source/devices/uncore/events/QHL_REQUEST_LOCAL_WRITES
> /sys/bus/event_source/devices/uncore/events/QHL_REQUEST_IOH_WRITES
> /sys/bus/event_source/devices/uncore/events/CLOCKTICKS
>
> BTW we could encode those things like:
>
> INTEL_UNCORE_EVENT_DESC(qhl_request_local_reads, 0x1020);
>
> And have the print function decode that into something pretty, it would
> save some 18 bytes per event or so. Not sure that's worth it, but who
> knows.
>
>
--
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/