I've got a relatively long function that's dominant in the Instruments Time Profiler. Is there a way to add additional symbols to this function so the sampling will show time allocated to different parts of the function? I'm looking for something like the MARK macro that existed for prof(1) years ago.
Using the macro:
#define MARK(K) asm("M."#K":");
has been working well for me. This is really just a simplification of the old MARK macro I mentioned in my original question. Placing MARK(LOOP1); somewhere in a function will add a new symbol, M.LOOP1 that will show up in a list of functions shown by shark or instruments.
I discovered recently that in the time profiler in instruments, if you double-click on a method, it'll show you your source code with percentages of time spent on each line.
http://douglasheriot.com/blog/2011/04/xcode-4-instruments-awesomeness/
I've found it very useful, but I'm not sure if that's what you're asking for.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With