aboutsummaryrefslogtreecommitdiffstats
path: root/mps/code
diff options
context:
space:
mode:
Diffstat (limited to 'mps/code')
-rw-r--r--mps/code/config.h19
-rw-r--r--mps/code/meter.h6
-rw-r--r--mps/code/mpm.h10
-rw-r--r--mps/code/mpmtypes.h6
4 files changed, 23 insertions, 18 deletions
diff --git a/mps/code/config.h b/mps/code/config.h
index 07531878614..2f753eb1e11 100644
--- a/mps/code/config.h
+++ b/mps/code/config.h
@@ -32,13 +32,13 @@
32#if defined(CONFIG_VAR_WI) || defined(CONFIG_VAR_WE) /* White-hot varieties */ 32#if defined(CONFIG_VAR_WI) || defined(CONFIG_VAR_WE) /* White-hot varieties */
33/* no asserts */ 33/* no asserts */
34/* ... so CHECKLEVEL_INITIAL is irrelevant */ 34/* ... so CHECKLEVEL_INITIAL is irrelevant */
35/* no debug diagnostic statistic meters */ 35/* no debug statistic meters */
36/* no telemetry log events */ 36/* no telemetry log events */
37 37
38#elif defined(CONFIG_VAR_HI) || defined(CONFIG_VAR_HE) /* Hot varieties */ 38#elif defined(CONFIG_VAR_HI) || defined(CONFIG_VAR_HE) /* Hot varieties */
39#define CONFIG_ASSERT 39#define CONFIG_ASSERT
40#define CHECKLEVEL_INITIAL CheckLevelMINIMAL 40#define CHECKLEVEL_INITIAL CheckLevelMINIMAL
41/* no debug diagnostic statistic meters */ 41/* no debug statistic meters */
42/* no telemetry log events */ 42/* no telemetry log events */
43 43
44#elif defined(CONFIG_VAR_DI) /* Diagnostic variety */ 44#elif defined(CONFIG_VAR_DI) /* Diagnostic variety */
@@ -69,7 +69,7 @@
69#elif defined(CONFIG_VAR_II) /* Ice, Internal; variety.ii (HotLog) */ 69#elif defined(CONFIG_VAR_II) /* Ice, Internal; variety.ii (HotLog) */
70#define CONFIG_ASSERT 70#define CONFIG_ASSERT
71#define CHECKLEVEL_INITIAL CheckLevelMINIMAL 71#define CHECKLEVEL_INITIAL CheckLevelMINIMAL
72/* no debug diagnostic statistic meters */ 72/* no debug statistic meters */
73#define CONFIG_LOG 73#define CONFIG_LOG
74#endif 74#endif
75 75
@@ -89,12 +89,17 @@
89 89
90 90
91#if defined(CONFIG_DEBUG) 91#if defined(CONFIG_DEBUG)
92/* DEBUG = DIAGNOSTICS = STATISTICs = METERs */ 92/* CONFIG_DEBUG = STATISTICS = METERs */
93/* WARNING: this changes the size and fields of MPS structs */ 93/* Note: the STATISTICS define used to be called "DIAGNOSTICS" (even */
94#define DIAGNOSTICS 94/* though it controls the STATISTIC system), but the term */
95/* "diagnostic" means something else now: see design/diag/. */
96/* RHSK 2007-06-28 */
97/* WARNING: this may change the size and fields of MPS structs */
98/* (...but see STATISTIC_DECL, which is invariant) */
99#define STATISTICS
95#define MPS_DEBUG_STRING "debug" 100#define MPS_DEBUG_STRING "debug"
96#else 101#else
97#define DIAGNOSTICS_NONE 102#define STATISTICS_NONE
98#define MPS_DEBUG_STRING "nondebug" 103#define MPS_DEBUG_STRING "nondebug"
99#endif 104#endif
100 105
diff --git a/mps/code/meter.h b/mps/code/meter.h
index 3e8902a6497..6912ca7afc0 100644
--- a/mps/code/meter.h
+++ b/mps/code/meter.h
@@ -44,12 +44,12 @@ extern void MeterEmit(Meter meter);
44/* Hack: owner is typically only used for MeterInit */ 44/* Hack: owner is typically only used for MeterInit */
45#define METER_ACC(meter, delta) \ 45#define METER_ACC(meter, delta) \
46 STATISTIC(MeterAccumulate(&(meter), delta)) 46 STATISTIC(MeterAccumulate(&(meter), delta))
47#if defined(DIAGNOSTICS) 47#if defined(STATISTICS)
48#define METER_WRITE(meter, stream) MeterWrite(&(meter), stream) 48#define METER_WRITE(meter, stream) MeterWrite(&(meter), stream)
49#elif defined(DIAGNOSTICS_NONE) 49#elif defined(STATISTICS_NONE)
50#define METER_WRITE(meter, stream) (ResOK) 50#define METER_WRITE(meter, stream) (ResOK)
51#else 51#else
52#error "Diagnostics not configured." 52#error "No statistics configured."
53#endif 53#endif
54#define METER_EMIT(meter) STATISTIC(MeterEmit(meter)) 54#define METER_EMIT(meter) STATISTIC(MeterEmit(meter))
55 55
diff --git a/mps/code/mpm.h b/mps/code/mpm.h
index 404d0bac54a..44b045b0c1d 100644
--- a/mps/code/mpm.h
+++ b/mps/code/mpm.h
@@ -911,7 +911,7 @@ extern Size VMMapped(VM vm);
911extern void StackProbe(Size depth); 911extern void StackProbe(Size depth);
912 912
913 913
914/* STATISTIC -- gather diagnostics (in some varieties) 914/* STATISTIC -- gather statistics (in some varieties)
915 * 915 *
916 * The argument of STATISTIC is an expression; the expansion followed by 916 * The argument of STATISTIC is an expression; the expansion followed by
917 * a semicolon is syntactically a statement. 917 * a semicolon is syntactically a statement.
@@ -920,7 +920,7 @@ extern void StackProbe(Size depth);
920 * a semicolon is syntactically a statement. 920 * a semicolon is syntactically a statement.
921 * 921 *
922 * STATISTIC_WRITE is inserted in WriteF arguments to output the values 922 * STATISTIC_WRITE is inserted in WriteF arguments to output the values
923 * of diagnostic fields. 923 * of statistic fields.
924 * 924 *
925 * .statistic.whitehot: The implementation of STATISTIC for 925 * .statistic.whitehot: The implementation of STATISTIC for
926 * non-statistical varieties passes the parameter to DISCARD to ensure 926 * non-statistical varieties passes the parameter to DISCARD to ensure
@@ -928,13 +928,13 @@ extern void StackProbe(Size depth);
928 * passed as part of a comma-expression so that its type is not 928 * passed as part of a comma-expression so that its type is not
929 * important. This permits an expression of type void. */ 929 * important. This permits an expression of type void. */
930 930
931#if defined(DIAGNOSTICS) 931#if defined(STATISTICS)
932 932
933#define STATISTIC(gather) BEGIN (gather); END 933#define STATISTIC(gather) BEGIN (gather); END
934#define STATISTIC_STAT(gather) BEGIN gather; END 934#define STATISTIC_STAT(gather) BEGIN gather; END
935#define STATISTIC_WRITE(format, arg) (format), (arg), 935#define STATISTIC_WRITE(format, arg) (format), (arg),
936 936
937#elif defined(DIAGNOSTICS_NONE) 937#elif defined(STATISTICS_NONE)
938 938
939#define STATISTIC(gather) DISCARD(((gather), 0)) 939#define STATISTIC(gather) DISCARD(((gather), 0))
940#define STATISTIC_STAT(gather) DISCARD_STAT(gather) 940#define STATISTIC_STAT(gather) DISCARD_STAT(gather)
@@ -942,7 +942,7 @@ extern void StackProbe(Size depth);
942 942
943#else 943#else
944 944
945#error "No diagnostics configured." 945#error "No statistics configured."
946 946
947#endif 947#endif
948 948
diff --git a/mps/code/mpmtypes.h b/mps/code/mpmtypes.h
index f7da1f58d7c..868bfa283ae 100644
--- a/mps/code/mpmtypes.h
+++ b/mps/code/mpmtypes.h
@@ -454,12 +454,12 @@ typedef double WriteFD;
454 * leave them in, see design.mps.metrics. 454 * leave them in, see design.mps.metrics.
455 */ 455 */
456 456
457#if defined(DIAGNOSTICS) 457#if defined(STATISTICS)
458#define STATISTIC_DECL(field) field 458#define STATISTIC_DECL(field) field
459#elif defined(DIAGNOSTICS_NONE) 459#elif defined(STATISTICS_NONE)
460#define STATISTIC_DECL(field) field 460#define STATISTIC_DECL(field) field
461#else 461#else
462#error "No diagnostics configured." 462#error "No statistics configured."
463#endif 463#endif
464 464
465 465