https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100751
--- Comment #4 from Gejoe <gejoed at rediffmail dot com> --- (In reply to Martin Liška from comment #3) > > For the second time and then onwards, __gcov_dump() invocation (by giving > > 'g' character during the a.out run) doesn't happen. > > Yes, one can call __gcov_dump only once per run. So, I understand that __gcov_dump could be used only after doing all the testing with the application ,i.e- towards the end to get the profile/coverage info. Am I right? > > Another thing is that, __gcov_reset() also doesn't appear to work. I tried > > giving the character 'r' during the run of the program but couldn't see the > > counters getting reset to 0 in the sample-prog.gcov file. The previous > > values of lines covered were there. > > No, __gcov_reset resets run-time counters (profile collected so far during > an application run). If you want to clear profile, then simply remove .gcda > files. Resetting run-time counters - does that mean it would not get reflected in .gcda files or the .c.gcov file contents created by gcov (assuming that the application a.out is still on run )?