On 2017-07-31 22:51 -0400, Xiaoli Feng wrote: > Thanks Xi Ruoyao so much. I have a question. Is *.gcda file only created when > process exit? I did a test. Ran the process. Keep it running. Then check if *.gcda > is generated. And it did acturally. So if it is started by systemd. And keep running. > I think it will generate *.gcda. But it doesn't. I check the namespaces of two processes. > They are the same. According to man page gcov(1): The data in the .gcda files is saved immediately before the program exits. And I wrote a simple program looping forever, compiled it with gcc --coverage. The generated executable only creates .gcda file when it exits. -- Xi Ruoyao <ryxi@xxxxxxxxxxxxxxxxx> School of Aerospace Science and Technology, Xidian University