Question about Gprof

This is a discussion on Question about Gprof within the C++ Programming forums, part of the General Programming Boards category; I just got through playing around with Gprof and my results seem to be nonsensical. The program, a directory lister, ...

  1. #1
    Registered User
    Join Date
    Mar 2002
    Posts
    15

    Question about Gprof

    I just got through playing around with Gprof and my results seem to be nonsensical. The program, a directory lister, ran for about ten seconds and then exited normally. The gmon.out file appeared and I ran it through Gprof. The problem is that the results only show the program running for 0.02 seconds. I am doing all of this under windows and I was wondering if that perhaps is the problem.

    Thanks in advance for the help,

    PetrolMan

  2. #2
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,158
    Quote Originally Posted by PetrolMan View Post
    I just got through playing around with Gprof and my results seem to be nonsensical. The program, a directory lister, ran for about ten seconds and then exited normally. The gmon.out file appeared and I ran it through Gprof. The problem is that the results only show the program running for 0.02 seconds. I am doing all of this under windows and I was wondering if that perhaps is the problem.

    Thanks in advance for the help,

    PetrolMan
    Sounds about right. Compared to the glacially slow rate of reading from disk, your program did practically nothing at all. Instead it twiddled its thumbs for ten seconds.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Alice....
    By Lurker in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 06-20-2005, 02:51 PM
  2. Debugging question
    By o_0 in forum C Programming
    Replies: 9
    Last Post: 10-10-2004, 05:51 PM
  3. Question about pointers #2
    By maxhavoc in forum C++ Programming
    Replies: 28
    Last Post: 06-21-2004, 12:52 PM
  4. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 09:47 PM
  5. Question, question!
    By oskilian in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 12-24-2001, 12:47 AM

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