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!