This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Profiling and C++



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"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]