C profilers

This is a discussion on C profilers within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Hi, Are there any free C profilers around? I only found ONE ( LCC-WIN32 ) but i want it as ...

  1. #1
    Registered User Nutshell's Avatar
    Join Date
    Jan 2002
    Posts
    1,020

    C profilers

    Hi,

    Are there any free C profilers around? I only found ONE ( LCC-WIN32 ) but i want it as a seperate program, or one that can work with my current IDE ( DevC++ 4 ).

    thnx

  2. #2
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,386

  3. #3
    Registered User Nutshell's Avatar
    Join Date
    Jan 2002
    Posts
    1,020
    The first site's program only got source, and i couldn't compiile them properly.

    The second site only got cprof, only the unix version, but i am using windows xp.

    The third link's profiler only supports turbo C, but i use DevC++.

    THnx for those linkx but if you or anyone else can suggest a freee profile that suit my platform i'll really appreciate it. I use windows xp and devC++ 4.

    thnx in advance

  4. #4
    Blank
    Join Date
    Aug 2001
    Posts
    1,034
    By setting the flags on your compiler to -pg and compiling
    you should be able to use gprof which is in the bin directory of Dev-c++ .

  5. #5
    Registered User Nutshell's Avatar
    Join Date
    Jan 2002
    Posts
    1,020
    It is not in my bin directory.

  6. #6
    Blank
    Join Date
    Aug 2001
    Posts
    1,034
    I thought for sure it would be there as it's a standard
    utility.

    You can download gprof.exe from here and then unzip
    it into your bin directory.
    http://chronos.cs.msu.su/MinGW32/Khan_Mumit/ports/

    This is a manual showing you how to use gprof.
    http://www.gnu.org/manual/gprof-2.9....ono/gprof.html

    When you run it you must make sure that you compile
    and link with -pg.

    The only why I know how to do this
    is to use the command line but there's probably some
    way to set the linking commands with devc++.

  7. #7
    Registered User Nutshell's Avatar
    Join Date
    Jan 2002
    Posts
    1,020
    Yeah thnx i got it and gcc -pg compiled it. I tried it. IF it says 'no time accumulated' does it mean that my program is too small for it to calculate any times? Coz i can't find any timings on the output. Also, it doens't output into a file right?

    thxn

  8. #8
    Blank
    Join Date
    Aug 2001
    Posts
    1,034
    Yea, I think so.

    Probably best thing to do when you know what everything
    stands for in the profile is gprof -b > log.txt

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21