delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/11/10/13:47:41.1

Message-ID: <364707CC.6E169154@mat.ufrgs.br>
Date: Mon, 09 Nov 1998 13:18:36 -0200
From: Claudio Andre Heckler <heckler AT mat DOT ufrgs DOT br>
Organization: UFRGS
X-Mailer: Mozilla 4.05 [en] (Win95; I)
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Need to "profile" program's execution
Reply-To: djgpp AT delorie DOT com

Hi guys !  I'm really new on this subject, so any clues and
pointers will be very usefull !

	Question: I have a program, say like the one at the bottom,
and want to execute under some sort of trace utility, that can
report-me things like the time (% or ticks) spent in the key-points 
of the program.

	Example - supose I have this:

/*--------- code starts here -------------*/
void fooA(void) {
   int x=1;
   x++;
}

void fooB(void) {
   double x=1.0;
   x++;
}

int main(){
   for (int i=0; i<500; i++){
      fooA();
      fooB();
   }
   return 0;
}
/*--------- code ends here -------------*/

	A good report for me will be something like:

	Results after executing FOO.EXE:
	   70% time spent executing fooA() code
	   29% time spent executing fooA() code
	    1% time spent executing main() code

	Well, where I should look for something like this ?  ;)


	Claudio A. Heckler

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019