in reply to Profiling forking code?
profile your code, run it in debugger (good to have, just in case ;-)