[m-dev.] for review: type_ctor_rep statistics

Zoltan Somogyi zs at cs.mu.OZ.AU
Fri Oct 8 17:03:35 AEST 1999


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%)


Zoltan.

cvs diff: Diffing .
cvs diff: Diffing bindist
cvs diff: Diffing boehm_gc
cvs diff: Diffing boehm_gc/Mac_files
cvs diff: Diffing boehm_gc/cord
cvs diff: Diffing boehm_gc/cord/private
cvs diff: Diffing boehm_gc/include
cvs diff: Diffing boehm_gc/include/private
cvs diff: Diffing browser
cvs diff: Diffing bytecode
cvs diff: Diffing compiler
cvs diff: Diffing compiler/notes
cvs diff: Diffing debian
cvs diff: Diffing doc
cvs diff: Diffing extras
cvs diff: Diffing extras/aditi
cvs diff: Diffing extras/cgi
cvs diff: Diffing extras/clpr
cvs diff: Diffing extras/clpr/clpr
cvs diff: Diffing extras/clpr/samples
cvs diff: Diffing extras/complex_numbers
cvs diff: Diffing extras/complex_numbers/samples
cvs diff: Diffing extras/complex_numbers/tests
cvs diff: Diffing extras/dynamic_linking
cvs diff: Diffing extras/graphics
cvs diff: Diffing extras/graphics/mercury_opengl
cvs diff: Diffing extras/graphics/mercury_tcltk
cvs diff: Diffing extras/graphics/samples
cvs diff: Diffing extras/graphics/samples/calc
cvs diff: Diffing extras/graphics/samples/maze
cvs diff: Diffing extras/graphics/samples/pent
cvs diff: Diffing extras/lazy_evaluation
cvs diff: Diffing extras/odbc
cvs diff: Diffing extras/references
cvs diff: Diffing extras/references/samples
cvs diff: Diffing extras/references/tests
cvs diff: Diffing extras/trailed_update
cvs diff: Diffing extras/trailed_update/samples
cvs diff: Diffing extras/trailed_update/tests
cvs diff: Diffing library
cvs diff: Diffing profiler
cvs diff: Diffing runtime
Index: runtime/mercury_conf_param.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_conf_param.h,v
retrieving revision 1.25
diff -u -b -r1.25 mercury_conf_param.h
--- mercury_conf_param.h	1999/06/01 09:46:02	1.25
+++ mercury_conf_param.h	1999/10/08 06:32:46
@@ -184,6 +184,13 @@
 ** MR_TRACE_HISTOGRAM
 ** Enable this if you want to count the number of execution tracing events
 ** at various call depths.
+**
+** MR_CTOR_REP_STATS
+** If you want to keep statistics on the number of times the generic unify,
+** index and compare functions are invoked with type constructors of the
+** various kinds of representations, then set this macro to a string giving
+** the name of the file to which the statistics should be appended when the
+** program exits.
 */
 
 /*---------------------------------------------------------------------------*/
Index: runtime/mercury_ho_call.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_ho_call.c,v
retrieving revision 1.22
diff -u -b -r1.22 mercury_ho_call.c
--- mercury_ho_call.c	1999/09/30 08:09:02	1.22
+++ mercury_ho_call.c	1999/10/08 08:37:37
@@ -264,6 +264,11 @@
 
 unify_start:
 	type_ctor_info = MR_TYPEINFO_GET_TYPE_CTOR_INFO((Word *) type_info);
