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

Discussion in 'C Programming' started by peter_k, May 2, 2006.

  1. peter_k

    peter_k Guest

    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
     
    peter_k, May 2, 2006
    #1
    1. Advertising

  2. peter_k

    Vladimir Oka Guest

    peter_k wrote:
    > 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.

    > 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 }
     
    Vladimir Oka, May 2, 2006
    #2
    1. Advertising

  3. peter_k

    jacob navia Guest

    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
     
    jacob navia, May 2, 2006
    #3
  4. 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. :)


    --
    Richard Heathfield
    "Usenet is a strange place" - dmr 29/7/1999
    http://www.cpax.org.uk
    email: rjh at above domain (but drop the www, obviously)
     
    Richard Heathfield, May 2, 2006
    #4
  5. In article <>,
    Vladimir Oka <> wrote:

    >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
     
    Richard Tobin, May 2, 2006
    #5
  6. peter_k

    Vladimir Oka Guest

    Richard Tobin wrote:
    > In article <>,
    > Vladimir Oka <> wrote:
    >
    > >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.


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

    Anyway, OP did get a few usable answers...
     
    Vladimir Oka, May 2, 2006
    #6
  7. peter_k

    jacob navia Guest

    Richard Heathfield a écrit :
    > 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. :)
    >
    >


    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...
     
    jacob navia, May 2, 2006
    #7
  8. 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.

    --
    Richard Heathfield
    "Usenet is a strange place" - dmr 29/7/1999
    http://www.cpax.org.uk
    email: rjh at above domain (but drop the www, obviously)
     
    Richard Heathfield, May 2, 2006
    #8
  9. peter_k

    Mike Wahler Guest

    "jacob navia" <> wrote in message
    news:445748e0$0$18312$...


    <OT>>
    > 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
     
    Mike Wahler, May 2, 2006
    #9
  10. 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.

    --
    Richard Heathfield
    "Usenet is a strange place" - dmr 29/7/1999
    http://www.cpax.org.uk
    email: rjh at above domain (but drop the www, obviously)
     
    Richard Heathfield, May 2, 2006
    #10
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steven Cheng[MSFT]

    RE: CLR Profiler

    Steven Cheng[MSFT], May 31, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    513
    =?Utf-8?B?TWFyayBGb3g=?=
    May 31, 2004
  2. Alan Mackenzie
    Replies:
    5
    Views:
    463
    Dave Rahardja
    Sep 16, 2004
  3. potatosoftware
    Replies:
    0
    Views:
    662
    potatosoftware
    Nov 4, 2009
  4. Replies:
    1
    Views:
    105
  5. stumblng.tumblr
    Replies:
    1
    Views:
    208
    stumblng.tumblr
    Feb 4, 2008
Loading...

Share This Page