26

I'm looking for a KCacheGrind alternative, or at least a binary package for Mac Os X?

I'd to use KCacheGrind with XDebug for PHP, but Mac Os X is the right environnement here...

Thank you

Edit: I know I can use MacPort but I'm looking for an alternative of this painful installation.

Maybe something "in the mac way"

IgorS
  • 269
  • 1
  • 3
  • 3
  • At least as of three years ago, kcachegrind was the only tool available for Macs. I hope that has changed by now, for your sake. – Charles Mar 25 '11 at 03:18
  • I'm not a Mac expert, but you could use [this technique](http://stackoverflow.com/questions/375913/what-can-i-use-to-profile-c-code-in-linux/378024#378024) if you can randomly interrupt php (like with Ctrl-C) and see what it's doing. – Mike Dunlavey Mar 26 '11 at 12:03
  • possible duplicate of [do you have kcachegrind like profiling tools for mac](http://stackoverflow.com/questions/4473185/do-you-have-kcachegrind-like-profiling-tools-for-mac) – kenorb May 06 '15 at 11:59

7 Answers7

22

You can install KCacheGrind using MacPorts:

sudo port install valgrind kcachegrind4

There are also some alternatives like:

See also: do you have kcachegrind like profiling tools for mac

Community
  • 1
  • 1
kenorb
  • 155,785
  • 88
  • 678
  • 743
10

You might want to check out WebGrind

Webgrind is an Xdebug profiling web frontend in PHP5. It implements a subset of the features of kcachegrind and installs in seconds and works on all platforms.

ᴍᴇʜᴏᴠ
  • 4,804
  • 4
  • 44
  • 57
Joe Lencioni
  • 10,231
  • 18
  • 55
  • 66
  • This. Takes only a minute to install. If you run it on the same server where you have your xdebug, it will even find and pick up the .trace files from /tmp. – ᴍᴇʜᴏᴠ Oct 05 '20 at 08:51
7

qcachegrind is the qt based 'cousin' of kcachegrind. Works like a treat.

Techdragon
  • 502
  • 8
  • 15
7

Another premium alternative is ProfilingViewer, available on the Mac App Store. Handles multiple types of costs. Can display the data as Treemap, Callgraph, Heatmap, can hide system functions and has a source file viewer annotated with the costs. Can create PDF's. Fast and has a small memory footprint.

Profiling Viewer, Callgraph with Heatmap

Profiling Viewer, Treemap with Heatmap

Profiling Viewer, Treemap

user24525
  • 423
  • 3
  • 8
2

MacCallGrind and WebGrind is the true best answers for MacOS. I can't comment kenorb answer so I have to make new one.

MacCallGrind link to MacUpdate is wrong - their's price is much higher then from developers site (http://www.maccallgrind.com/).

I personally find MacCallGrind grinder feature very useful in combine with Transmit (http://panic.com/transmit/) feature - mount ssh/sftp as disk. It automatically opens every new cache grind file that appears at remote location.

0

You can now install qcachegrind with macports as well:

sudo port selfupdate
sudo port install graphviz qcachegrind

The app should appear in the Macports folder of your Applications

Code Commander
  • 16,771
  • 8
  • 64
  • 65
0

The best alternative for KCacheGrind is PhpStorm Xdebug analyzer, that integrated with your source code and is very easy to find slow modules in your Magento project

enter image description here

XPS
  • 140
  • 1
  • 5