Is there anyway to read performance counters on OS X Mountain Lion?

后端 未结 1 606
失恋的感觉
失恋的感觉 2020-12-23 14:48

Shark, Apple\'s profiler which let you configure custom performance counters, is no longer supported in OSX Mountain Lion since it can\'t run a 32-bit kernel. Instruments.ap

相关标签:
1条回答
  • 2020-12-23 15:17

    Yes. It's there, but difficult to find and clumsy to use (ver.4.5).

    • Launch Instruments.
    • You are greeted by the Wizard
    • Choose "Blank" template for OS X
    • Press cmd+L to display the Library
    • Add "Counters" instrument to your Instruments document
    • Press cmd+shf+P -- you are presented with the PM Events floating window.
    • Let's evaluate "Divide Operations executed" -- Add "Divide Operations executed" to the PM Events window's search field.
    • Now set the "State" of "Divide Operations executed" to "Visible"
    • Now back to the main document window, press cmd+I to display the info popover of the "Counters" instrument.
    • Press the + button
    • Set the new Counter's event to "Divide Operations executed"
    • Begin sampling...
    • End sampling...

    You will see the results in Instruments' table columns. Of course, there are many events you could record -- So find the L1 cache events you are interested in and add them instead of divides.

    Also be prepared for system freezes (one happened while writing this up).

    0 讨论(0)
提交回复
热议问题