This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Profiling and C++
- To: gcc at gcc dot gnu dot org
- Subject: Profiling and C++
- From: Bohdan Vlasyuk <bohdan at kivc dot vstu dot vinnica dot ua>
- Date: Wed, 18 Jul 2001 11:52:18 +0300
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"