mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 04:10:54 -08:00
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
This commit is contained in:
parent
f3f1a4a202
commit
db733f3932
6 changed files with 0 additions and 66 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -648,9 +648,6 @@ typedef struct mps_arena_s {
|
|||
Bool isFinalPool; /* indicator for finalPool */
|
||||
Pool finalPool; /* either NULL or an MRG pool */
|
||||
|
||||
/* alert fields <code/trace.c> */
|
||||
mps_alert_collection_fn_t alertCollection; /* client alert fn or 0 */
|
||||
|
||||
/* thread fields (<code/thread.c>) */
|
||||
RingStruct threadRing; /* ring of attached threads */
|
||||
Serial threadSerial; /* serial of next thread */
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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. */
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue