Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tlug: gcc profiler - I give up!



>>>>> "Scott" == Scott Stone <sstone@example.com> writes:

    Scott> I still can't figure out how to make gcc output the
    Scott> profiler information for gprof to read.  According to the
    Scott> manpage, you just add the '-pg' flag to gcc, but ... it
    Scott> doesn't produce gmon.out like gprof says it should.

I just did:

cat hello.c

main()
{
        printf("Hello warudo\n");
}

gcc -pg hello.c
a.out
ls -l
total 610
-rwxrwxr-x   1 andy     tek       187472 Mar  5 13:41 a.out*
-rw-rw-r--   1 andy     tek       101286 Mar  5 13:41 gmon.out
-rw-rw-r--   1 andy     tek           40 Mar  5 13:41 hello.c

gprof

 ..... lots of stuff...


This was on solaris 2.5.1, with gcc 2.7.2.2. on linux RH 5.0, it
"works" but the output lack details, and the gmon.out is very small...

-rwxr-xr-x   1 andy     users       12686 Mar  5 12:49 a.out*
-rw-r--r--   1 andy     users         194 Mar  5 12:49 gmon.out

Also notice the a.out file is rather small...

Not sure what it happning....

The only thing I did find out is that the time on my linux box is
wrong :)

Andy
---------------------------------------------------------------
Next TLUG Nomikai: 11 March Wed 1998 Tengu TokyoEkiMae 19:30
Chuo-ku, Kyobashi 1-1-6, EchiZenYa Bld. B1/B2 03-3275-3691
Next TLUG Meeting: 11 April 1998 Saturday, Tokyo Station
Featuring Tague Griffith of Netscape i18n talking on source code
---------------------------------------------------------------
a word from the sponsor:
TWICS - Japan's First Public-Access Internet System
www.twics.com  info@example.com  Tel:03-3351-5977  Fax:03-3353-6096



Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links