public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "vkywong at ca dot ibm dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug gcov-profile/31624]  New: gprof names are mangled under 64 bit compilation
Date: Wed, 18 Apr 2007 15:33:00 -0000	[thread overview]
Message-ID: <bug-31624-14425@http.gcc.gnu.org/bugzilla/> (raw)

Problem description
===================
Function names are mangled in gprof output. Such name mangling in gprof
output only occurs when compiling with g++ under 64 bit modes

Compiler output
===============
The name HelloWorld is mangled.

Flat profile:

Each sample counts as 0.01 seconds.
 no time accumulated

  %   cumulative   self              self     total
 time   seconds   seconds    calls  Ts/call  Ts/call  name
  0.00      0.00     0.00        7     0.00     0.00  ._Z10HelloWorldv
  0.00      0.00     0.00        1     0.00     0.00  .__gmon_start__
^L                        Call graph


granularity: each sample hit covers 4 byte(s) no time propagated

index % time    self  children    called     name
                0.00    0.00       7/7           .main [9]
[1]      0.0    0.00    0.00       7         ._Z10HelloWorldv [1]
-----------------------------------------------
                                   1             .__gmon_start__ [2]
                0.00    0.00       1/1           .atexit [8]
[2]      0.0    0.00    0.00       1+1       .__gmon_start__ [2]
                                   1             .__gmon_start__ [2]
-----------------------------------------------
^L
Index by function name

   [1] ._Z10HelloWorldv        [2] .__gmon_start__Expected output
===============

Flat profile:

Each sample counts as 0.01 seconds.
 no time accumulated

  %   cumulative   self              self     total
 time   seconds   seconds    calls  Ts/call  Ts/call  name
  0.00      0.00     0.00        7     0.00     0.00  HelloWorld()
  0.00      0.00     0.00        1     0.00     0.00  global constructors keyed
to _Z10HelloWorldv
  0.00      0.00     0.00        1     0.00     0.00 
__static_initialization_and_destruction_0(int, int)
^L


                        Call graph


granularity: each sample hit covers 4 byte(s) no time propagated

index % time    self  children    called     name
                0.00    0.00       7/7           main [10]
[11]     0.0    0.00    0.00       7         HelloWorld() [11]
-----------------------------------------------
                0.00    0.00       1/1           __do_global_ctors_aux [14]
[12]     0.0    0.00    0.00       1         global constructors keyed to
_Z10HelloWorldv [12]
                0.00    0.00       1/1          
__static_initialization_and_destruction_0(int, int) [13]
-----------------------------------------------
                0.00    0.00       1/1           global constructors keyed to
_Z10HelloWorldv [12]
[13]     0.0    0.00    0.00       1        
__static_initialization_and_destruction_0(int, int) [13]
-----------------------------------------------
^L
Index by function name

  [12] global constructors keyed to _Z10HelloWorldv [11] HelloWorld() [13]
__static_initialization_and_destruction_0(int, int)


Steps to reproduce the problem
==============================
#
/usr/bin/g++ -m64 -pg -o hello hello.C >STEP1.out 2>&1
#
./hello >hello.out 2>STEP2.out
#
/usr/bin/gprof -b hello gmon.out >gprof.out 2>STEP6.out

/* Listing of hello.C */
#include <stream.h>

void HelloWorld()
{
        cout << "Hello, World\n";
}
int main()
{
        for(int i=0; i<7; i++)
                HelloWorld();
        return(0);
}


-- 
           Summary: gprof names are mangled under 64 bit compilation
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: gcov-profile
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: vkywong at ca dot ibm dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31624


             reply	other threads:[~2007-04-18 15:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-18 15:33 vkywong at ca dot ibm dot com [this message]
2007-04-18 19:04 ` [Bug gcov-profile/31624] " pinskia at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-31624-14425@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).