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]; static mps_addr_t ambigRoots[ambigRootsCOUNT]; -/* alert -- synchronous alert of collection start/stop */ - -static void alertfn(int alertcode, int whycode) -{ - switch(alertcode) { - case MPS_ALERT_COLLECTION_BEGIN: { - printf("\n^^^^^^ BEGIN (why: %d) ^^^^^^\n", whycode); - break; - } - case MPS_ALERT_COLLECTION_END: { - printf("vvvvvv END (why: %d) vvvvvv\n", whycode); - break; - } - default: { - cdie(0, "unknown alertcode"); - break; - } - } -} - /* report -- report statistics from any messages */ static void report(mps_arena_t arena) @@ -326,7 +306,6 @@ int main(int argc, char *argv[]) "arena_create"); mps_message_type_enable(arena, mps_message_type_gc()); mps_message_type_enable(arena, mps_message_type_gc_start()); - mps_alert_collection_set(arena, &alertfn); die(mps_arena_commit_limit_set(arena, testArenaSIZE), "set limit"); die(mps_thread_reg(&thread, arena), "thread_reg"); 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) CHECKL(LocusCheck(arena)); - /* nothing to check for alertCollection */ - return TRUE; } @@ -186,8 +184,6 @@ Res ArenaInit(Arena arena, ArenaClass class) LocusInit(arena); - arena->alertCollection = 0; - res = GlobalsInit(ArenaGlobals(arena)); if (res != ResOK) 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 { Bool isFinalPool; /* indicator for finalPool */ Pool finalPool; /* either NULL or an MRG pool */ - /* alert fields */ - mps_alert_collection_fn_t alertCollection; /* client alert fn or 0 */ - /* thread fields () */ RingStruct threadRing; /* ring of attached threads */ 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 *); extern mps_res_t mps_definalize(mps_arena_t, mps_addr_t *); -/* Alert */ - -/* Alert codes. */ -enum { - MPS_ALERT_COLLECTION_BEGIN, - MPS_ALERT_COLLECTION_END -}; -typedef void (*mps_alert_collection_fn_t)(int, int); -extern mps_res_t mps_alert_collection_set(mps_arena_t, - mps_alert_collection_fn_t); -/* The following _START and _STOP identifiers are obsolete and - * deprecated: use _BEGIN and _END instead. */ -enum { - MPS_ALERT_COLLECTION_START = MPS_ALERT_COLLECTION_BEGIN, - MPS_ALERT_COLLECTION_STOP = MPS_ALERT_COLLECTION_END -}; - - /* Telemetry */ 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, } -/* Alert */ - -mps_res_t mps_alert_collection_set(mps_arena_t arena, - mps_alert_collection_fn_t fn) -{ - ArenaEnter(arena); - arena->alertCollection = fn; - ArenaLeave(arena); - return MPS_RES_OK; -} - - /* Telemetry */ /* 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) /* We have consumed the pre-allocated message */ AVER(!arena->tsMessage[ti]); - - if(arena->alertCollection) { - (*arena->alertCollection)(MPS_ALERT_COLLECTION_BEGIN, trace->why); - } } @@ -418,10 +414,6 @@ void TracePostMessage(Trace trace) /* We have consumed the pre-allocated message */ AVER(!arena->tMessage[ti]); - - if(arena->alertCollection) { - (*arena->alertCollection)(MPS_ALERT_COLLECTION_END, trace->why); - } }