Re: gcov can't collect data when process is executed by systemctl start but it can when executed by ./process

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux