aboutsummaryrefslogtreecommitdiffstats
path: root/mps/code/trace.c
diff options
context:
space:
mode:
authorRichard Brooksby2012-05-01 17:05:27 +0100
committerRichard Brooksby2012-05-01 17:05:27 +0100
commitecfd805f9a173463d3e42e211f65560a91f0af2d (patch)
tree808987389def447be9790fee9f45b2ea38d3b25d /mps/code/trace.c
parent9da9a20cb492088794fce2349bd1611133fea69a (diff)
downloademacs-ecfd805f9a173463d3e42e211f65560a91f0af2d.tar.gz
emacs-ecfd805f9a173463d3e42e211f65560a91f0af2d.zip
Fixing horrible type unsafe candy-machine interface to tracestartgendesc_diag, which broke on w3i6mv.
Copied from Perforce Change: 178077 ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code/trace.c')
-rw-r--r--mps/code/trace.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/mps/code/trace.c b/mps/code/trace.c
index e553d160318..a11fbd059c7 100644
--- a/mps/code/trace.c
+++ b/mps/code/trace.c
@@ -1517,30 +1517,35 @@ static Res rootGrey(Root root, void *p)
1517} 1517}
1518 1518
1519 1519
1520static void TraceStartGenDesc_diag(GenDesc desc, int i) 1520static void TraceStartGenDesc_diag(GenDesc desc, Bool top, Index i)
1521{ 1521{
1522 Ring n, nn; 1522 Ring n, nn;
1523
1524#if !defined(DIAG_WITH_STREAM_AND_WRITEF)
1525 UNUSED(i);
1526#endif
1523 1527
1524 if(i < 0) { 1528 if(top) {
1525 DIAG_WRITEF(( DIAG_STREAM, 1529 DIAG_WRITEF(( DIAG_STREAM,
1526 " GenDesc [top]", 1530 " GenDesc [top]",
1527 NULL )); 1531 NULL ));
1528 } else { 1532 } else {
1529 DIAG_WRITEF(( DIAG_STREAM, 1533 DIAG_WRITEF(( DIAG_STREAM,
1530 " GenDesc [$U]", i, 1534 " GenDesc [$U]", (WriteFU)i,
1531 NULL )); 1535 NULL ));
1532 } 1536 }
1533 DIAG_WRITEF(( DIAG_STREAM, 1537 DIAG_WRITEF(( DIAG_STREAM,
1534 " $P capacity: $U KiB, mortality $D\n", 1538 " $P capacity: $U KiB, mortality $D\n",
1535 (void *)desc, desc->capacity, desc->mortality, 1539 (WriteFP)desc, (WriteFU)desc->capacity, (WriteFD)desc->mortality,
1536 " ZoneSet:$B\n", desc->zones, 1540 " ZoneSet:$B\n", (WriteFU)desc->zones,
1537 NULL )); 1541 NULL ));
1538 RING_FOR(n, &desc->locusRing, nn) { 1542 RING_FOR(n, &desc->locusRing, nn) {
1539 DIAG_DECL( PoolGen gen = RING_ELT(PoolGen, genRing, n); ) 1543 DIAG_DECL( PoolGen gen = RING_ELT(PoolGen, genRing, n); )
1540 DIAG_WRITEF(( DIAG_STREAM, 1544 DIAG_WRITEF(( DIAG_STREAM,
1541 " PoolGen $U ($S)", gen->nr, gen->pool->class->name, 1545 " PoolGen $U ($S)",
1542 " totalSize $U", gen->totalSize, 1546 (WriteFU)gen->nr, gen->pool->class->name,
1543 " newSize $U\n", gen->newSizeAtCreate, 1547 " totalSize $U", (WriteFU)gen->totalSize,
1548 " newSize $U\n", (WriteFU)gen->newSizeAtCreate,
1544 NULL )); 1549 NULL ));
1545 } 1550 }
1546} 1551}
@@ -1631,7 +1636,7 @@ void TraceStart(Trace trace, double mortality, double finishingTime)
1631 1636
1632 for(i = 0; i < chain->genCount; ++i) { 1637 for(i = 0; i < chain->genCount; ++i) {
1633 GenDesc desc = &chain->gens[i]; 1638 GenDesc desc = &chain->gens[i];
1634 TraceStartGenDesc_diag(desc, i); 1639 TraceStartGenDesc_diag(desc, FALSE, i);
1635 } 1640 }
1636 } 1641 }
1637 1642
@@ -1639,7 +1644,7 @@ void TraceStart(Trace trace, double mortality, double finishingTime)
1639 DIAG_WRITEF(( DIAG_STREAM, 1644 DIAG_WRITEF(( DIAG_STREAM,
1640 " topGen\n", 1645 " topGen\n",
1641 NULL )); 1646 NULL ));
1642 TraceStartGenDesc_diag(&arena->topGen, -1); 1647 TraceStartGenDesc_diag(&arena->topGen, TRUE, 0);
1643 } 1648 }
1644 1649
1645 DIAG_END( "TraceStart" ); 1650 DIAG_END( "TraceStart" );