c++ - gmon.out is not created when executable forks another executable -


i using gprof profiling. gmon.out not created when fork executable inside main executable compiled option -pg. idea how resolve it.

but gmon.out not created when fork executable

it does. has same name other gmon.out files. silently overwrite each other.

gnu, in infinite wisdom, recommends each child process want profile executed in own current directory. use mkdir , chdir in code needed. since gmon.out written out process finishes, necessary chdir before calling exit.

i recommend looking @ valgrind. among other nice things, has output files named something.somethingelse.$pid.


Comments

Popular posts from this blog

php - get table cell data from and place a copy in another table -

javascript - Mootools wait with Fx.Morph start -

php - Navigate throught databse rows -