* 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 1:59 Profiling and C++ Bohdan Vlasyuk
@ 2001-07-18 8:48 ` John Levon
2001-07-18 9:11 ` Bohdan Vlasyuk
0 siblings, 1 reply; 5+ messages in thread
From: John Levon @ 2001-07-18 8:48 UTC (permalink / raw)
To: gcc
On Wed, Jul 18, 2001 at 11:52:18AM +0300, Bohdan Vlasyuk wrote:
> Is it true that I can't do any profiling with my C++ programs?
no
> 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)
probably need -g -pg for the final link stage too.
john
--
"Voodoo Programming: Things programmers do that they know shouldn't work but
they try anyway, and which sometimes actually work, such as recompiling
everything."
- Karl Lehenbauer
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Profiling and C++
2001-07-18 8:48 ` John Levon
@ 2001-07-18 9:11 ` Bohdan Vlasyuk
2001-07-18 9:12 ` John Levon
0 siblings, 1 reply; 5+ messages in thread
From: Bohdan Vlasyuk @ 2001-07-18 9:11 UTC (permalink / raw)
To: John Levon; +Cc: gcc
On Wed, Jul 18, 2001 at 04:48:46PM +0100, John Levon wrote:
>> I've tried it, and it doesn't seem to work for me.
>> That's piece of makefile:
>> CFLAGS = -g -pg
>> COMPILE = $(CC) $(CFLAGS) -c
>> LINK = $(CC) $(LFLAGS) $(LIBS)
> probably need -g -pg for the final link stage too.
It is included. That's not the problem.
I've figured out that I and too old binutils, so I updated it, and it
works now. Sorry. :(.
[I still have questions, but I suppose that's wrong list for it]
--
Where are the calculations that go with a calculated risk?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Profiling and C++
2001-07-18 9:11 ` Bohdan Vlasyuk
@ 2001-07-18 9:12 ` John Levon
0 siblings, 0 replies; 5+ messages in thread
From: John Levon @ 2001-07-18 9:12 UTC (permalink / raw)
To: gcc
On Wed, Jul 18, 2001 at 07:02:41PM +0300, Bohdan Vlasyuk wrote:
> I've figured out that I and too old binutils, so I updated it, and it
> works now. Sorry. :(.
>
> [I still have questions, but I suppose that's wrong list for it]
linuxperf@nl.linux.org ?
what are your problems ?
regards
john
--
"Voodoo Programming: Things programmers do that they know shouldn't work but
they try anyway, and which sometimes actually work, such as recompiling
everything."
- Karl Lehenbauer
^ 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).