24

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
  • 249
  • 1
  • 2
  • 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

6 Answers6

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
  • 137,499
  • 74
  • 643
  • 694
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.

mehov
  • 4,178
  • 3
  • 40
  • 55
Joe Lencioni
  • 9,953
  • 17
  • 52
  • 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. – mehov Oct 05 '20 at 08:51
7

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

Techdragon
  • 406
  • 8
  • 14
6

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
  • 397
  • 2
  • 7
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
  • 15,705
  • 6
  • 58
  • 64