public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug gcov-profile/95332] New: gcov-tool merge:"not a gcov data file"
@ 2020-05-26 12:27 dongjianqiang2 at huawei dot com
  2020-05-26 13:23 ` [Bug gcov-profile/95332] " marxin at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: dongjianqiang2 at huawei dot com @ 2020-05-26 12:27 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95332

            Bug ID: 95332
           Summary: gcov-tool merge:"not a gcov data file"
           Product: gcc
           Version: 7.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: gcov-profile
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dongjianqiang2 at huawei dot com
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

Created attachment 48605
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48605&action=edit
a patch for gcov-tool.

when I invoke gcov-tool merge dir1 dir2 where dir1 and dir2 are the directories
containing the .gcda files which I intend to combine, I am confronted with
"./test.gcda:not a gcov data file" errors for each file in dir1. After studying
the libgcov code, I have figured out it's an endianness issue. I'm using a
cross compiler --build=x86_64-suse-linux --host=x86_64-suse-linux
--target=aarch64_be-linux-gnu, gcov-tool cannot merge the coverage data
generated by big endian machine. here is patch to fix it. pls review.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug gcov-profile/95332] gcov-tool merge:"not a gcov data file"
  2020-05-26 12:27 [Bug gcov-profile/95332] New: gcov-tool merge:"not a gcov data file" dongjianqiang2 at huawei dot com
@ 2020-05-26 13:23 ` marxin at gcc dot gnu.org
  2020-05-27  1:47 ` dongjianqiang2 at huawei dot com
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-05-26 13:23 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95332

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2020-05-26
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Hello.

I support the patch, do you have a copyright agreement and can you send the
patch to the GCC patches mailing list?

One small nit I noticed:
/home/marxin/Programming/gcc/gcc/../libgcc/libgcov-util.c: In function
‘gcov_info* read_gcda_file(const char*)’:
/home/marxin/Programming/gcc/gcc/../libgcc/libgcov-util.c:264:12: warning:
unused variable ‘magic’ [-Wunused-variable]
  264 |   unsigned magic, version;
      |            ^~~~~

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug gcov-profile/95332] gcov-tool merge:"not a gcov data file"
  2020-05-26 12:27 [Bug gcov-profile/95332] New: gcov-tool merge:"not a gcov data file" dongjianqiang2 at huawei dot com
  2020-05-26 13:23 ` [Bug gcov-profile/95332] " marxin at gcc dot gnu.org
@ 2020-05-27  1:47 ` dongjianqiang2 at huawei dot com
  2020-05-27  3:24 ` dongjianqiang2 at huawei dot com
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dongjianqiang2 at huawei dot com @ 2020-05-27  1:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95332

--- Comment #2 from John Dong <dongjianqiang2 at huawei dot com> ---
(In reply to Martin Liška from comment #1)
> Hello.
> 
> I support the patch, do you have a copyright agreement and can you send the
> patch to the GCC patches mailing list?
> 
> One small nit I noticed:
> /home/marxin/Programming/gcc/gcc/../libgcc/libgcov-util.c: In function
> ‘gcov_info* read_gcda_file(const char*)’:
> /home/marxin/Programming/gcc/gcc/../libgcc/libgcov-util.c:264:12: warning:
> unused variable ‘magic’ [-Wunused-variable]
>   264 |   unsigned magic, version;
>       |            ^~~~~

Hi,

thank you for your reply, I will the patch to the GCC patches mailing list.
thanks.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug gcov-profile/95332] gcov-tool merge:"not a gcov data file"
  2020-05-26 12:27 [Bug gcov-profile/95332] New: gcov-tool merge:"not a gcov data file" dongjianqiang2 at huawei dot com
  2020-05-26 13:23 ` [Bug gcov-profile/95332] " marxin at gcc dot gnu.org
  2020-05-27  1:47 ` dongjianqiang2 at huawei dot com
@ 2020-05-27  3:24 ` dongjianqiang2 at huawei dot com
  2020-05-28  2:11 ` dongjianqiang2 at huawei dot com
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dongjianqiang2 at huawei dot com @ 2020-05-27  3:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95332

--- Comment #3 from John Dong <dongjianqiang2 at huawei dot com> ---
Created attachment 48613
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48613&action=edit
a patch for gcov-tool modified.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug gcov-profile/95332] gcov-tool merge:"not a gcov data file"
  2020-05-26 12:27 [Bug gcov-profile/95332] New: gcov-tool merge:"not a gcov data file" dongjianqiang2 at huawei dot com
                   ` (2 preceding siblings ...)
  2020-05-27  3:24 ` dongjianqiang2 at huawei dot com
@ 2020-05-28  2:11 ` dongjianqiang2 at huawei dot com
  2020-05-28  6:18 ` cvs-commit at gcc dot gnu.org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dongjianqiang2 at huawei dot com @ 2020-05-28  2:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95332

