[m-dev.] for review: type_ctor_rep statistics
Tyson Dowd
trd at cs.mu.OZ.AU
Sat Oct 9 18:00:12 AEST 1999
On 08-Oct-1999, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
>
> For review by anyone.
>
> Estimated hours taken: 2
>
> runtime/mercury_ho_call.c:
> If MR_CTOR_REP_STATS is defined, collect statistics about the
> type_ctor_reps that the builtin unify, index and compare preds
> are invoked with.
>
> runtime/mercury_wrapper.h:
> If MR_CTOR_REP_STATS is defined, export three arrays for these
> statistics.
>
> runtime/mercury_wrapper.c:
> If MR_CTOR_REP_STATS is defined, define these three arrays,
> and append their contents at the end of execution to the file
> whose name is given by the MR_CTOR_REP_STATS macro.
>
> runtime/mercury_conf_param.h:
> Document MR_CTOR_REP_STATS.
>
> tools/ctor_rep_stats:
> An awk swcript for analyzing the statistics.
>
> A sample output from the script:
>
> UNIFY ARRAY: 0 ( 0.00%)
> UNIFY TRAIL_PTR: 0 ( 0.00%)
> UNIFY UNIV: 0 ( 0.00%)
> UNIFY REDOFR: 0 ( 0.00%)
> UNIFY C_POINTER: 0 ( 0.00%)
> UNIFY VOID: 0 ( 0.00%)
> UNIFY STRING: 496433 ( 1.19%)
> UNIFY REDOIP: 0 ( 0.00%)
> UNIFY EQUIV: 17780662 (42.67%)
> UNIFY TICKET: 0 ( 0.00%)
> UNIFY SUCCIP: 0 ( 0.00%)
> UNIFY TYPEINFO: 0 ( 0.00%)
> UNIFY NOTAG: 12881671 (30.92%)
> UNIFY MAXFR: 0 ( 0.00%)
> UNIFY FLOAT: 181 ( 0.00%)
> UNIFY INT: 515131 ( 1.24%)
> UNIFY EQUIV_VAR: 0 ( 0.00%)
> UNIFY DU: 8465187 (20.32%)
> UNIFY CURFR: 0 ( 0.00%)
> UNIFY ENUM: 1522958 ( 3.66%)
> UNIFY HP: 0 ( 0.00%)
> UNIFY CHAR: 4535 ( 0.01%)
> UNIFY UNKNOWN: 0 ( 0.00%)
> UNIFY TYPECLASSINFO: 0 ( 0.00%)
> UNIFY PRED: 0 ( 0.00%)
> UNIFY: 41666758 (19.75%)
>
> INDEX ARRAY: 0 ( NaN%)
> INDEX TRAIL_PTR: 0 ( NaN%)
> INDEX UNIV: 0 ( NaN%)
> INDEX REDOFR: 0 ( NaN%)
> INDEX C_POINTER: 0 ( NaN%)
> INDEX VOID: 0 ( NaN%)
> INDEX STRING: 0 ( NaN%)
> INDEX REDOIP: 0 ( NaN%)
> INDEX EQUIV: 0 ( NaN%)
> INDEX TICKET: 0 ( NaN%)
> INDEX SUCCIP: 0 ( NaN%)
> INDEX TYPEINFO: 0 ( NaN%)
> INDEX NOTAG: 0 ( NaN%)
> INDEX MAXFR: 0 ( NaN%)
> INDEX FLOAT: 0 ( NaN%)
> INDEX INT: 0 ( NaN%)
> INDEX EQUIV_VAR: 0 ( NaN%)
> INDEX DU: 0 ( NaN%)
> INDEX CURFR: 0 ( NaN%)
> INDEX ENUM: 0 ( NaN%)
> INDEX HP: 0 ( NaN%)
> INDEX CHAR: 0 ( NaN%)
> INDEX UNKNOWN: 0 ( NaN%)
> INDEX TYPECLASSINFO: 0 ( NaN%)
> INDEX PRED: 0 ( NaN%)
> INDEX: 0 ( 0.00%)
>
> COMPARE ARRAY: 0 ( 0.00%)
> COMPARE TRAIL_PTR: 0 ( 0.00%)
> COMPARE UNIV: 0 ( 0.00%)
> COMPARE REDOFR: 0 ( 0.00%)
> COMPARE C_POINTER: 50852 ( 0.03%)
> COMPARE VOID: 0 ( 0.00%)
> COMPARE STRING: 4735432 ( 2.80%)
> COMPARE REDOIP: 0 ( 0.00%)
> COMPARE EQUIV: 22935320 (13.55%)
> COMPARE TICKET: 0 ( 0.00%)
> COMPARE SUCCIP: 0 ( 0.00%)
> COMPARE TYPEINFO: 0 ( 0.00%)
> COMPARE NOTAG: 73954530 (43.69%)
> COMPARE MAXFR: 0 ( 0.00%)
> COMPARE FLOAT: 1221 ( 0.00%)
> COMPARE INT: 22055758 (13.03%)
> COMPARE EQUIV_VAR: 0 ( 0.00%)
> COMPARE DU: 35636742 (21.05%)
> COMPARE CURFR: 0 ( 0.00%)
> COMPARE ENUM: 9893396 ( 5.84%)
> COMPARE HP: 0 ( 0.00%)
> COMPARE CHAR: 0 ( 0.00%)
> COMPARE UNKNOWN: 0 ( 0.00%)
> COMPARE TYPECLASSINFO: 0 ( 0.00%)
> COMPARE PRED: 0 ( 0.00%)
> COMPARE: 169263251 (80.25%)
I'm not sure about using MR_TYPECTOR_REP_UNKNOWN as the maximum value
of the enumeration. The dependency is a little difficult to find later
on.
A comment in mercury_type_info.h explaining that UNKNOWN must remain the
top value (or some other similar solution) would be nice.
Otherwise this change is fine.
Tyson.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list