public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Bengt Gorden <bengan@sunet.se>
To: gentoo-dev@gentoo.org
Subject: [gentoo-dev] gcc -pg not working properly
Date: Thu, 09 Jan 2003 23:31:21 +0100	[thread overview]
Message-ID: <3E1DF839.80009@sunet.se> (raw)

I tried this on gentoo-user first but didn't get any answere there so I 
try my luck here.

I need to profile some programs but it seems to me that gcc with -pg 
doesn't work in gentoo. I have tested with gcc 2.95.3 and 3.2, on 
different machines. Both produce gmon.out that is wrong. It has no data 
in it. I just made a "hello world" to check it. Anyone knows a sollution 
to this problem?

bengan@iib tmp $ more hello.c
#include <stdio.h>

int main(void)
{
         printf("Hello World\n");
         return 0;
}

bengan@iib tmp $ gcc -pg -o hello hello.c

bengan@iib tmp $ ./hello
Hello World

bengan@iib tmp $ ls -l gmon.out
-rw-r--r--    1 bengan   users         283 Jan  9 08:44 gmon.out

bengan@iib tmp $ gprof hello
gprof: gmon.out file is missing call-graph data

I have tested it on MacOS X with gcc 3.1 and on netbsd with gcc 2.95.3 
and it works fine.

/Bengan



--
gentoo-dev@gentoo.org mailing list


                 reply	other threads:[~2003-01-09 22:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=3E1DF839.80009@sunet.se \
    --to=bengan@sunet.se \
    --cc=gentoo-dev@gentoo.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