From: gpt20 AT thor DOT cam DOT ac DOT uk (G.P. Tootell) Newsgroups: comp.os.msdos.djgpp Subject: Re: profiling under djgpp Date: 20 Jan 1997 16:10:08 GMT Organization: University of Cambridge, England Lines: 36 Sender: gpt20 AT hammer DOT thor DOT cam DOT ac DOT uk (G.P. Tootell) Message-ID: <5c05d0$5k2@lyra.csx.cam.ac.uk> References: <9701201125 DOT AA08187 AT cambridge DOT scr DOT slb DOT com> NNTP-Posting-Host: hammer.thor.cam.ac.uk To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp i just did man gprof under linux, having sworn i'd read the thing thru and not found anything. and i couldn't find this section :( grep didn't find it either :( maybe it's sunos specific? you're right of course, it's exactly what i want :) nik In article <9701201125 DOT AA08187 AT cambridge DOT scr DOT slb DOT com>, combee AT cambridge DOT scr DOT slb DOT com (Leendert Combee) writes: |> > |> > Eli Zaretskii (eliz AT is DOT elta DOT co DOT il) wrote: |> > : |> > : On 16 Jan 1997, G.P. Tootell wrote: |> > : |> > : > i can remove them? also can i profile parts of a function, ie. to refine the |> > : > profile and hence determine which part of the routine is slowest (eg. i know |> > : > routine_a() takes up too much time, can i set a breakpoint here to split the |> > : > routine in two? or do i have to split it into 2 separate routines before it will |> > : > profile this way?) |> > : |> > : AFAIK, gprof only supports file-level granularity, i.e. you can compile |> > : some files with -pg and others without it. I don't think you can profile |> > : parts of a function. |> > : |> |> |> From "man gprof" under SunOS/UNIX I quote: |> |> A single function may be split into subfunctions for profil- |> ing by means of the MARK macro (see prof(3)). |> |> |> Unfortunately, I don't know yet how to use this macro nor whether it is supported by |> gcc/djgpp. However, it seems to do what you want.... |> |> --