Added some compiler statistics utilities. The idea is that all you do
authorStephen Adams <edu/mit/csail/zurich/adams>
Wed, 14 Dec 1994 20:33:47 +0000 (20:33 +0000)
committerStephen Adams <edu/mit/csail/zurich/adams>
Wed, 14 Dec 1994 20:33:47 +0000 (20:33 +0000)
commit637116d5a6e2230f4ac241d1e16e512aac2a3fc8
tree3cc2ca5a7c7f5b151759a226c54a355ec111928d
parente89c3131cdc4377919231cec48bc682987c67121
Added some compiler statistics utilities.  The idea is that all you do
is place a call to SAMPLE/1 or SAMPLE/2 at the appropriate place in
the code, and NOT rely on their arguments for a side effect.

Each statistic has a name (a symbol), a type (a symbol) and perhaps
some optional parameters.  The calls to SAMPLE/n create the statistic
if it unknown, and then incorporate the data for generating a report.

  (COMPILER:RESET-STATISTICS!)
  (COMPILER:DISPLAY-STATISTICS)
  (SAMPLE/1 '(name type [parameters]) datum)
  (SAMPLE/2 '(name type [parameters]) datum1 datum2)

Current unary statistics are

  '(name AVERAGE) <x>) - number, sum and average
  '(name HISTOGRAM VECTOR) - histogram small non-negative integers
  '(name HISTOGRAM HASH-TABLE) - histogram numbers, strings, symbols etc
  '(name HISTOGRAM) - same as HASH-TABLE

Currently there are no binary statistics.
v8/src/compiler/base/utils.scm