Cue's hookshot: hacking the iOS runtime for fun and profiles
tech.blog.cueup.com
tech.blog.cueup.com
A lot of the inspiration for how to actually make this work came from Mike Ash's awesome NSBlog:
I'd say the app takes around 2-3x less time to load than when we started our most recent performance quest, largely due to issues we found using hookshot. We did find some performance critical inner loops in our rendering code where we were able to achieve something like 10x speed-ups.
Apple's profiler has significantly lower overhead than hookshot - which makes sense given the relative amounts of information collected. Our app runs noticeably slower when hookshot is enabled, but when it is disabled, hookshot introduces exactly 0 overhead. We only enable it when we're specifically debugging performance issues.
Another example: we used the "HOOKSHOT_TAG" macro to tag objects related to rendering different days in Cue (today, yesterday, tomorrow). This makes the thread activity graph use different colors for time spent on those objects. This helped make obvious a few edge cases where some rendering/processing for a day that was not on screen was done before the day that was.
On your prevent instrumentation proxy methods; if the original method references ivars without using self.x or [self x] do you notice weird results?
If you have time, email me at robbyw@cueup.com - I'd love to talk about what things you wanted to see and let you know if any of them are on the roadmap.
We haven't been able to reliably reproduce the problem and haven't found much about it online. I've filed a bug report here if you'd like to add your two cents:
https://bugreport.apple.com/cgi-bin/WebObjects/RadarWeb.woa/...
* Thread activity graphs with drill-in
* Seeing accurate counts of calls
* More precise per-call timings of messages
* Measurement of messages with highly variable performance