Martin,
As I've going through all PRs related to gcov-profile, I've noticed this PR. Current implementation of cycle detection in gcov is very poor, leading to extreme run time for cases like mentioned in the PR (which does not contain a cycle). Thank to Joshua, I've grabbed his patch and removed the scaffolding (classes: Arc, Block, ...) he did. After doing that the patch is quite subtle and fast (of course).
sorry to be a pain, but could you split the patch into a) formatting changes b) the clever bits the formatting changes can then (probably) be applied as obvious. nathan