+
+#ifdef	MR_CTOR_REP_STATS
+	MR_ctor_rep_unify[type_ctor_info->type_ctor_rep]++;
+#endif
+
 	switch (type_ctor_info->type_ctor_rep) {
 
 			/*
@@ -489,6 +494,11 @@
 	x = r2;
 
 	type_ctor_info = MR_TYPEINFO_GET_TYPE_CTOR_INFO((Word *) type_info);
+
+#ifdef	MR_CTOR_REP_STATS
+	MR_ctor_rep_index[type_ctor_info->type_ctor_rep]++;
+#endif
+
 	switch (type_ctor_info->type_ctor_rep) {
 
 			/*
@@ -679,6 +689,11 @@
 
 compare_start:
 	type_ctor_info = MR_TYPEINFO_GET_TYPE_CTOR_INFO((Word *) type_info);
+
+#ifdef	MR_CTOR_REP_STATS
+	MR_ctor_rep_compare[type_ctor_info->type_ctor_rep]++;
+#endif
+
 	switch (type_ctor_info->type_ctor_rep) {
 
 			/*
Index: runtime/mercury_wrapper.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_wrapper.c,v
retrieving revision 1.45
diff -u -b -r1.45 mercury_wrapper.c
--- mercury_wrapper.c	1999/10/07 11:26:12	1.45
+++ mercury_wrapper.c	1999/10/08 08:31:40
@@ -110,6 +110,14 @@
 
 bool		MR_profiling = TRUE;
 
+#ifdef	MR_CTOR_REP_STATS
+#include	"mercury_type_info.h"
+
+long		MR_ctor_rep_unify[MR_TYPECTOR_REP_UNKNOWN + 1];
+long		MR_ctor_rep_index[MR_TYPECTOR_REP_UNKNOWN + 1];
+long		MR_ctor_rep_compare[MR_TYPECTOR_REP_UNKNOWN + 1];
+#endif
+
 /*
 ** EXTERNAL DEPENDENCIES
 **
@@ -906,6 +914,170 @@
 		printf("%8.3fu ",
 			((double) (time_at_finish - time_at_start)) / 1000);
 	}
+
+#ifdef	MR_CTOR_REP_STATS
+	{
+		FILE	*fp;
+
+		fp = fopen(MR_CTOR_REP_STATS, "a");
+		if (fp != NULL) {
+			fprintf(fp, "UNIFY ENUM %ld\n",
+				MR_ctor_rep_unify[MR_TYPECTOR_REP_ENUM]);
+			fprintf(fp, "UNIFY DU %ld\n",
+				MR_ctor_rep_unify[MR_TYPECTOR_REP_DU]);
+			fprintf(fp, "UNIFY NOTAG %ld\n",
+				MR_ctor_rep_unify[MR_TYPECTOR_REP_NOTAG]);
+			fprintf(fp, "UNIFY EQUIV %ld\n",
+				MR_ctor_rep_unify[MR_TYPECTOR_REP_EQUIV]);
+			fprintf(fp, "UNIFY EQUIV_VAR %ld\n",
+				MR_ctor_rep_unify[MR_TYPECTOR_REP_EQUIV_VAR]);
+			fprintf(fp, "UNIFY INT %ld\n",
+				MR_ctor_rep_unify[MR_TYPECTOR_REP_INT]);
+			fprintf(fp, "UNIFY CHAR %ld\n",
+				MR_ctor_rep_unify[MR_TYPECTOR_REP_CHAR]);
+			fprintf(fp, "UNIFY FLOAT %ld\n",
+				MR_ctor_rep_unify[MR_TYPECTOR_REP_FLOAT]);
+			fprintf(fp, "UNIFY STRING %ld\n",
+				MR_ctor_rep_unify[MR_TYPECTOR_REP_STRING]);
+			fprintf(fp, "UNIFY PRED %ld\n",
+				MR_ctor_rep_unify[MR_TYPECTOR_REP_PRED]);
+			fprintf(fp, "UNIFY UNIV %ld\n",
+				MR_ctor_rep_unify[MR_TYPECTOR_REP_UNIV]);
+			fprintf(fp, "UNIFY VOID %ld\n",
+				MR_ctor_rep_unify[MR_TYPECTOR_REP_VOID]);
+			fprintf(fp, "UNIFY C_POINTER %ld\n",
+				MR_ctor_rep_unify[MR_TYPECTOR_REP_C_POINTER]);
+			fprintf(fp, "UNIFY TYPEINFO %ld\n",
+				MR_ctor_rep_unify[MR_TYPECTOR_REP_TYPEINFO]);
+			fprintf(fp, "UNIFY TYPECLASSINFO %ld\n",
+				MR_ctor_rep_unify[MR_TYPECTOR_REP_TYPECLASSINFO]);
+			fprintf(fp, "UNIFY ARRAY %ld\n",
+				MR_ctor_rep_unify[MR_TYPECTOR_REP_ARRAY]);
+			fprintf(fp, "UNIFY SUCCIP %ld\n",
+				MR_ctor_rep_unify[MR_TYPECTOR_REP_SUCCIP]);
+			fprintf(fp, "UNIFY HP %ld\n",
+				MR_ctor_rep_unify[MR_TYPECTOR_REP_HP]);
+			fprintf(fp, "UNIFY CURFR %ld\n",
+				MR_ctor_rep_unify[MR_TYPECTOR_REP_CURFR]);
+			fprintf(fp, "UNIFY MAXFR %ld\n",
+				MR_ctor_rep_unify[MR_TYPECTOR_REP_MAXFR]);
+			fprintf(fp, "UNIFY REDOFR %ld\n",
+				MR_ctor_rep_unify[MR_TYPECTOR_REP_REDOFR]);
+			fprintf(fp, "UNIFY REDOIP %ld\n",
+				MR_ctor_rep_unify[MR_TYPECTOR_REP_REDOIP]);
+			fprintf(fp, "UNIFY TRAIL_PTR %ld\n",
+				MR_ctor_rep_unify[MR_TYPECTOR_REP_TRAIL_PTR]);
+			fprintf(fp, "UNIFY TICKET %ld\n",
+				MR_ctor_rep_unify[MR_TYPECTOR_REP_TICKET]);
+			fprintf(fp, "UNIFY UNKNOWN %ld\n",
+				MR_ctor_rep_unify[MR_TYPECTOR_REP_UNKNOWN]);
+
+			fprintf(fp, "INDEX ENUM %ld\n",
+				MR_ctor_rep_index[MR_TYPECTOR_REP_ENUM]);
+			fprintf(fp, "INDEX DU %ld\n",
+				MR_ctor_rep_index[MR_TYPECTOR_REP_DU]);
+			fprintf(fp, "INDEX NOTAG %ld\n",
+				MR_ctor_rep_index[MR_TYPECTOR_REP_NOTAG]);
+			fprintf(fp, "INDEX EQUIV %ld\n",
+				MR_ctor_rep_index[MR_TYPECTOR_REP_EQUIV]);
+			fprintf(fp, "INDEX EQUIV_VAR %ld\n",
+				MR_ctor_rep_index[MR_TYPECTOR_REP_EQUIV_VAR]);
+			fprintf(fp, "INDEX INT %ld\n",
+				MR_ctor_rep_index[MR_TYPECTOR_REP_INT]);
+			fprintf(fp, "INDEX CHAR %ld\n",
+				MR_ctor_rep_index[MR_TYPECTOR_REP_CHAR]);
+			fprintf(fp, "INDEX FLOAT %ld\n",
+				MR_ctor_rep_index[MR_TYPECTOR_REP_FLOAT]);
+			fprintf(fp, "INDEX STRING %ld\n",
+				MR_ctor_rep_index[MR_TYPECTOR_REP_STRING]);
+			fprintf(fp, "INDEX PRED %ld\n",
+				MR_ctor_rep_index[MR_TYPECTOR_REP_PRED]);
+			fprintf(fp, "INDEX UNIV %ld\n",
+				MR_ctor_rep_index[MR_TYPECTOR_REP_UNIV]);
+			fprintf(fp, "INDEX VOID %ld\n",
+				MR_ctor_rep_index[MR_TYPECTOR_REP_VOID]);
+			fprintf(fp, "INDEX C_POINTER %ld\n",
+				MR_ctor_rep_index[MR_TYPECTOR_REP_C_POINTER]);
+			fprintf(fp, "INDEX TYPEINFO %ld\n",
+				MR_ctor_rep_index[MR_TYPECTOR_REP_TYPEINFO]);
+			fprintf(fp, "INDEX TYPECLASSINFO %ld\n",
+				MR_ctor_rep_index[MR_TYPECTOR_REP_TYPECLASSINFO]);
+			fprintf(fp, "INDEX ARRAY %ld\n",
+				MR_ctor_rep_index[MR_TYPECTOR_REP_ARRAY]);
+			fprintf(fp, "INDEX SUCCIP %ld\n",
+				MR_ctor_rep_index[MR_TYPECTOR_REP_SUCCIP]);
+			fprintf(fp, "INDEX HP %ld\n",
+				MR_ctor_rep_index[MR_TYPECTOR_REP_HP]);
+			fprintf(fp, "INDEX CURFR %ld\n",
+				MR_ctor_rep_index[MR_TYPECTOR_REP_CURFR]);
+			fprintf(fp, "INDEX MAXFR %ld\n",
+				MR_ctor_rep_index[MR_TYPECTOR_REP_MAXFR]);
+			fprintf(fp, "INDEX REDOFR %ld\n",
+				MR_ctor_rep_index[MR_TYPECTOR_REP_REDOFR]);
+			fprintf(fp, "INDEX REDOIP %ld\n",
+				MR_ctor_rep_index[MR_TYPECTOR_REP_REDOIP]);
+			fprintf(fp, "INDEX TRAIL_PTR %ld\n",
+				MR_ctor_rep_index[MR_TYPECTOR_REP_TRAIL_PTR]);
+			fprintf(fp, "INDEX TICKET %ld\n",
+				MR_ctor_rep_index[MR_TYPECTOR_REP_TICKET]);
+			fprintf(fp, "INDEX UNKNOWN %ld\n",
+				MR_ctor_rep_index[MR_TYPECTOR_REP_UNKNOWN]);
+
+			fprintf(fp, "COMPARE ENUM %ld\n",
+				MR_ctor_rep_compare[MR_TYPECTOR_REP_ENUM]);
+			fprintf(fp, "COMPARE DU %ld\n",
+				MR_ctor_rep_compare[MR_TYPECTOR_REP_DU]);
+			fprintf(fp, "COMPARE NOTAG %ld\n",
+				MR_ctor_rep_compare[MR_TYPECTOR_REP_NOTAG]);
+			fprintf(fp, "COMPARE EQUIV %ld\n",
+				MR_ctor_rep_compare[MR_TYPECTOR_REP_EQUIV]);
+			fprintf(fp, "COMPARE EQUIV_VAR %ld\n",
+				MR_ctor_rep_compare[MR_TYPECTOR_REP_EQUIV_VAR]);
+			fprintf(fp, "COMPARE INT %ld\n",
+				MR_ctor_rep_compare[MR_TYPECTOR_REP_INT]);
+			fprintf(fp, "COMPARE CHAR %ld\n",
+				MR_ctor_rep_compare[MR_TYPECTOR_REP_CHAR]);
+			fprintf(fp, "COMPARE FLOAT %ld\n",
+				MR_ctor_rep_compare[MR_TYPECTOR_REP_FLOAT]);
+			fprintf(fp, "COMPARE STRING %ld\n",
+				MR_ctor_rep_compare[MR_TYPECTOR_REP_STRING]);
+			fprintf(fp, "COMPARE PRED %ld\n",
+				MR_ctor_rep_compare[MR_TYPECTOR_REP_PRED]);
+			fprintf(fp, "COMPARE UNIV %ld\n",
+				MR_ctor_rep_compare[MR_TYPECTOR_REP_UNIV]);
+			fprintf(fp, "COMPARE VOID %ld\n",
+				MR_ctor_rep_compare[MR_TYPECTOR_REP_VOID]);
+			fprintf(fp, "COMPARE C_POINTER %ld\n",
+				MR_ctor_rep_compare[MR_TYPECTOR_REP_C_POINTER]);
+			fprintf(fp, "COMPARE TYPEINFO %ld\n",
+				MR_ctor_rep_compare[MR_TYPECTOR_REP_TYPEINFO]);
+			fprintf(fp, "COMPARE TYPECLASSINFO %ld\n",
+				MR_ctor_rep_compare[MR_TYPECTOR_REP_TYPECLASSINFO]);
+			fprintf(fp, "COMPARE ARRAY %ld\n",
+				MR_ctor_rep_compare[MR_TYPECTOR_REP_ARRAY]);
+			fprintf(fp, "COMPARE SUCCIP %ld\n",
+				MR_ctor_rep_compare[MR_TYPECTOR_REP_SUCCIP]);
+			fprintf(fp, "COMPARE HP %ld\n",
+				MR_ctor_rep_compare[MR_TYPECTOR_REP_HP]);
+			fprintf(fp, "COMPARE CURFR %ld\n",
+				MR_ctor_rep_compare[MR_TYPECTOR_REP_CURFR]);
+			fprintf(fp, "COMPARE MAXFR %ld\n",
+				MR_ctor_rep_compare[MR_TYPECTOR_REP_MAXFR]);
+			fprintf(fp, "COMPARE REDOFR %ld\n",
+				MR_ctor_rep_compare[MR_TYPECTOR_REP_REDOFR]);
+			fprintf(fp, "COMPARE REDOIP %ld\n",
+				MR_ctor_rep_compare[MR_TYPECTOR_REP_REDOIP]);
+			fprintf(fp, "COMPARE TRAIL_PTR %ld\n",
+				MR_ctor_rep_compare[MR_TYPECTOR_REP_TRAIL_PTR]);
+			fprintf(fp, "COMPARE TICKET %ld\n",
+				MR_ctor_rep_compare[MR_TYPECTOR_REP_TICKET]);
+			fprintf(fp, "COMPARE UNKNOWN %ld\n",
+				MR_ctor_rep_compare[MR_TYPECTOR_REP_UNKNOWN]);
+
+			(void) fclose(fp);
+		}
+	}
+#endif
 
 	/*
 	** Save the Mercury registers and
Index: runtime/mercury_wrapper.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_wrapper.h,v
retrieving revision 1.23
diff -u -b -r1.23 mercury_wrapper.h
--- mercury_wrapper.h	1999/10/05 07:26:24	1.23
+++ mercury_wrapper.h	1999/10/08 08:31:05
@@ -167,4 +167,10 @@
 
 extern	bool MR_profiling;
 
+#ifdef  MR_CTOR_REP_STATS
+extern	long	MR_ctor_rep_unify[];
+extern	long	MR_ctor_rep_index[];
+extern	long	MR_ctor_rep_compare[];
+#endif
+
 #endif /* not MERCURY_WRAPPER_H */
cvs diff: Diffing runtime/GETOPT
cvs diff: Diffing runtime/machdeps
cvs diff: Diffing samples
cvs diff: Diffing samples/c_interface
cvs diff: Diffing samples/c_interface/c_calls_mercury
cvs diff: Diffing samples/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/c_interface/mercury_calls_c
cvs diff: Diffing samples/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/diff
cvs diff: Diffing samples/muz
cvs diff: Diffing samples/rot13
cvs diff: Diffing scripts
cvs diff: Diffing tests
cvs diff: Diffing tests/benchmarks
cvs diff: Diffing tests/debugger
cvs diff: Diffing tests/debugger/declarative
cvs diff: Diffing tests/dppd
cvs diff: Diffing tests/general
cvs diff: Diffing tests/general/accumulator
cvs diff: Diffing tests/hard_coded
cvs diff: Diffing tests/hard_coded/exceptions
cvs diff: Diffing tests/hard_coded/sub-modules
cvs diff: Diffing tests/hard_coded/typeclasses
cvs diff: Diffing tests/invalid
cvs diff: Diffing tests/misc_tests
cvs diff: Diffing tests/tabling
cvs diff: Diffing tests/term
cvs diff: Diffing tests/valid
cvs diff: Diffing tests/warnings
cvs diff: Diffing tools
Index: tools/ctor_rep_stats
===================================================================
RCS file: ctor_rep_stats
diff -N ctor_rep_stats
--- /dev/null	Thu Mar  4 04:20:11 1999
+++ ctor_rep_stats	Fri Oct  8 18:47:02 1999
@@ -0,0 +1,18 @@
+#!/usr/bin/awk -f
+	{
+		rep[$2] = 1;
+		all += $3;
+		pred[$1] += $3;
+		kind[$1 "-" $2] += $3;
+	}
+END	{
+		for (p in pred)
+		{
+			for (r in rep)
+			{
+				printf "%-8s %-20s %15d (%5.2f%%)\n", p, r ":", kind[p "-" r], (100 * kind[p "-" r]) / pred[p];
+			}
+
+			printf "%-29s %15d (%5.2f%%)\n\n", p ":", pred[p], (100 * pred[p]) / all;
+		}
+	}
cvs diff: Diffing trace
cvs diff: Diffing trial
cvs diff: Diffing util
--------------------------------------------------------------------------
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