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!



>>>>> "David" == David Dibben <dibben@example.com> writes:

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

Grammatically, the "it" in the previous sentence refers to "gcc".
Izzat what you meant?  The man page seems sufficiently clear to me:

       The profile data is taken from the call graph profile file
       (`gmon.out' default) which is created by programs that are
       compiled with the -pg option of cc(1), pc(1), and f77(1).

Ie:

    David> Have you rembered to run your program? The gmon.out file is
    David> produced when the resulting program is run.

You need to carefully distinguish between things that happen at
compile time and those that happen at run-time.  The profiles of

bash$ gs --help

and

bash$ gs escher.ps

are likely to be mildly different.

Computers are non-deterministic, at least those that have users.  :-)

Steve

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