[Bug gcov-profile/91971] Profile directory concatenated with object file path
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91971 --- Comment #10 from CVS Commits --- The master branch has been updated by Martin Liska : https://gcc.gnu.org/g:554ced43ebe7fd21827d90449e42adf140f32405 commit r10-6478-g554ced43ebe7fd21827d90449e42adf140f32405 Author: Martin Liska Date: Thu Feb 6 14:53:28 2020 +0100 Revert mangling of names with -fprofile-generate=. PR gcov-profile/91971 PR gcov-profile/93466 * coverage.c (coverage_init): Revert mangling of path into filename. It can lead to huge filename length. Creation of subfolders seem more natural.
[Bug gcov-profile/91971] Profile directory concatenated with object file path
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91971 Martin Liška changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #9 from Martin Liška --- Fixed again.
[Bug gcov-profile/91971] Profile directory concatenated with object file path
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91971 --- Comment #8 from Martin Liška --- Author: marxin Date: Thu Dec 5 09:08:44 2019 New Revision: 278990 URL: https://gcc.gnu.org/viewcvs?rev=278990=gcc=rev Log: Fix profile name files without -fprofile-dir. 2019-12-05 Martin Liska PR gcov-profile/91971 * coverage.c (coverage_init): Mangle full path only when -fprofile-dir is used. Modified: trunk/gcc/ChangeLog trunk/gcc/coverage.c
[Bug gcov-profile/91971] Profile directory concatenated with object file path
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91971 Martin Liška changed: What|Removed |Added Status|REOPENED|ASSIGNED Assignee|qinzhao at gcc dot gnu.org |marxin at gcc dot gnu.org
[Bug gcov-profile/91971] Profile directory concatenated with object file path
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91971 Eric Botcazou changed: What|Removed |Added Status|RESOLVED|REOPENED CC||ebotcazou at gcc dot gnu.org Resolution|FIXED |--- --- Comment #7 from Eric Botcazou --- Reopened because the new behavior is problematic. Consider the file t.c: int main (void) { return 0; } in the directory /home/eric and compile it like so: gcc -c /home/eric/t.c -o /home/eric/t.o -fprofile-arcs -ftest-coverage gcc /home/eric/t.o -o /home/eric/t -lgcov /home/eric/t You get the following couple of files in the directory: #home#eric#t.gcda #home#eric#t.gcno whereas you would have gotten t.gcda and t.gcno before. Please consider making the change conditional on -fprofile-dir= or somesuch.
[Bug gcov-profile/91971] Profile directory concatenated with object file path
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91971 qinzhao at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #6 from qinzhao at gcc dot gnu.org --- the patch has been checked in upstream gcc today.
[Bug gcov-profile/91971] Profile directory concatenated with object file path
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91971 --- Comment #5 from qinzhao at gcc dot gnu.org --- Author: qinzhao Date: Wed Oct 23 18:12:39 2019 New Revision: 277344 URL: https://gcc.gnu.org/viewcvs?rev=277344=gcc=rev Log: 2019-10-23 qing zhao PR gcov-profile/91971 * coverage.c (coverage_init): Mangle the full path of filename when filename is a absolute path. Modified: trunk/gcc/ChangeLog trunk/gcc/coverage.c
[Bug gcov-profile/91971] Profile directory concatenated with object file path
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91971 --- Comment #4 from Martin Liška --- (In reply to qinzhao from comment #3) > (In reply to Martin Liška from comment #2) > > Confirmed. Can you please send the patch to mailing list? > > I have sent the patch to gcc-patches several weeks ago, and pinged twice > already: > > https://gcc.gnu.org/ml/gcc-patches//2019-10/msg01506.html Good, I'll make a review tomorrow. For the next time, please add me to CC of the email. > > are you the reviewer for this? I am, I was on vacation for almost 4 weeks, so that's why you haven't received a patch review ;)
[Bug gcov-profile/91971] Profile directory concatenated with object file path
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91971 --- Comment #3 from qinzhao at gcc dot gnu.org --- (In reply to Martin Liška from comment #2) > Confirmed. Can you please send the patch to mailing list? I have sent the patch to gcc-patches several weeks ago, and pinged twice already: https://gcc.gnu.org/ml/gcc-patches//2019-10/msg01506.html are you the reviewer for this?
[Bug gcov-profile/91971] Profile directory concatenated with object file path
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91971 Martin Liška changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2019-10-22 Ever confirmed|0 |1 --- Comment #2 from Martin Liška --- Confirmed. Can you please send the patch to mailing list?
[Bug gcov-profile/91971] Profile directory concatenated with object file path
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91971 --- Comment #1 from qinzhao at gcc dot gnu.org --- the following simple patch will fix this issue: $ git diff coverage.c diff --git a/gcc/coverage.c b/gcc/coverage.c index 0d5138f..a80337e 100644 --- a/gcc/coverage.c +++ b/gcc/coverage.c @@ -1229,6 +1229,11 @@ coverage_init (const char *filename) else profile_data_prefix = getpwd (); } + else +{ + filename = mangle_path (filename); + len = strlen (filename); +} if (profile_data_prefix) prefix_len = strlen (profile_data_prefix);