Thread: Dev-C++ Profile Analysis

  1. #1
    Registered User
    Join Date
    Mar 2005
    Posts
    28

    Question Dev-C++ Profile Analysis

    I'm trying to get Dev-C++ 4.9.9.2 to do profile analysis on my code. It isn't working. Here is my procedure:

    1. Open arbitrary project.
    2. Click Execute -> Profile Analysis
    3. "Compile for Profiling not enabled in project options. Recompile?" message pops up. I hit "yes".
    4. It compiles.
    5. Hit F9 and run the thing.
    6. Click Execute -> Profile Analysis
    7. It parses the stuff, and then brings up a partial listing. It tells me the number of times each function has been called, but doesn't give me the times for each function (or more specifically, claims that "time in function" and "percent of time spent in function" are both 0).
    8. Click over to the "Call Graph" tab and am greeted with "<Error parsing output>"

    So I'm finding the profile analyzer completely impossible to use, at least for its primary purpose of optimizing code for speed. Help, please?

    EDIT: Testing with the following program produced the expected behavior:
    Code:
    #include <stdio.h>
    #include <time.h>
    
    const unsigned int ItersToWaste = 100000000;
    
    void wasteTime(unsigned int to) {
         for( ; to > 0; to--);
    };
    
    int main () {
         printf("Timewasting test");
         clock_t start = clock();
         printf("\nBegin waste to %u at %u",ItersToWaste,start);
         wasteTime(ItersToWaste);
         clock_t end = clock();
         printf("\nWaste complete at %u; elapsed=%u",
              end, end - start);
         getchar();
         return 0;
    };
    Is this a C++-related issue, then? This program is pure C, whereas the other was a big C++ beast. Is profile analysis meant primarily for low-level debug, or what? Help!
    Last edited by Orborde; 05-28-2005 at 01:45 AM. Reason: add more

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. New to Dev C++/<windows.h>...
    By Cilius in forum C++ Programming
    Replies: 3
    Last Post: 02-23-2005, 01:05 AM
  2. Glut and Dev C++, Programs not Quitting?
    By Zeusbwr in forum Game Programming
    Replies: 13
    Last Post: 11-29-2004, 08:43 PM
  3. openGL programming - From MSVC++ to Dev C++
    By WDT in forum Game Programming
    Replies: 1
    Last Post: 03-08-2004, 05:19 PM
  4. rhetorical analysis and why it is for YOU!
    By doubleanti in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 03-30-2003, 02:11 PM
  5. Tutorial about Bloodshed Dev!
    By Unregistered in forum C++ Programming
    Replies: 2
    Last Post: 11-13-2001, 07:42 PM