Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is there a windows equivalent of the linux command "perf stat"?

Tags:

windows

perf

is there a windows equivalent of the linux command "perf stat"? For example to see frontend stalls, cache misses and other performance counter data?

like image 231
skimon Avatar asked Jan 06 '16 19:01

skimon


People also ask

What is perf command in Linux?

The perf command is used as a primary interface to the Linux kernel performance monitoring capabilities and can record CPU performance counters and trace points.

How do I run perf tool?

The perf tool is in the linux-tools-common package. Start by adding that, then running "perf" to see if you get the USAGE message. It may tell you to install another related package (linux-tools-kernelversion). You can also build and add perf from the Linux kernel source.

What is perf used for?

Perf is a profiler tool for Linux 2.6+ based systems that abstracts away CPU hardware differences in Linux performance measurements and presents a simple commandline interface. Perf is based on the perf_events interface exported by recent versions of the Linux kernel.


2 Answers

perf is Linux-only profiler capable to access hardware event counters (cache miss, cpu stalls, etc). This profiler supports many CPUs, but can't be used in MS Windows.

For Windows you may try profilers from your CPU vendor:

  • VTune from/for Intel ($$$)
  • CodeAnalyst/CodeXL from/for AMD (free)
  • Intel PCM from/for Intel (free) - https://software.intel.com/en-us/articles/intel-performance-counter-monitor (needs some compilation with DDK kit to get msr.dll driver and pcm.exe tool)
  • Visual Studio Profiler from Microsoft (part of Studio, some counters for several CPUs) - https://msdn.microsoft.com/en-us/library/bb385772.aspx "CPU Counters", "Portable Events", VSPerfCmd/VSPerfMon command line tool (it may be wrong with some events on recent CPUs)
like image 156
osgx Avatar answered Oct 21 '22 04:10

osgx


Some people who find this question might be actually looking for xperf, or the new ETW stuff which is replacing it which could be downloaded here.

like image 29
leventov Avatar answered Oct 21 '22 02:10

leventov