Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

296
Visualizações
Find out how many hardware performance counters a CPU has

On an Intel or AMD x86-64 system running Linux, where/how can I find out the number of hardware performance counters that my CPU has?

I would like to use the Linux perf tool to gather hardware performance counter data while executing some applications. The perf wiki's tutorial says that if I specify (using the -e flag to perf stat or perf record) more hardware events than there are performance counters in my CPU, then these events will be multiplexed over the counters during the execution, allowing them to all be tracked during a single perf command, but possibly reducing accuracy because not all counters are active all the time. (Note that I am concerned with hardware events here, such as for cache and TLB behavior - I know that a large/unlimited number of kernel software tracepoints can be tracked without inaccuracy).

If I find out my processor model, is there an Intel/AMD website where I can find this information? Is there a simple command that I can run on the system to check the number of hardware counters? I've examined the output of cat /proc/cpuinfo and x86info -a, but couldn't find this information.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Regarding Intel processors, you can:

  • look in this intel documentation manual chapter 18, but it's not so easy to read.

  • use the cpuid instruction - This will require to write assembly code to correctly set parameters and get results.

  • download and compile/install the papi library and run papi_avail | more. The result on my laptop is:

PAPI Version : 5.1.1.0

Vendor string and code : GenuineIntel (1)

Model string and code : Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz (42)

CPU Revision : 7.000000

CPUID Info : Family: 6 Model: 42 Stepping: 7

CPU Max Megahertz : 2494

CPU Min Megahertz : 2494

Hdw Threads per core : 2

Cores per Socket : 2

NUMA Nodes : 1

CPUs per Node : 4

Total CPUs : 4

Running in a VM : no

Number Hardware Counters : 11

Max Multiplex Counters : 64

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda