This is the mail archive of the cygwin mailing list for the Cygwin project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Dear Cygwin, I am having difficulties using gprof under cygwin. When I try to profile the following code, taken from IBM's developerWorks (http://www.ibm.com/developerworks/library/l-gnuprof.html) using gprof, I get "no time accumlated". The number of calls to the various functions are correct, but I get no timing information whatsoever. Someone else reported this as a problem on the list back in June 2008, where the respondent suggested that the code execution was faster than the resolution of gprof's timing interval (0.1ms). In this situation, this is not the case, as I ran the code with 500000 iterations and the user time was much larger than 0.1ms as reported by "time". At this point, I'm stumped. Is anyone else having problems with gprof? Any suggestions would be greatly appreiciated. Best Regards, David Donovan Example code follows, and my cygcheck.out is attached: #include <stdio.h> int a(void) { int i=0,g=0; while(i++<100000) { g+=i; } return g; } int b(void) { int i=0,g=0; while(i++<400000) { g+=i; } return g; } int main(int argc, char** argv) { int iterations; if(argc != 2) { printf("Usage %s <No of Iterations>\n", argv[0]); exit(-1); } else iterations = atoi(argv[1]); printf("No of iterations = %d\n", iterations); while(iterations--) { a(); b(); } return 1; }
Attachment:
cygcheck.out
Description: Binary data
-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |