From: Manuel Selva <selva.manuel@gmail.com>
To: Martin Ichilevici de Oliveira <martin.i.oliveira@gmail.com>,
linux-perf-users@vger.kernel.org
Subject: Re: Event not supported
Date: Tue, 18 Feb 2014 20:50:30 +0100 [thread overview]
Message-ID: <5303B986.2070801@gmail.com> (raw)
In-Reply-To: <CAOanW0OsZXZU7Os=VrxA=s7SwRo+gK0qtpNjbX7E84fgL0swxg@mail.gmail.com>
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
next prev parent reply other threads:[~2014-02-18 19:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-18 16:51 Event not supported Martin Ichilevici de Oliveira
2014-02-18 18:22 ` Manuel Selva
2014-02-18 18:42 ` Martin Ichilevici de Oliveira
2014-02-18 19:50 ` Manuel Selva [this message]
2014-02-19 11:38 ` Martin Ichilevici de Oliveira
2014-02-19 12:59 ` Vince Weaver
2014-02-26 20:44 ` Martin Ichilevici de Oliveira
2014-02-26 21:38 ` Vince Weaver
2014-02-28 9:35 ` Martin Ichilevici de Oliveira
2014-03-11 16:53 ` Martin Ichilevici de Oliveira
2014-03-13 20:06 ` Vince Weaver
2014-02-19 14:08 ` Baptiste Lepers
2014-02-20 8:09 ` Jiri Olsa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5303B986.2070801@gmail.com \
--to=selva.manuel@gmail.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=martin.i.oliveira@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).