aboutsummaryrefslogtreecommitdiffstats
path: root/mps/code
diff options
context:
space:
mode:
authorRichard Kistruck2007-03-22 14:08:57 +0000
committerRichard Kistruck2007-03-22 14:08:57 +0000
commit84f8809886f69895e06e5e45d6920111e9c51bd3 (patch)
treeeda7ca0cad3546e74727988cbc1be821725e1023 /mps/code
parentd46ebba46c141e9d55519d064c3661644dc85142 (diff)
downloademacs-84f8809886f69895e06e5e45d6920111e9c51bd3.tar.gz
emacs-84f8809886f69895e06e5e45d6920111e9c51bd3.zip
Mps br/unfixed-summary: (debug only): on entering et (emergency tracing),
SegDescribe the seg being scanned, and the seg being Fixed (ie. holding the referent object that we have just failed to forward). Copied from Perforce Change: 161979 ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code')
-rw-r--r--mps/code/poolamc.c19
-rw-r--r--mps/code/trace.c7
2 files changed, 25 insertions, 1 deletions
diff --git a/mps/code/poolamc.c b/mps/code/poolamc.c
index 496e4876801..57e4472eec0 100644
--- a/mps/code/poolamc.c
+++ b/mps/code/poolamc.c
@@ -1282,6 +1282,15 @@ static Res AMCScan(Bool *totalReturn, ScanState ss, Pool pool, Seg seg)
1282 1282
1283 format = pool->format; 1283 format = pool->format;
1284 arena = pool->arena; 1284 arena = pool->arena;
1285
1286 /* what is a typical buffer state? */
1287 if (SegBuffer(seg) != NULL) {
1288 static int lots = 5;
1289 if (lots > 0) {
1290 lots -= 1;
1291 SegDescribe(seg, mps_lib_get_stdout());
1292 }
1293 }
1285 1294
1286 if (amcSegHasNailboard(seg)) { 1295 if (amcSegHasNailboard(seg)) {
1287 return amcScanNailed(totalReturn, ss, pool, seg, amc); 1296 return amcScanNailed(totalReturn, ss, pool, seg, amc);
@@ -1507,8 +1516,16 @@ Res AMCFix(Pool pool, ScanState ss, Seg seg, Ref *refIO)
1507 ss->forwardedSize += length; 1516 ss->forwardedSize += length;
1508 do { 1517 do {
1509 res = BUFFER_RESERVE(&newRef, buffer, length, FALSE); 1518 res = BUFFER_RESERVE(&newRef, buffer, length, FALSE);
1510 if (res != ResOK) 1519 if (res != ResOK) {
1520 WriteF(mps_lib_get_stdout(),
1521 "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n"
1522 "AMCFix forwarding buffer: BUFFER_RESERVE failed,\n"
1523 "Referent object is in this seg:\n",
1524 NULL
1525 );
1526 SegDescribe(seg, mps_lib_get_stdout());
1511 goto returnRes; 1527 goto returnRes;
1528 }
1512 1529
1513 toSeg = BufferSeg(buffer); 1530 toSeg = BufferSeg(buffer);
1514 ShieldExpose(arena, toSeg); 1531 ShieldExpose(arena, toSeg);
diff --git a/mps/code/trace.c b/mps/code/trace.c
index ff76600689b..eaf948c6fa5 100644
--- a/mps/code/trace.c
+++ b/mps/code/trace.c
@@ -1093,6 +1093,13 @@ static Res traceScanSegRes(TraceSet ts, Rank rank, Arena arena, Seg seg)
1093 /* Expose the segment to make sure we can scan it. */ 1093 /* Expose the segment to make sure we can scan it. */
1094 ShieldExpose(arena, seg); 1094 ShieldExpose(arena, seg);
1095 res = PoolScan(&wasTotal, &ss, SegPool(seg), seg); 1095 res = PoolScan(&wasTotal, &ss, SegPool(seg), seg);
1096 if (res != ResOK) {
1097 WriteF(mps_lib_get_stdout(),
1098 "PoolScan failed on this seg:\n",
1099 NULL
1100 );
1101 SegDescribe(seg, mps_lib_get_stdout());
1102 }
1096 /* Cover, regardless of result */ 1103 /* Cover, regardless of result */
1097 ShieldCover(arena, seg); 1104 ShieldCover(arena, seg);
1098 1105