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

On 02/18/2014 07:42 PM, Martin Ichilevici de Oliveira wrote:
performance counter extensions
cpuid
--
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