Beware link wall ahead
Stumbling upon this page  ended up in a massive recurssive tree search. A stack of links where kept here.
Profiling with gdb
Why not profiling your application by sampling backtraces using gdb? This intuitive idea is easily adapted to remote debugging as well.