XCode Instruments to Profile/Analyze ROOT Macros

Has anyone succesfully used the XCode Instruments program to analyze a ROOT macro? I’ve tried pointing it at a ROOT process, but none of the information seems to be about the macro.

I haven’t figured out how to get like a list of function calls and how much time is spent in each. Most of the information online is MacOS-specific stuff that assumes you are coding within XCode and using Objective-C.

Is anyone at all using this tool? Valgrind doesn’t support OSX 10.9 and I am starting to regret upgrading…


For anyone else searching about XCode/Instruments, I’m writing here what I’ve figured out.

I still know of no way of using Instruments (or valgrind for that matter) to analyze a program that is run via root/ACLiC like “root myscript.C+”.

Thus, one needs to make a separate binary executable with its own main function. I have some instructions here: http://tinyurl.com/kkjvsue

If you compile the separate binary (and its dependent libraries) with the -g option, you can then attach valgrind or Instruments to the running process, or you can use valgrind/Instruments to launch the process itself.