aboutsummaryrefslogtreecommitdiffstats
path: root/mps/code
diff options
context:
space:
mode:
authorRichard Kistruck2008-12-16 17:59:50 +0000
committerRichard Kistruck2008-12-16 17:59:50 +0000
commitbace1c7bc1e34c66b37a3a792ea494a77c34858c (patch)
treebc8706d55153c138ceb3324c20a0886e56c10e98 /mps/code
parent33546a36cced8088afb971dbae16bf8cf188d74c (diff)
downloademacs-bace1c7bc1e34c66b37a3a792ea494a77c34858c.tar.gz
emacs-bace1c7bc1e34c66b37a3a792ea494a77c34858c.zip
Mps br/timing (local only - must revert) hack trace.c so it does not
pre-allocate GC messages after the first trace, and verify that everything still works, droppedMessages is incremented, and reported as non-zero (in diagnostic varieties only) by global.c on ArenaDestroy. Test passes. Copied from Perforce Change: 166956 ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code')
-rw-r--r--mps/code/trace.c2
-rw-r--r--mps/code/z001989a.c29
2 files changed, 6 insertions, 25 deletions
diff --git a/mps/code/trace.c b/mps/code/trace.c
index c5f0c4dd0f4..b38a42a30af 100644
--- a/mps/code/trace.c
+++ b/mps/code/trace.c
@@ -804,7 +804,7 @@ static void traceReclaim(Trace trace)
804 trace->state = TraceFINISHED; 804 trace->state = TraceFINISHED;
805 TracePostMessage(trace); /* trace end */ 805 TracePostMessage(trace); /* trace end */
806 /* Immediately pre-allocate messages for next time; failure is okay */ 806 /* Immediately pre-allocate messages for next time; failure is okay */
807 (void)TraceIdMessagesCreate(arena, trace->ti); 807 /*(void)TraceIdMessagesCreate(arena, trace->ti);*/
808} 808}
809 809
810 810
diff --git a/mps/code/z001989a.c b/mps/code/z001989a.c
index 3c5c82f1473..825b27b917c 100644
--- a/mps/code/z001989a.c
+++ b/mps/code/z001989a.c
@@ -421,31 +421,12 @@ int main(int argc, char **argv)
421 /* The most basic scripts */ 421 /* The most basic scripts */
422 testscriptA("."); 422 testscriptA(".");
423 testscriptA("Cbe."); 423 testscriptA("Cbe.");
424 testscriptA("Cbe.Cbe.");
425
426 /* Get messages, but not promptly */
427 testscriptA(".Cbe.CbeCbeCbe.");
428
429 /* Ungot messages at ArenaDestroy */
430 testscriptA("Cbe");
431 testscriptA("Cbe.CbeCbeCbe");
432
433 /* Fail to call mps_message_discard */
434 testscriptA("Cbe!");
435 testscriptA("Cbe!CbeCbeCbe!");
436
437 /* Simple finalization
438 *
439 * These tests rely on the particular order in which the "F" command
440 * nulls-out references. Not every "F" makes an object finalizable.
441 * See .keep-alive.
442 */
443 testscriptA("FFCbffe.");
444 testscriptA("FFCbffe.FFCbffe.");
445 testscriptA("FFCbffe.FCbe.F.Cbffe.FFCbfe.FF.Cbfffe.");
446 424
447 /* Various other scripts */ 425 /* SPECIAL SCRIPTS to work with a traceanc.c hacked to drop GC messages */
448 testscriptA("Cbe.FFCbffe.Cbe"); 426 testscriptA("Cbe.CC.");
427 testscriptA("CCCCCbe!");
428 testscriptA("FFCbffe.FFCff.");
429 testscriptA("CbeFFCff.C");
449 430
450 fflush(stdout); /* synchronize */ 431 fflush(stdout); /* synchronize */
451 fprintf(stderr, "\nConclusion: Failed to find any defects.\n"); 432 fprintf(stderr, "\nConclusion: Failed to find any defects.\n");