I am using gprof for profiling. But gmon.out is not created when I fork another executable inside the main executable which is compiled with option -pg. Any idea how to resolve it. Answer But gmon.out is not created when I fork another executable It probably does. It simply has the same name as all the other gmon.out files. They just
Tag: gprof
Why does my code run slower with multiple threads than with a single thread when it is compiled for profiling (-pg)?
I’m writing a ray tracer. Recently, I added threading to the program to exploit the additional cores on my i5 Quad Core. In a weird turn of events the debug version of the application is now running slower, but the optimized build is running faster than before I added threading. I’m passing the “-g -pg” flags to gcc for the