public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug gcov-profile/108146] New: gcc -pg does not produce gmon.out
@ 2022-12-16 13:06 Sid.Touati at inria dot fr
  2022-12-16 14:12 ` [Bug gcov-profile/108146] " marxin at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Sid.Touati at inria dot fr @ 2022-12-16 13:06 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 108146
           Summary: gcc -pg does not produce gmon.out
           Product: gcc
           Version: 12.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: gcov-profile
          Assignee: unassigned at gcc dot gnu.org
          Reporter: Sid.Touati at inria dot fr
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

Created attachment 54112
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54112&action=edit
source code (C and h files) + makefile. Just type make, then run a.out.

Hi,
please find enclosed my archive that contains my source files and make.
Juste type make to generate a.out, then execute a.out to see the problem.

The problem is that the file gmon.out is not generated. I checked the assembly
generated by gcc, gmon functions are inserted correctly. When I debug the
binary code, it seems that gmon functions are not called... This is a nightmare
to understand why :)

I checked that this problem does not happen with many other C applications. I
do not understand why it happens here. I checked this "bug" on two distinct
machines. 

Here is my current configuration: 
touati@:~/tmp/mypb> uname -a
Linux  6.0.12-300.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 8 16:58:47 UTC
2022 x86_64 x86_64 x86_64 GNU/Linux

It is a fedora 37 workstation.

Maybe it is a bug in "gcc -pg". 

Regards
S.T.

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

* [Bug gcov-profile/108146] gcc -pg does not produce gmon.out
  2022-12-16 13:06 [Bug gcov-profile/108146] New: gcc -pg does not produce gmon.out Sid.Touati at inria dot fr
@ 2022-12-16 14:12 ` marxin at gcc dot gnu.org
  2022-12-16 14:19 ` [Bug libgcc/108146] " Sid.Touati at inria dot fr
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-12-16 14:12 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2022-12-16
     Ever confirmed|0                           |1

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Hey, it's related to the fact the mcount in glibc enters GMON_PROF_ERROR state.
That happens in:

(gdb) bt
#0  __mcount_internal (frompc=<optimized out>, selfpc=5075099) at mcount.c:173
#1  0x0000155555407968 in mcount () at ../sysdeps/x86_64/_mcount.S:50
#2  0x00000000004d709b in updateExclu (data=0x7ffffffd3b18, res=0x7ffffffcc5c0)
at main.c:64359
#3  0x00000000004b8e25 in main (argc=1, argv=0x7fffffffd758) at main.c:54437

(gdb) p _gmonparam.state
$10 = 2

And that's why no gmon.out file is created. Please report it to glibc guys.

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

* [Bug libgcc/108146] gcc -pg does not produce gmon.out
  2022-12-16 13:06 [Bug gcov-profile/108146] New: gcc -pg does not produce gmon.out Sid.Touati at inria dot fr
  2022-12-16 14:12 ` [Bug gcov-profile/108146] " marxin at gcc dot gnu.org
@ 2022-12-16 14:19 ` Sid.Touati at inria dot fr
  2022-12-16 19:46 ` [Bug other/108146] " pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Sid.Touati at inria dot fr @ 2022-12-16 14:19 UTC (permalink / raw)
  To: gcc-bugs

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

Sid.Touati at inria dot fr changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|gcov-profile                |libgcc

--- Comment #2 from Sid.Touati at inria dot fr ---
Hi,
this bug has been reported to the gcov-profile component [Bug
gcov-profile/108146], Martin Liška found that it is more appropriate to submit
it to glibC guys. 

could you check it please ?

Regards
S.

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

* [Bug other/108146] gcc -pg does not produce gmon.out
  2022-12-16 13:06 [Bug gcov-profile/108146] New: gcc -pg does not produce gmon.out Sid.Touati at inria dot fr
  2022-12-16 14:12 ` [Bug gcov-profile/108146] " marxin at gcc dot gnu.org
  2022-12-16 14:19 ` [Bug libgcc/108146] " Sid.Touati at inria dot fr
@ 2022-12-16 19:46 ` pinskia at gcc dot gnu.org
  2022-12-16 19:53 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-12-16 19:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Sid.Touati from comment #2)
> Hi,
> this bug has been reported to the gcov-profile component [Bug
> gcov-profile/108146], Martin Liška found that it is more appropriate to
> submit it to glibC guys. 

He meant filing it to https://sourceware.org/bugzilla/ .

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

* [Bug other/108146] gcc -pg does not produce gmon.out
  2022-12-16 13:06 [Bug gcov-profile/108146] New: gcc -pg does not produce gmon.out Sid.Touati at inria dot fr
                   ` (2 preceding siblings ...)
  2022-12-16 19:46 ` [Bug other/108146] " pinskia at gcc dot gnu.org
@ 2022-12-16 19:53 ` pinskia at gcc dot gnu.org
  2022-12-19  8:28 ` marxin at gcc dot gnu.org
  2022-12-19 10:42 ` Sid.Touati at inria dot fr
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-12-16 19:53 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Already reported to glibc, see the two bug reports in the see also. Also a dup
of bug 99579 too.

*** This bug has been marked as a duplicate of bug 99579 ***

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

* [Bug other/108146] gcc -pg does not produce gmon.out
  2022-12-16 13:06 [Bug gcov-profile/108146] New: gcc -pg does not produce gmon.out Sid.Touati at inria dot fr
                   ` (3 preceding siblings ...)
  2022-12-16 19:53 ` pinskia at gcc dot gnu.org
@ 2022-12-19  8:28 ` marxin at gcc dot gnu.org
  2022-12-19 10:42 ` Sid.Touati at inria dot fr
  5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-12-19  8:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
Btw. you can try the newly added gprofng that was added to binutils recently.

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

* [Bug other/108146] gcc -pg does not produce gmon.out
  2022-12-16 13:06 [Bug gcov-profile/108146] New: gcc -pg does not produce gmon.out Sid.Touati at inria dot fr
                   ` (4 preceding siblings ...)
  2022-12-19  8:28 ` marxin at gcc dot gnu.org
@ 2022-12-19 10:42 ` Sid.Touati at inria dot fr
  5 siblings, 0 replies; 7+ messages in thread
From: Sid.Touati at inria dot fr @ 2022-12-19 10:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Sid.Touati at inria dot fr ---
it seems that gprofng has not been integrated to fedora yet

Le 19/12/2022 à 09:28, marxin at gcc dot gnu.org a écrit :
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108146
> 
> --- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
> Btw. you can try the newly added gprofng that was added to binutils recently.
>

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

end of thread, other threads:[~2022-12-19 10:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-16 13:06 [Bug gcov-profile/108146] New: gcc -pg does not produce gmon.out Sid.Touati at inria dot fr
2022-12-16 14:12 ` [Bug gcov-profile/108146] " marxin at gcc dot gnu.org
2022-12-16 14:19 ` [Bug libgcc/108146] " Sid.Touati at inria dot fr
2022-12-16 19:46 ` [Bug other/108146] " pinskia at gcc dot gnu.org
2022-12-16 19:53 ` pinskia at gcc dot gnu.org
2022-12-19  8:28 ` marxin at gcc dot gnu.org
2022-12-19 10:42 ` Sid.Touati at inria dot fr

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).