public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Profiling and C++
@ 2001-07-18  1:59 Bohdan Vlasyuk
  2001-07-18  8:48 ` John Levon
  0 siblings, 1 reply; 5+ messages in thread
From: Bohdan Vlasyuk @ 2001-07-18  1:59 UTC (permalink / raw)
  To: gcc

Is it true that I can't do any profiling with my C++ programs?

I've tried it, and it doesn't seem to work for me.

That's piece of makefile:

CC = g++
CFLAGS = -g -pg
LFLAGS = $(CFLAGS)
LIBS =
COMPILE = $(CC) $(CFLAGS) -c

LINK = $(CC) $(LFLAGS) $(LIBS)

$(exe): $(o_files)
        $(LINK) -o $(exe) $(o_files)

%.cpp.o:
        $(COMPILE) $< -o $@


that's gprof output: 


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    18568     0.00     0.00  data_start

....

index % time    self  children    called     name
                0.00    0.00   18568/18568       <hicore> (2)
[1]      0.0    0.00    0.00   18568         data_start [1]
-----------------------------------------------


-- 
There is no opinion so absurd that some philosopher will not express it.
		-- Marcus Tullius Cicero, "Ad familiares"

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: Profiling and C++
@ 2001-07-18  9:10 Janis Johnson
  0 siblings, 0 replies; 5+ messages in thread
From: Janis Johnson @ 2001-07-18  9:10 UTC (permalink / raw)
  To: Bohdan Vlasyuk; +Cc: gcc

> Is it true that I can't do any profiling with my C++ programs?
>
>I've tried it, and it doesn't seem to work for me.

I did quick tests with 2.95.3, 3.0.x, and the mainline and it works
everywhere.  Notice, though that your program didn't accumulate
any time; that's why everything shows up as zero.

>Each sample counts as 0.01 seconds.
> no time accumulated

Janis

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-07-18  9:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-18  1:59 Profiling and C++ Bohdan Vlasyuk
2001-07-18  8:48 ` John Levon
2001-07-18  9:11   ` Bohdan Vlasyuk
2001-07-18  9:12     ` John Levon
2001-07-18  9:10 Janis Johnson

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