Mesure time elapsed for each statement execution

This is a discussion on Mesure time elapsed for each statement execution within the C Programming forums, part of the General Programming Boards category; Hi all, i have a C program, which works fine but i have some problems with the long times it ...

  1. #1
    Registered User
    Join Date
    Aug 2009
    Posts
    2

    Question Mesure time elapsed for each statement execution

    Hi all,

    i have a C program, which works fine but i have some problems with the long times it takes to execute, so i want to find the execution times for each statement/functions take.

    Im hoping to find some utility like gdb, so that i can "step" through the code execution ( like debugging ) and see how much time each statement/function takes to execute.

    im trying to use the "maint time" option in gdb, but still couldnt get it to work.

    any help/advice will be greatly a appreciated.

    Thankx in advance.
    Reg.

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    You mean gprof?

  3. #3
    Registered User
    Join Date
    Aug 2009
    Posts
    2
    Quote Originally Posted by tabstop View Post
    You mean gprof?
    No, quite honestly i have never used gprof. ( doing some googling on it now )

    i used gdb with --statistics switch, it displayes an "execution time" but it seems that its the exec time including both ( gdb time + actual program statement exec time )

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. I apologize. Good bye.
    By doubleanti in forum A Brief History of Cprogramming.com
    Replies: 14
    Last Post: 05-03-2002, 06:51 PM
  2. Is this really true or it's just science fiction?
    By Nutshell in forum A Brief History of Cprogramming.com
    Replies: 145
    Last Post: 04-09-2002, 06:17 PM
  3. time class
    By Unregistered in forum C++ Programming
    Replies: 1
    Last Post: 12-11-2001, 09:12 PM
  4. if/else statement C++ first time
    By jill in forum C++ Programming
    Replies: 1
    Last Post: 11-07-2001, 06:49 PM
  5. relating date....
    By Prakash in forum C Programming
    Replies: 3
    Last Post: 09-19-2001, 09:08 AM

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