www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/08/17/00:41:35

To: Kimberley Burchett <OKRA AT max DOT tiac DOT net>
Cc: DJGPP Mailing List <djgpp AT sun DOT soe DOT clarkson DOT edu>
Subject: Re: profiling more stuff
Date: Tue, 16 Aug 1994 19:55:06 PDT
From: "Marty Leisner" <leisner AT sdsp DOT mc DOT xerox DOT com>

In message <Pine DOT 3 DOT 89 DOT 9408161752 DOT C21788-0100000 AT max DOT tiac DOT net>you write:
>
>
>void foo() {
>  int counter;
>  for (counter=0; counter<100000; counter++) {
>   /* do one thing that I want timed */
>   /* do another thing that I don't want timed */
>  }
>}
>
>  Is there some way I could insert a label or something so I could find
>out how much time the first part of the loop takes w/o figuring in the
>time in the second loop?  Do I have to break it up into separate
>functions?
>							Kim

The way I know off the top of my head is to break up the
software into modules and compile some with -pg and some without...

The alternative is to hack at the assembler output of the C compiler.

marty

- Raw text -


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