Re: Static analysis of code for "flop counting"?

"Alan T. Bowler [SDG]" <harvard!seismo!watmath!orchid!atbowler>
Sun, 26 Apr 87 00:17:41 EDT

          From comp.compilers

Related articles
Static analysis of code for "flop counting"? fouts@orville (1987-04-17)
Re: Static analysis of code for "flop counting"? allegra!utzoo!henry (1987-04-22)
Re: Static analysis of code for "flop counting"? think!ames!ucbcad!ucbvax!decwrl!mips!sjc (1987-04-23)
Re: Static analysis of code for "flop counting"? harvard!seismo!watmath!orchid!atbowler (Alan T. Bowler [SDG]) (1987-04-26)
Re: Static analysis of code for "flop counting"? eugene@ames-pioneer.arpa (Eugene Miya N.) (1987-05-06)
Re: Static analysis of code for "flop counting"? eugene@ames-pioneer.arpa (Eugene Miya N.) (1987-05-06)
Re: Static analysis of code for "flop counting"? allegra!utzoo!henry (1987-05-13)
| List of all articles for this month |

Date: Sun, 26 Apr 87 00:17:41 EDT
From: "Alan T. Bowler [SDG]" <harvard!seismo!watmath!orchid!atbowler>
In-Reply-To: <1299@ames.UUCP>
Organization: U. of Waterloo, Ontario
Cc:

In article <1299@ames.UUCP> you write:
[How can I count the number of floating point operations in a program in
the absence of a helpful compiler?]


You can also use a software monitor that does this. Frequently,
the debug package for a machine will already do this. If not
any machine level debugger with a step 1 instruction capability
is a good starting point.
      On the Honeywell DPS-8, 88, 99 machines, this is in the debugger.
Many mini and micro computers (68000 and PDP-11) have a hardware
"trace mode" that makes writing such a program staight forward.
The only problem with this, is that the program will be slow when
running. However, usually when one is collecting statistics about
such things the factor of 20-100 speed loss is not a problem.


[A similar possibility is to write your own trace package that interprets
the machine code. Interpreting the machine's own code is fairly easy
since for most instructions you can just stick them in memory and execute
them; you only need to fake things like branches. Then you can collect
any statistics you want. It's an order of magnitude slower than running
the program native, but you get 100% accurate numbers. -John]
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.