I'm searching for c profiler which will...

P

peter_k

Hi,

I'm searching for c profiler which will show me how many times each
line was called... I mean something like this...

int main() {
1 int x,a=0;
5 for(x=0;x<5;++x) {
5 ++a;
5 }
1 x=9;
1 return 0;
0 x=3;
0 }

Greets & Thanks
Peter_K
 
V

Vladimir Oka

peter_k said:
Hi,

I'm searching for c profiler which will show me how many times each
line was called...

And why did you think this was a question for the group dealing with
Standard C?

Once you decide on which OS you want to run such a profiler, and what
tool chain it should support, try finding newsgroups that deal in one
and/or the other, and ask there.
 
J

jacob navia

peter_k a écrit :
Hi,

I'm searching for c profiler which will show me how many times each
line was called... I mean something like this...

int main() {
1 int x,a=0;
5 for(x=0;x<5;++x) {
5 ++a;
5 }
1 x=9;
1 return 0;
0 x=3;
0 }

Greets & Thanks
Peter_K

The lcc-win32 C profiler does this. You should choose the menu item
"Utils" --> "Profile" --> "Detailed".

In the project configuration you should set "Enable profiling" in the
compiler configuration panel.

lcc-win32 is available at:

http://www.cs.virginia.edu/~lcc-win32
 
R

Richard Heathfield

peter_k said:
Hi,

I'm searching for c profiler which will show me how many times each
line was called... I mean something like this...

int main() {
1 int x,a=0;
5 for(x=0;x<5;++x) {
5 ++a;
5 }
1 x=9;
1 return 0;
0 x=3;
0 }

Microsoft Visual C++ versions up to and including 1.5x incorporate such a
profiler.

My VC++1.5 CD is still for sale. As far as I can make out, the last time I
mentioned it here was 23rd August 2001, when I said:

"The net price is one million pounds sterling (net because it doesn't
include postage and packing costs, or VAT at 17.5%, which you will also
have to meet). For the money, you get the original CD-ROM, the original
box it came in, and as much of the rather meagre printed documentation
as I can find in a 20-minute search of my study.

If you're interested, let me know."

One day, I guess, someone will be desperate enough to meet my price. :)
 
R

Richard Tobin

Vladimir Oka said:
Once you decide on which OS you want to run such a profiler, and what
tool chain it should support, try finding newsgroups that deal in one
and/or the other, and ask there.

Perhaps he isn't restricted to a single OS or tool chain? I often
find myself switching systems to use a tool that's not available on
the one I was using.

-- Richard
 
V

Vladimir Oka

Richard said:
Perhaps he isn't restricted to a single OS or tool chain? I often
find myself switching systems to use a tool that's not available on
the one I was using.

True enough. Also, with profilers you're not usualy restricted to a
single language either.

Anyway, OP did get a few usable answers...
 
J

jacob navia

Richard Heathfield a écrit :
peter_k said:




Microsoft Visual C++ versions up to and including 1.5x incorporate such a
profiler.

My VC++1.5 CD is still for sale. As far as I can make out, the last time I
mentioned it here was 23rd August 2001, when I said:

"The net price is one million pounds sterling (net because it doesn't
include postage and packing costs, or VAT at 17.5%, which you will also
have to meet). For the money, you get the original CD-ROM, the original
box it came in, and as much of the rather meagre printed documentation
as I can find in a 20-minute search of my study.

If you're interested, let me know."

One day, I guess, someone will be desperate enough to meet my price. :)

The profiler worked up to MSVC 4.2. Then, for mysterious reasons it was
dropped. Neither MSVC 6.0 nor MSVC 2005 feature a profiler.

Maybe if you wait some time, you will be lucky...
 
R

Richard Heathfield

jacob navia said:
The profiler worked up to MSVC 4.2.

Ah, okay, it may have been line *timing* that was dropped after 1.5x rather
than line counting. Silly me.
Then, for mysterious reasons it was
dropped. Neither MSVC 6.0 nor MSVC 2005 feature a profiler.

I don't know about your MSVC 6, but my MSVC 6 certainly does.
 
M

Mike Wahler

The profiler worked up to MSVC 4.2. Then, for mysterious reasons it was
dropped. Neither MSVC 6.0 nor MSVC 2005 feature a profiler.

So what's that thing in my MSVC++6.0 called a 'profiler' which
I've been using for so many years?
</OT>

-Mike
 
R

Richard Heathfield

Mike Wahler said:
So what's that thing in my MSVC++6.0 called a 'profiler' which
I've been using for so many years?

Quite.

It is a shame, though, that they dropped support for individual line
timings. I know they weren't *much* use, but they were occasionally the
Right Thing.

I have used line timings plenty of times for the hell of it, and once
because it was actually useful - and showed me how to reduce a long runtime
by 20% in one swell foop. That one time was enough to make the feature
worth having. I would guess the time saved by users over the lifetime of
that product, just by fixing that one line, to be somewhere in the region
of two person-years.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top