--- Comment #4 from John Dong <dongjianqiang2 at huawei dot com> ---
(In reply to Martin Liška from comment #1)
> Hello.
> 
> I support the patch, do you have a copyright agreement and can you send the
> patch to the GCC patches mailing list?
> 
> One small nit I noticed:
> /home/marxin/Programming/gcc/gcc/../libgcc/libgcov-util.c: In function
> ‘gcov_info* read_gcda_file(const char*)’:
> /home/marxin/Programming/gcc/gcc/../libgcc/libgcov-util.c:264:12: warning:
> unused variable ‘magic’ [-Wunused-variable]
>   264 |   unsigned magic, version;
>       |            ^~~~~

Yes, my company Huawei has signed a copyright agreement with FSF.
and thank you for reviewing this. Could you please help install this patch? I
am not a gcc committer.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug gcov-profile/95332] gcov-tool merge:"not a gcov data file"
  2020-05-26 12:27 [Bug gcov-profile/95332] New: gcov-tool merge:"not a gcov data file" dongjianqiang2 at huawei dot com
                   ` (3 preceding siblings ...)
  2020-05-28  2:11 ` dongjianqiang2 at huawei dot com
@ 2020-05-28  6:18 ` cvs-commit at gcc dot gnu.org
  2020-05-28  6:19 ` marxin at gcc dot gnu.org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-05-28  6:18 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95332

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Liska <marxin@gcc.gnu.org>:

https://gcc.gnu.org/g:17d1594bfe08f3c768e024b180816cbe37ac08ac

commit r11-679-g17d1594bfe08f3c768e024b180816cbe37ac08ac
Author: Martin Liska <mliska@suse.cz>
Date:   Thu May 28 08:16:58 2020 +0200

    gcov-tool: Flexible endian adjustment for merging coverage data

    gcc/ChangeLog:
    2020-05-27  Dong JianQiang  <dongjianqiang2@huawei.com>

            PR gcov-profile/95332
            * gcov-io.c (gcov_var::endian): Move field.
            (from_file): Add IN_GCOV_TOOL check.
            * gcov-io.h (gcov_magic): Ditto.

    libgcc/ChangeLog:
    2020-05-27  Dong JianQiang  <dongjianqiang2@huawei.com>

            PR gcov-profile/95332
            * libgcov-util.c (read_gcda_file): Call gcov_magic.
            * libgcov.h (gcov_magic): Disable GCC poison.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug gcov-profile/95332] gcov-tool merge:"not a gcov data file"
  2020-05-26 12:27 [Bug gcov-profile/95332] New: gcov-tool merge:"not a gcov data file" dongjianqiang2 at huawei dot com
                   ` (4 preceding siblings ...)
  2020-05-28  6:18 ` cvs-commit at gcc dot gnu.org
@ 2020-05-28  6:19 ` marxin at gcc dot gnu.org
  2020-05-28  6:26 ` dongjianqiang2 at huawei dot com
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-05-28  6:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95332

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |11.0

--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
Fixed on master, do you want to backport the patch to active branches?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug gcov-profile/95332] gcov-tool merge:"not a gcov data file"
  2020-05-26 12:27 [Bug gcov-profile/95332] New: gcov-tool merge:"not a gcov data file" dongjianqiang2 at huawei dot com
                   ` (5 preceding siblings ...)
  2020-05-28  6:19 ` marxin at gcc dot gnu.org
@ 2020-05-28  6:26 ` dongjianqiang2 at huawei dot com
  2020-05-29  9:38 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dongjianqiang2 at huawei dot com @ 2020-05-28  6:26 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95332

--- Comment #7 from John Dong <dongjianqiang2 at huawei dot com> ---
(In reply to Martin Liška from comment #6)
> Fixed on master, do you want to backport the patch to active branches?

yes, please backport to active branches. thanks.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug gcov-profile/95332] gcov-tool merge:"not a gcov data file"
  2020-05-26 12:27 [Bug gcov-profile/95332] New: gcov-tool merge:"not a gcov data file" dongjianqiang2 at huawei dot com
                   ` (6 preceding siblings ...)
  2020-05-28  6:26 ` dongjianqiang2 at huawei dot com
@ 2020-05-29  9:38 ` cvs-commit at gcc dot gnu.org
  2020-05-29  9:39 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-05-29  9:38 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95332

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Martin Liska
<marxin@gcc.gnu.org>:

https://gcc.gnu.org/g:0579f339110acb85d5bda128588f4d57c45dfe7a

commit r10-8205-g0579f339110acb85d5bda128588f4d57c45dfe7a
Author: Martin Liska <mliska@suse.cz>
Date:   Thu May 28 08:16:58 2020 +0200

    gcov-tool: Flexible endian adjustment for merging coverage data

    gcc/ChangeLog:
    2020-05-27  Dong JianQiang  <dongjianqiang2@huawei.com>

            PR gcov-profile/95332
            * gcov-io.c (gcov_var::endian): Move field.
            (from_file): Add IN_GCOV_TOOL check.
            * gcov-io.h (gcov_magic): Ditto.

    libgcc/ChangeLog:
    2020-05-27  Dong JianQiang  <dongjianqiang2@huawei.com>

            PR gcov-profile/95332
            * libgcov-util.c (read_gcda_file): Call gcov_magic.
            * libgcov.h (gcov_magic): Disable GCC poison.

    (cherry picked from commit 17d1594bfe08f3c768e024b180816cbe37ac08ac)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug gcov-profile/95332] gcov-tool merge:"not a gcov data file"
  2020-05-26 12:27 [Bug gcov-profile/95332] New: gcov-tool merge:"not a gcov data file" dongjianqiang2 at huawei dot com
                   ` (7 preceding siblings ...)
  2020-05-29  9:38 ` cvs-commit at gcc dot gnu.org
