macosprofilingosx-mavericksperformancecounterperf

Install "perf" on Mac


I need the "perf" utility to monitor the program on my Mac. I know linux comes with it, but is it available on Mac?

I am working on a OSX 10.9 Mavericks and tried "port search" for perf or linux-tools, but I couldn't get any results.


Solution

  • As @Sami Laine said in his comment, the Linux perf tool is dependent on Linux specific code. It relies on the perf_event_open system call which is not standardized.

    Note: Maybe you could search how MacOSX users are using recent hardware performance counters.