mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 04:10:54 -08:00
Mps br/diag: rename #def "diagnostics" as "statistics", as all the
macros it controls are called "STATISTIC_blah", and same replacement in comments. The term "diagnostic" means something else now: see design/diag/. Copied from Perforce Change: 162692 ServerID: perforce.ravenbrook.com
This commit is contained in:
parent
8b86a6e7f9
commit
4df14dcbf8
4 changed files with 23 additions and 18 deletions
|
|
@ -32,13 +32,13 @@
|
|||
#if defined(CONFIG_VAR_WI) || defined(CONFIG_VAR_WE) /* White-hot varieties */
|
||||
/* no asserts */
|
||||
/* ... so CHECKLEVEL_INITIAL is irrelevant */
|
||||
/* no debug diagnostic statistic meters */
|
||||
/* no debug statistic meters */
|
||||
/* no telemetry log events */
|
||||
|
||||
#elif defined(CONFIG_VAR_HI) || defined(CONFIG_VAR_HE) /* Hot varieties */
|
||||
#define CONFIG_ASSERT
|
||||
#define CHECKLEVEL_INITIAL CheckLevelMINIMAL
|
||||
/* no debug diagnostic statistic meters */
|
||||
/* no debug statistic meters */
|
||||
/* no telemetry log events */
|
||||
|
||||
#elif defined(CONFIG_VAR_DI) /* Diagnostic variety */
|
||||
|
|
@ -69,7 +69,7 @@
|
|||
#elif defined(CONFIG_VAR_II) /* Ice, Internal; variety.ii (HotLog) */
|
||||
#define CONFIG_ASSERT
|
||||
#define CHECKLEVEL_INITIAL CheckLevelMINIMAL
|
||||
/* no debug diagnostic statistic meters */
|
||||
/* no debug statistic meters */
|
||||
#define CONFIG_LOG
|
||||
#endif
|
||||
|
||||
|
|
@ -89,12 +89,17 @@
|
|||
|
||||
|
||||
#if defined(CONFIG_DEBUG)
|
||||
/* DEBUG = DIAGNOSTICS = STATISTICs = METERs */
|
||||
/* WARNING: this changes the size and fields of MPS structs */
|
||||
#define DIAGNOSTICS
|
||||
/* CONFIG_DEBUG = STATISTICS = METERs */
|
||||
/* Note: the STATISTICS define used to be called "DIAGNOSTICS" (even */
|
||||
/* though it controls the STATISTIC system), but the term */
|
||||
/* "diagnostic" means something else now: see design/diag/. */
|
||||
/* RHSK 2007-06-28 */
|
||||
/* WARNING: this may change the size and fields of MPS structs */
|
||||
/* (...but see STATISTIC_DECL, which is invariant) */
|
||||
#define STATISTICS
|
||||
#define MPS_DEBUG_STRING "debug"
|
||||
#else
|
||||
#define DIAGNOSTICS_NONE
|
||||
#define STATISTICS_NONE
|
||||
#define MPS_DEBUG_STRING "nondebug"
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -44,12 +44,12 @@ extern void MeterEmit(Meter meter);
|
|||
/* Hack: owner is typically only used for MeterInit */
|
||||
#define METER_ACC(meter, delta) \
|
||||
STATISTIC(MeterAccumulate(&(meter), delta))
|
||||
#if defined(DIAGNOSTICS)
|
||||
#if defined(STATISTICS)
|
||||
#define METER_WRITE(meter, stream) MeterWrite(&(meter), stream)
|
||||
#elif defined(DIAGNOSTICS_NONE)
|
||||
#elif defined(STATISTICS_NONE)
|
||||
#define METER_WRITE(meter, stream) (ResOK)
|
||||
#else
|
||||
#error "Diagnostics not configured."
|
||||
#error "No statistics configured."
|
||||
#endif
|
||||
#define METER_EMIT(meter) STATISTIC(MeterEmit(meter))
|
||||
|
||||
|
|
|
|||
|
|
@ -911,7 +911,7 @@ extern Size VMMapped(VM vm);
|
|||
extern void StackProbe(Size depth);
|
||||
|
||||
|
||||
/* STATISTIC -- gather diagnostics (in some varieties)
|
||||
/* STATISTIC -- gather statistics (in some varieties)
|
||||
*
|
||||
* The argument of STATISTIC is an expression; the expansion followed by
|
||||
* a semicolon is syntactically a statement.
|
||||
|
|
@ -920,7 +920,7 @@ extern void StackProbe(Size depth);
|
|||
* a semicolon is syntactically a statement.
|
||||
*
|
||||
* STATISTIC_WRITE is inserted in WriteF arguments to output the values
|
||||
* of diagnostic fields.
|
||||
* of statistic fields.
|
||||
*
|
||||
* .statistic.whitehot: The implementation of STATISTIC for
|
||||
* non-statistical varieties passes the parameter to DISCARD to ensure
|
||||
|
|
@ -928,13 +928,13 @@ extern void StackProbe(Size depth);
|
|||
* passed as part of a comma-expression so that its type is not
|
||||
* important. This permits an expression of type void. */
|
||||
|
||||
#if defined(DIAGNOSTICS)
|
||||
#if defined(STATISTICS)
|
||||
|
||||
#define STATISTIC(gather) BEGIN (gather); END
|
||||
#define STATISTIC_STAT(gather) BEGIN gather; END
|
||||
#define STATISTIC_WRITE(format, arg) (format), (arg),
|
||||
|
||||
#elif defined(DIAGNOSTICS_NONE)
|
||||
#elif defined(STATISTICS_NONE)
|
||||
|
||||
#define STATISTIC(gather) DISCARD(((gather), 0))
|
||||
#define STATISTIC_STAT(gather) DISCARD_STAT(gather)
|
||||
|
|
@ -942,7 +942,7 @@ extern void StackProbe(Size depth);
|
|||
|
||||
#else
|
||||
|
||||
#error "No diagnostics configured."
|
||||
#error "No statistics configured."
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -454,12 +454,12 @@ typedef double WriteFD;
|
|||
* leave them in, see design.mps.metrics.
|
||||
*/
|
||||
|
||||
#if defined(DIAGNOSTICS)
|
||||
#if defined(STATISTICS)
|
||||
#define STATISTIC_DECL(field) field
|
||||
#elif defined(DIAGNOSTICS_NONE)
|
||||
#elif defined(STATISTICS_NONE)
|
||||
#define STATISTIC_DECL(field) field
|
||||
#else
|
||||
#error "No diagnostics configured."
|
||||
#error "No statistics configured."
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue