https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100751
--- Comment #9 from Martin Liška <marxin at gcc dot gnu.org> --- (In reply to Gejoe from comment #8) > (In reply to Martin Liška from comment #6) > > > Yes, __gcov_reset is supposed to be called at the beginning when an > > application wants to start > > profiling. Again, you don't need to call it manually. > > But reset comes into a picture where something has happened already and then > the result needs to be cleared, isn't it ? It's the other way around, you start an application and then you decide you want to start profiling, so you call __gcov_reste. > At the application start, > applying a reset would not make sense I think. Yes, it does not make sense. > gcov_reset would be sensible > only after a gcov_dump , isn't it ? No, as explained. > > Let me know if I miss the actual design/flow of these functions. Btw. why do you need calling __gcov_dump and __gcov_reset manually? How is your training run special?