This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: gcov can't collect data when process is executed by systemctl start but it can when executed by ./process
- From: Xi Ruoyao <ryxi at stu dot xidian dot edu dot cn>
- To: Xiaoli Feng <xifeng at redhat dot com>
- Cc: ryxi at stu dot xidian dot edu dot cn, GCC help <gcc-help at gcc dot gnu dot org>
- Date: Wed, 02 Aug 2017 17:22:10 +0800
- Subject: Re: gcov can't collect data when process is executed by systemctl start but it can when executed by ./process
- Authentication-results: sourceware.org; auth=none
- References: <809232575.31313906.1501491302667.JavaMail.zimbra@redhat.com> <312354067.31314219.1501491465219.JavaMail.zimbra@redhat.com> <90cc5d01-5747-1aad-1006-cbd1c05e876a@free.fr> <1946892081.31324950.1501495541743.JavaMail.zimbra@redhat.com> <1501499082.2281.1.camel@stu.xidian.edu.cn> <1599292270.31614416.1501555874883.JavaMail.zimbra@redhat.com> <1501566571.1331.1.camel@stu.xidian.edu.cn> <1067040334.31875371.1501642558876.JavaMail.zimbra@redhat.com>
On 2017-08-01 22:55 -0400, Xiaoli Feng wrote:
> Now I met a issue when start process by systemd:
>
> profiling:/root/rpmbuild/BUILD/project/daemon/daemon.gcda:Cannot open
>
> I'am sure that the progress have root privilege. I also "chmod 777" this
> directory(daemon). This directory have daemon.c daemon.o daemon.gcno files.
> What else can I check?
I can't reproduce this issue.
I think you should check your unit.service file. Note that "RootDirectory="
option makes a chroot jail, and "ProtectHome=on" makes /root inaccessible.
--
Xi Ruoyao <ryxi@stu.xidian.edu.cn>
School of Aerospace Science and Technology, Xidian University