diff options
| author | Nick Barnes | 2012-10-26 13:22:04 +0100 |
|---|---|---|
| committer | Nick Barnes | 2012-10-26 13:22:04 +0100 |
| commit | d48d96f15ec9f10f468e5c4a1a93f78f7ce7ad5b (patch) | |
| tree | 2f53d21b4408e2a89746c540187978bc087ad450 /mps/code | |
| parent | 20ad19da97d50ab8f8d95ecd1029dcf5f9583792 (diff) | |
| download | emacs-d48d96f15ec9f10f468e5c4a1a93f78f7ce7ad5b.tar.gz emacs-d48d96f15ec9f10f468e5c4a1a93f78f7ce7ad5b.zip | |
Add an eventinit event, giving various parameters including the event system version.
Copied from Perforce
Change: 180100
ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code')
| -rw-r--r-- | mps/code/event.c | 2 | ||||
| -rw-r--r-- | mps/code/eventdef.h | 15 |
2 files changed, 14 insertions, 3 deletions
diff --git a/mps/code/event.c b/mps/code/event.c index a3331d18c18..f88600df7e7 100644 --- a/mps/code/event.c +++ b/mps/code/event.c | |||
| @@ -178,6 +178,8 @@ void EventInit(void) | |||
| 178 | EventKindControl = (Word)mps_lib_telemetry_control(); | 178 | EventKindControl = (Word)mps_lib_telemetry_control(); |
| 179 | EventInternSerial = (Serial)1; /* 0 is reserved */ | 179 | EventInternSerial = (Serial)1; /* 0 is reserved */ |
| 180 | (void)EventInternString(MPSVersion()); /* emit version */ | 180 | (void)EventInternString(MPSVersion()); /* emit version */ |
| 181 | EVENT6(EventInit, EVENT_VERSION_MAJOR, EVENT_VERSION_MEDIAN, | ||
| 182 | EVENT_VERSION_MINOR, EventCodeMAX, EventNameMAX, MPS_WORD_WIDTH); | ||
| 181 | } else { | 183 | } else { |
| 182 | ++eventUserCount; | 184 | ++eventUserCount; |
| 183 | } | 185 | } |
diff --git a/mps/code/eventdef.h b/mps/code/eventdef.h index df80bb6d1c2..456d230d8f8 100644 --- a/mps/code/eventdef.h +++ b/mps/code/eventdef.h | |||
| @@ -38,7 +38,7 @@ | |||
| 38 | 38 | ||
| 39 | #define EVENT_VERSION_MAJOR ((unsigned)1) | 39 | #define EVENT_VERSION_MAJOR ((unsigned)1) |
| 40 | #define EVENT_VERSION_MEDIAN ((unsigned)0) | 40 | #define EVENT_VERSION_MEDIAN ((unsigned)0) |
| 41 | #define EVENT_VERSION_MINOR ((unsigned)0) | 41 | #define EVENT_VERSION_MINOR ((unsigned)1) |
| 42 | 42 | ||
| 43 | 43 | ||
| 44 | /* EVENT_LIST -- list of event types and general properties | 44 | /* EVENT_LIST -- list of event types and general properties |
| @@ -68,7 +68,7 @@ | |||
| 68 | */ | 68 | */ |
| 69 | 69 | ||
| 70 | #define EventNameMAX ((size_t)19) | 70 | #define EventNameMAX ((size_t)19) |
| 71 | #define EventCodeMAX ((EventCode)0x0073) | 71 | #define EventCodeMAX ((EventCode)0x0074) |
| 72 | 72 | ||
| 73 | #define EVENT_LIST(EVENT, X) \ | 73 | #define EVENT_LIST(EVENT, X) \ |
| 74 | /* 0123456789012345678 <- don't exceed without changing EventNameMAX */ \ | 74 | /* 0123456789012345678 <- don't exceed without changing EventNameMAX */ \ |
| @@ -179,7 +179,8 @@ | |||
| 179 | EVENT(X, TraceFindGrey , 0x0070, TRUE, Trace) \ | 179 | EVENT(X, TraceFindGrey , 0x0070, TRUE, Trace) \ |
| 180 | EVENT(X, TraceBandAdvance , 0x0071, TRUE, Trace) \ | 180 | EVENT(X, TraceBandAdvance , 0x0071, TRUE, Trace) \ |
| 181 | EVENT(X, AWLDeclineTotal , 0x0072, TRUE, Trace) \ | 181 | EVENT(X, AWLDeclineTotal , 0x0072, TRUE, Trace) \ |
| 182 | EVENT(X, AWLDeclineSeg , 0x0073, TRUE, Trace) | 182 | EVENT(X, AWLDeclineSeg , 0x0073, TRUE, Trace) \ |
| 183 | EVENT(X, EventInit , 0x0074, TRUE, Arena) | ||
| 183 | 184 | ||
| 184 | 185 | ||
| 185 | /* Remember to update EventNameMAX and EventCodeMAX in eventcom.h! | 186 | /* Remember to update EventNameMAX and EventCodeMAX in eventcom.h! |
| @@ -620,6 +621,14 @@ | |||
| 620 | PARAM(X, 0, P, seg) /* segment declined single access */ \ | 621 | PARAM(X, 0, P, seg) /* segment declined single access */ \ |
| 621 | PARAM(X, 1, W, singleAccesses) /* single accesses this cycle */ | 622 | PARAM(X, 1, W, singleAccesses) /* single accesses this cycle */ |
| 622 | 623 | ||
| 624 | #define EVENT_EventInit_PARAMS(PARAM, X) \ | ||
| 625 | PARAM(X, 0, U, major) /* EVENT_VERSION_MAJOR */ \ | ||
| 626 | PARAM(X, 1, U, median) /* EVENT_VERSION_MEDIAN */ \ | ||
| 627 | PARAM(X, 2, U, minor) /* EVENT_VERSION_MINOR */ \ | ||
| 628 | PARAM(X, 3, U, maxCode) /* EventCodeMAX */ \ | ||
| 629 | PARAM(X, 4, U, maxNameLen) /* EventNameMAX */ \ | ||
| 630 | PARAM(X, 5, U, wordWidth) /* MPS_WORD_WIDTH */ | ||
| 631 | |||
| 623 | 632 | ||
| 624 | #endif /* eventdef_h */ | 633 | #endif /* eventdef_h */ |
| 625 | 634 | ||