Is there perf profiler tool for Mac to trace all page faults?
Solution 1:
No - there is no linux kernel to profile on OS X - so that tool is a fish out of water. OS X probably ships with everything you need though.
On macOS / OS X - there is a mach_kernel in use. It's exhaustively documented at: https://developer.apple.com/library/prerelease/content/documentation/Darwin/Conceptual/KernelProgramming/About/About.html
Additionally, you might be fine profiling the BSD based unix layer with the supplied command line tools. It really depends on which operations or aspect of system performance you wish to measure or debug.
To the specific topic of page faults, you can get cumulative statistics from top
and vm_stat
and then dig into specific processes using either dtrace
or Instruments - which is a free tool part of Xcode on the app store and has a graphical interface for profiling the system calls per process or as a system.