diff options
| author | Gareth Rees | 2013-03-12 14:33:27 +0000 |
|---|---|---|
| committer | Gareth Rees | 2013-03-12 14:33:27 +0000 |
| commit | db733f3932bddf786a33d5c3d7f4e27a02588d94 (patch) | |
| tree | ae300d45134175d87d0891027a009186ffbcfeb6 /mps/code | |
| parent | f3f1a4a202f5e21bd8e498bfa6ba51f325659130 (diff) | |
| download | emacs-db733f3932bddf786a33d5c3d7f4e27a02588d94.tar.gz emacs-db733f3932bddf786a33d5c3d7f4e27a02588d94.zip | |
Remove "mps_alert_collection_set" from public interface and remove its implementation and test case. client programs should use the messages interface to find out what the mps is doing.
Copied from Perforce
Change: 181119
ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code')
| -rw-r--r-- | mps/code/amcss.c | 21 | ||||
| -rw-r--r-- | mps/code/arena.c | 4 | ||||
| -rw-r--r-- | mps/code/mpmst.h | 3 | ||||
| -rw-r--r-- | mps/code/mps.h | 18 | ||||
| -rw-r--r-- | mps/code/mpsi.c | 12 | ||||
| -rw-r--r-- | mps/code/traceanc.c | 8 |
6 files changed, 0 insertions, 66 deletions
diff --git a/mps/code/amcss.c b/mps/code/amcss.c index f4d956e4c61..d51756dc24e 100644 --- a/mps/code/amcss.c +++ b/mps/code/amcss.c | |||
| @@ -46,26 +46,6 @@ static mps_addr_t exactRoots[exactRootsCOUNT]; | |||
| 46 | static mps_addr_t ambigRoots[ambigRootsCOUNT]; | 46 | static mps_addr_t ambigRoots[ambigRootsCOUNT]; |
| 47 | 47 | ||
| 48 | 48 | ||
| 49 | /* alert -- synchronous alert of collection start/stop */ | ||
| 50 | |||
| 51 | static void alertfn(int alertcode, int whycode) | ||
| 52 | { | ||
| 53 | switch(alertcode) { | ||
| 54 | case MPS_ALERT_COLLECTION_BEGIN: { | ||
| 55 | printf("\n^^^^^^ BEGIN (why: %d) ^^^^^^\n", whycode); | ||
| 56 | break; | ||
| 57 | } | ||
| 58 | case MPS_ALERT_COLLECTION_END: { | ||
| 59 | printf("vvvvvv END (why: %d) vvvvvv\n", whycode); | ||
| 60 | break; | ||
| 61 | } | ||
| 62 | default: { | ||
| 63 | cdie(0, "unknown alertcode"); | ||
| 64 | break; | ||
| 65 | } | ||
| 66 | } | ||
| 67 | } | ||
| 68 | |||
| 69 | /* report -- report statistics from any messages */ | 49 | /* report -- report statistics from any messages */ |
| 70 | 50 | ||
| 71 | static void report(mps_arena_t arena) | 51 | static void report(mps_arena_t arena) |
| @@ -326,7 +306,6 @@ int main(int argc, char *argv[]) | |||
| 326 | "arena_create"); | 306 | "arena_create"); |
| 327 | mps_message_type_enable(arena, mps_message_type_gc()); | 307 | mps_message_type_enable(arena, mps_message_type_gc()); |
| 328 | mps_message_type_enable(arena, mps_message_type_gc_start()); | 308 | mps_message_type_enable(arena, mps_message_type_gc_start()); |
| 329 | mps_alert_collection_set(arena, &alertfn); | ||
| 330 | die(mps_arena_commit_limit_set(arena, testArenaSIZE), "set limit"); | 309 | die(mps_arena_commit_limit_set(arena, testArenaSIZE), "set limit"); |
| 331 | die(mps_thread_reg(&thread, arena), "thread_reg"); | 310 | die(mps_thread_reg(&thread, arena), "thread_reg"); |
| 332 | test(arena); | 311 | test(arena); |
diff --git a/mps/code/arena.c b/mps/code/arena.c index a2ef4da980f..1273502968d 100644 --- a/mps/code/arena.c +++ b/mps/code/arena.c | |||
| @@ -143,8 +143,6 @@ Bool ArenaCheck(Arena arena) | |||
| 143 | 143 | ||
| 144 | CHECKL(LocusCheck(arena)); | 144 | CHECKL(LocusCheck(arena)); |
| 145 | 145 | ||
| 146 | /* nothing to check for alertCollection */ | ||
| 147 | |||
| 148 | return TRUE; | 146 | return TRUE; |
| 149 | } | 147 | } |
| 150 | 148 | ||
| @@ -186,8 +184,6 @@ Res ArenaInit(Arena arena, ArenaClass class) | |||
| 186 | 184 | ||
| 187 | LocusInit(arena); | 185 | LocusInit(arena); |
| 188 | 186 | ||
| 189 | arena->alertCollection = 0; | ||
| 190 | |||
| 191 | res = GlobalsInit(ArenaGlobals(arena)); | 187 | res = GlobalsInit(ArenaGlobals(arena)); |
| 192 | if (res != ResOK) | 188 | if (res != ResOK) |
| 193 | goto failGlobalsInit; | 189 | goto failGlobalsInit; |
diff --git a/mps/code/mpmst.h b/mps/code/mpmst.h index 332d32084e1..d67d6a54ffd 100644 --- a/mps/code/mpmst.h +++ b/mps/code/mpmst.h | |||
| @@ -648,9 +648,6 @@ typedef struct mps_arena_s { | |||
| 648 | Bool isFinalPool; /* indicator for finalPool */ | 648 | Bool isFinalPool; /* indicator for finalPool */ |
| 649 | Pool finalPool; /* either NULL or an MRG pool */ | 649 | Pool finalPool; /* either NULL or an MRG pool */ |
| 650 | 650 | ||
| 651 | /* alert fields <code/trace.c> */ | ||
| 652 | mps_alert_collection_fn_t alertCollection; /* client alert fn or 0 */ | ||
| 653 | |||
| 654 | /* thread fields (<code/thread.c>) */ | 651 | /* thread fields (<code/thread.c>) */ |
| 655 | RingStruct threadRing; /* ring of attached threads */ | 652 | RingStruct threadRing; /* ring of attached threads */ |
| 656 | Serial threadSerial; /* serial of next thread */ | 653 | Serial threadSerial; /* serial of next thread */ |
diff --git a/mps/code/mps.h b/mps/code/mps.h index cc4397e7252..0c2cc9dbd53 100644 --- a/mps/code/mps.h +++ b/mps/code/mps.h | |||
| @@ -560,24 +560,6 @@ extern mps_res_t mps_finalize(mps_arena_t, mps_addr_t *); | |||
| 560 | extern mps_res_t mps_definalize(mps_arena_t, mps_addr_t *); | 560 | extern mps_res_t mps_definalize(mps_arena_t, mps_addr_t *); |
| 561 | 561 | ||
| 562 | 562 | ||
| 563 | /* Alert */ | ||
| 564 | |||
| 565 | /* Alert codes. */ | ||
| 566 | enum { | ||
| 567 | MPS_ALERT_COLLECTION_BEGIN, | ||
| 568 | MPS_ALERT_COLLECTION_END | ||
| 569 | }; | ||
| 570 | typedef void (*mps_alert_collection_fn_t)(int, int); | ||
| 571 | extern mps_res_t mps_alert_collection_set(mps_arena_t, | ||
| 572 | mps_alert_collection_fn_t); | ||
| 573 | /* The following _START and _STOP identifiers are obsolete and | ||
| 574 | * deprecated: use _BEGIN and _END instead. */ | ||
| 575 | enum { | ||
| 576 | MPS_ALERT_COLLECTION_START = MPS_ALERT_COLLECTION_BEGIN, | ||
| 577 | MPS_ALERT_COLLECTION_STOP = MPS_ALERT_COLLECTION_END | ||
| 578 | }; | ||
| 579 | |||
| 580 | |||
| 581 | /* Telemetry */ | 563 | /* Telemetry */ |
| 582 | 564 | ||
| 583 | extern mps_word_t mps_telemetry_control(mps_word_t, mps_word_t); | 565 | extern mps_word_t mps_telemetry_control(mps_word_t, mps_word_t); |
diff --git a/mps/code/mpsi.c b/mps/code/mpsi.c index 86855d5c606..435b4fbc0c6 100644 --- a/mps/code/mpsi.c +++ b/mps/code/mpsi.c | |||
| @@ -1674,18 +1674,6 @@ const char *mps_message_gc_start_why(mps_arena_t arena, | |||
| 1674 | } | 1674 | } |
| 1675 | 1675 | ||
| 1676 | 1676 | ||
| 1677 | /* Alert */ | ||
| 1678 | |||
| 1679 | mps_res_t mps_alert_collection_set(mps_arena_t arena, | ||
| 1680 | mps_alert_collection_fn_t fn) | ||
| 1681 | { | ||
| 1682 | ArenaEnter(arena); | ||
| 1683 | arena->alertCollection = fn; | ||
| 1684 | ArenaLeave(arena); | ||
| 1685 | return MPS_RES_OK; | ||
| 1686 | } | ||
| 1687 | |||
| 1688 | |||
| 1689 | /* Telemetry */ | 1677 | /* Telemetry */ |
| 1690 | 1678 | ||
| 1691 | /* TODO: need to consider locking. See job003387, job003388. */ | 1679 | /* TODO: need to consider locking. See job003387, job003388. */ |
diff --git a/mps/code/traceanc.c b/mps/code/traceanc.c index 24da7a92741..e4248580a19 100644 --- a/mps/code/traceanc.c +++ b/mps/code/traceanc.c | |||
| @@ -247,10 +247,6 @@ void TracePostStartMessage(Trace trace) | |||
| 247 | 247 | ||
| 248 | /* We have consumed the pre-allocated message */ | 248 | /* We have consumed the pre-allocated message */ |
| 249 | AVER(!arena->tsMessage[ti]); | 249 | AVER(!arena->tsMessage[ti]); |
| 250 | |||
| 251 | if(arena->alertCollection) { | ||
| 252 | (*arena->alertCollection)(MPS_ALERT_COLLECTION_BEGIN, trace->why); | ||
| 253 | } | ||
| 254 | } | 250 | } |
| 255 | 251 | ||
| 256 | 252 | ||
| @@ -418,10 +414,6 @@ void TracePostMessage(Trace trace) | |||
| 418 | 414 | ||
| 419 | /* We have consumed the pre-allocated message */ | 415 | /* We have consumed the pre-allocated message */ |
| 420 | AVER(!arena->tMessage[ti]); | 416 | AVER(!arena->tMessage[ti]); |
| 421 | |||
| 422 | if(arena->alertCollection) { | ||
| 423 | (*arena->alertCollection)(MPS_ALERT_COLLECTION_END, trace->why); | ||
| 424 | } | ||
| 425 | } | 417 | } |
| 426 | 418 | ||
| 427 | 419 | ||