GpProfile does it's magic by instrumenting the target (translation: changing your program's source code). Special calls to time measuring routines are inserted into the target, which you must then recompile and run. Instrumented target records time passed inside procedures. At the end of run GpProfile reads, analyses and displays recorded profile.