aboutsummaryrefslogtreecommitdiffstats
path: root/mps/code
diff options
context:
space:
mode:
authorRichard Brooksby2012-08-31 17:26:48 +0100
committerRichard Brooksby2012-08-31 17:26:48 +0100
commitfef6957117523c9ae47f2c9ea40762e2dc7faf0b (patch)
treeda7d2eb4332b8181b1cde9e3abb8bef7a052111a /mps/code
parentee11a255db2439d063057638ad9962df0a2ebcfd (diff)
downloademacs-fef6957117523c9ae47f2c9ea40762e2dc7faf0b.tar.gz
emacs-fef6957117523c9ae47f2c9ea40762e2dc7faf0b.zip
Cool varieties now log events on the critical path too, whereas hot varieties only log elsewhere.
Copied from Perforce Change: 179140 ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code')
-rw-r--r--mps/code/config.h12
-rw-r--r--mps/code/event.h2
2 files changed, 11 insertions, 3 deletions
diff --git a/mps/code/config.h b/mps/code/config.h
index 0685c84fd4b..a6dd9198eb4 100644
--- a/mps/code/config.h
+++ b/mps/code/config.h
@@ -68,12 +68,14 @@
68/* ... let PRODUCT determine CHECKLEVEL_INITIAL */ 68/* ... let PRODUCT determine CHECKLEVEL_INITIAL */
69#define CONFIG_STATS 69#define CONFIG_STATS
70#define CONFIG_LOG 70#define CONFIG_LOG
71#define CONFIG_LOG_ALL
71 72
72#elif defined(CONFIG_VAR_II) /* Ice, Internal; variety.ii (HotLog) */ 73#elif defined(CONFIG_VAR_II) /* Ice, Internal; variety.ii (HotLog) */
73#define CONFIG_ASSERT 74#define CONFIG_ASSERT
74#define CHECKLEVEL_INITIAL CheckLevelMINIMAL 75#define CHECKLEVEL_INITIAL CheckLevelMINIMAL
75/* no statistic meters */ 76/* no statistic meters */
76#define CONFIG_LOG 77#define CONFIG_LOG
78
77#endif 79#endif
78 80
79 81
@@ -110,11 +112,17 @@
110#if defined(CONFIG_LOG) 112#if defined(CONFIG_LOG)
111/* TELEMETRY = LOG = EVENTs */ 113/* TELEMETRY = LOG = EVENTs */
112#define EVENT 114#define EVENT
115#if defined(CONFIG_LOG_ALL)
116#define EVENT_ALL 1 /* log events on critical path */
117#define MPS_LOG_STRING "logtastic"
118#else /* CONFIG_LOG_ALL, not */
119#define EVENT_ALL 0 /* don't log events on critical path */
113#define MPS_LOG_STRING "logging" 120#define MPS_LOG_STRING "logging"
114#else 121#endif /* CONFIG_LOG_ALL */
122#else /* CONFIG_LOG, not */
115#define EVENT_NONE 123#define EVENT_NONE
116#define MPS_LOG_STRING "nonlogging" 124#define MPS_LOG_STRING "nonlogging"
117#endif 125#endif /* CONFIG_LOG */
118 126
119 127
120#define MPS_VARIETY_STRING \ 128#define MPS_VARIETY_STRING \
diff --git a/mps/code/event.h b/mps/code/event.h
index 4694dc820c0..7734fa8cb9e 100644
--- a/mps/code/event.h
+++ b/mps/code/event.h
@@ -52,7 +52,7 @@ extern Word EventKindControl;
52 52
53#define EVENT_BEGIN(name, structSize) \ 53#define EVENT_BEGIN(name, structSize) \
54 BEGIN \ 54 BEGIN \
55 if(Event##name##Always) { /* FIXME: depend on variety */ \ 55 if(EVENT_ALL || Event##name##Always) { /* see config.h */ \
56 Event##name##Struct *_event; \ 56 Event##name##Struct *_event; \
57 size_t _size = size_tAlignUp(structSize, MPS_PF_ALIGN); \ 57 size_t _size = size_tAlignUp(structSize, MPS_PF_ALIGN); \
58 if (_size > (size_t)(EventLast[Event##name##Kind] \ 58 if (_size > (size_t)(EventLast[Event##name##Kind] \