Manu,

Thank you very much for the reference and code. I checked my cpu and
the Northbridge performance counter flag is set. So my processor does
support profiling NB events. The question now is why it's saying it's
not.

I realized that perf support for NB events was in fact only added on
linux 3.9 [1], so I upgraded both my kernel and perf to 3.11. So
that's out.

The only thing I can think of is the the simple case that I'm just
using the wrong command. As I said, I'm not entirely sure how to use
unit masks. Can you please confirm that my usage is correct?

Do you have any other ideas on what might be the issue?

Thank you,
Martin

[1]: 
https://github.com/torvalds/linux/commit/e259514eef764a5286873618e34c560ecb6cff13

On Tue, Feb 18, 2014 at 4:50 PM, Manuel Selva <selva.man...@gmail.com> wrote:
> CPUID is an X86 instruction: http://en.wikipedia.org/wiki/CPUID used to get
> information about the CPU. The Core performance counter extensions is
> mentioned on the wikipedia page.
>
> You'll need to write assembly code to use this instruction or use cpuid.h.
> Here is an example of using this instruction from a previous answer on this
> list:
>
> #include <cpuid.h>
> #include <stdio.h>
> int main()
> {
>         unsigned a, b, c, d;
>         /* check __get_cpuid_max here */
>         __cpuid(10, a, b, c, d);
>         printf("eax: %x ebx %x ecx %x edx %x\n", a, b, c, d);
>         int i;
>         for (i = 0; i < 10; i++)
>                 if (b & (1 << i))
>                         printf("event %d not supported\n", i);
>         return 0;
> }
>
>
> Manu
--
To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to