David Wragg | 29 Apr 01:03 2012

LLC-* events not working on sandybridge

Hi,

I've run into a problem with perf on an Intel Sandybridge machine: The
LLC-* events never seem to trigger.

For example:

$ perf stat -e LLC-load-misses ls /
[...]
                 0 LLC-load-misses

       0.001082639 seconds time elapsed

Non-LLC events work fine:

$ perf stat -e cache-misses ls /
[...]
             4,272 cache-misses

       0.002945606 seconds time elapsed

This is on a Intel i5 machine (i5-2520M), running a fully updated Fedora
16 ('perf --version': 3.3.2-6.fc16.x86_64, 'uname -r':
3.3.2-6.fc16.x86_64).

Any ideas?

David
Namhyung Kim | 30 Apr 10:43 2012

Re: LLC-* events not working on sandybridge

Hi,

On Sun, 29 Apr 2012 00:03:14 +0100, David Wragg wrote:
> Hi,
>
> I've run into a problem with perf on an Intel Sandybridge machine: The
> LLC-* events never seem to trigger.
>
> For example:
>
> $ perf stat -e LLC-load-misses ls /
> [...]
>                  0 LLC-load-misses
>
>        0.001082639 seconds time elapsed
>
> Non-LLC events work fine:
>
> $ perf stat -e cache-misses ls /
> [...]
>              4,272 cache-misses
>
>        0.002945606 seconds time elapsed
>
> This is on a Intel i5 machine (i5-2520M), running a fully updated Fedora
> 16 ('perf --version': 3.3.2-6.fc16.x86_64, 'uname -r':
> 3.3.2-6.fc16.x86_64).
>
> Any ideas?
>
(Continue reading)

David Wragg | 30 Apr 19:50 2012

Re: LLC-* events not working on sandybridge

Namhyung Kim <namhyung.kim <at> lge.com> writes:
> On Sun, 29 Apr 2012 00:03:14 +0100, David Wragg wrote:
>> I've run into a problem with perf on an Intel Sandybridge machine: The
>> LLC-* events never seem to trigger.
>> [...]
>
> I have a same problem on my i7-3930K machine. I guess it's because of
> lacking of extra register (MSP_OFFCORE_RSP_X) settings. But I have no
> idea of how I can set it properly :(.

Ok, I've done some further digging around, and it doesn't look like the
patch "perf events, x86: Implement Sandybridge last-level cache events"
at <https://lkml.org/lkml/2011/5/9/80> ever got merged.  It's not clear
why.

David
Namhyung Kim | 2 May 02:53 2012

Re: LLC-* events not working on sandybridge

Hi,

On Mon, 30 Apr 2012 18:50:39 +0100, David Wragg wrote:
> Namhyung Kim <namhyung.kim <at> lge.com> writes:
>> On Sun, 29 Apr 2012 00:03:14 +0100, David Wragg wrote:
>>> I've run into a problem with perf on an Intel Sandybridge machine: The
>>> LLC-* events never seem to trigger.
>>> [...]
>>
>> I have a same problem on my i7-3930K machine. I guess it's because of
>> lacking of extra register (MSP_OFFCORE_RSP_X) settings. But I have no
>> idea of how I can set it properly :(.
>
> Ok, I've done some further digging around, and it doesn't look like the
> patch "perf events, x86: Implement Sandybridge last-level cache events"
> at <https://lkml.org/lkml/2011/5/9/80> ever got merged.  It's not clear
> why.
>

It seems that PeterZ and Ingo don't want an unverified patch get
merged. But you can still test with it and, hopefully, provide us a
verification :).

Thanks,
Namhyung
David Wragg | 6 May 01:48 2012

Re: LLC-* events not working on sandybridge

Namhyung Kim <namhyung.kim <at> lge.com> writes:
> On Mon, 30 Apr 2012 18:50:39 +0100, David Wragg wrote:
>> Ok, I've done some further digging around, and it doesn't look like the
>> patch "perf events, x86: Implement Sandybridge last-level cache events"
>> at <https://lkml.org/lkml/2011/5/9/80> ever got merged.  It's not clear
>> why.
>>
>
> It seems that PeterZ and Ingo don't want an unverified patch get
> merged. But you can still test with it and, hopefully, provide us a
> verification :).

I fixed the patch up for 3.3, and it works for me.  I'll ask Lin Ming
what happened to it.

David

Gmane