@ 2020-05-29  9:39 ` cvs-commit at gcc dot gnu.org
  2020-05-29  9:40 ` cvs-commit at gcc dot gnu.org
  2020-05-29  9:40 ` marxin at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-05-29  9:39 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95332

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Martin Liska
<marxin@gcc.gnu.org>:

https://gcc.gnu.org/g:a243b6316937e4d4149e7ff5ad616f7baf4d4d34

commit r9-8636-ga243b6316937e4d4149e7ff5ad616f7baf4d4d34
Author: Martin Liska <mliska@suse.cz>
Date:   Thu May 28 08:16:58 2020 +0200

    gcov-tool: Flexible endian adjustment for merging coverage data

    gcc/ChangeLog:
    2020-05-27  Dong JianQiang  <dongjianqiang2@huawei.com>

            PR gcov-profile/95332
            * gcov-io.c (gcov_var::endian): Move field.
            (from_file): Add IN_GCOV_TOOL check.
            * gcov-io.h (gcov_magic): Ditto.

    libgcc/ChangeLog:
    2020-05-27  Dong JianQiang  <dongjianqiang2@huawei.com>

            PR gcov-profile/95332
            * libgcov-util.c (read_gcda_file): Call gcov_magic.
            * libgcov.h (gcov_magic): Disable GCC poison.

    (cherry picked from commit 17d1594bfe08f3c768e024b180816cbe37ac08ac)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug gcov-profile/95332] gcov-tool merge:"not a gcov data file"
  2020-05-26 12:27 [Bug gcov-profile/95332] New: gcov-tool merge:"not a gcov data file" dongjianqiang2 at huawei dot com
                   ` (8 preceding siblings ...)
  2020-05-29  9:39 ` cvs-commit at gcc dot gnu.org
@ 2020-05-29  9:40 ` cvs-commit at gcc dot gnu.org
  2020-05-29  9:40 ` marxin at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-05-29  9:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95332

--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-8 branch has been updated by Martin Liska
<marxin@gcc.gnu.org>:

https://gcc.gnu.org/g:406f6d0ad7325f872c4a084d360196302029fbeb

commit r8-10283-g406f6d0ad7325f872c4a084d360196302029fbeb
Author: Martin Liska <mliska@suse.cz>
Date:   Thu May 28 08:16:58 2020 +0200

    gcov-tool: Flexible endian adjustment for merging coverage data

    gcc/ChangeLog:
    2020-05-27  Dong JianQiang  <dongjianqiang2@huawei.com>

            PR gcov-profile/95332
            * gcov-io.c (gcov_var::endian): Move field.
            (from_file): Add IN_GCOV_TOOL check.
            * gcov-io.h (gcov_magic): Ditto.

    libgcc/ChangeLog:
    2020-05-27  Dong JianQiang  <dongjianqiang2@huawei.com>

            PR gcov-profile/95332
            * libgcov-util.c (read_gcda_file): Call gcov_magic.
            * libgcov.h (gcov_magic): Disable GCC poison.

    (cherry picked from commit 17d1594bfe08f3c768e024b180816cbe37ac08ac)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug gcov-profile/95332] gcov-tool merge:"not a gcov data file"
  2020-05-26 12:27 [Bug gcov-profile/95332] New: gcov-tool merge:"not a gcov data file" dongjianqiang2 at huawei dot com
                   ` (9 preceding siblings ...)
  2020-05-29  9:40 ` cvs-commit at gcc dot gnu.org
@ 2020-05-29  9:40 ` marxin at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-05-29  9:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95332

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #11 from Martin Liška <marxin at gcc dot gnu.org> ---
Fixed on all active branches.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-05-29  9:40 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-26 12:27 [Bug gcov-profile/95332] New: gcov-tool merge:"not a gcov data file" dongjianqiang2 at huawei dot com
2020-05-26 13:23 ` [Bug gcov-profile/95332] " marxin at gcc dot gnu.org
2020-05-27  1:47 ` dongjianqiang2 at huawei dot com
2020-05-27  3:24 ` dongjianqiang2 at huawei dot com
2020-05-28  2:11 ` dongjianqiang2 at huawei dot com
2020-05-28  6:18 ` cvs-commit at gcc dot gnu.org
2020-05-28  6:19 ` marxin at gcc dot gnu.org
2020-05-28  6:26 ` dongjianqiang2 at huawei dot com
2020-05-29  9:38 ` cvs-commit at gcc dot gnu.org
2020-05-29  9:39 ` cvs-commit at gcc dot gnu.org
2020-05-29  9:40 ` cvs-commit at gcc dot gnu.org
2020-05-29  9:40 ` marxin at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).