aboutsummaryrefslogtreecommitdiffstats
path: root/mps/code/amcss.c
diff options
context:
space:
mode:
authorRichard Brooksby2012-09-20 01:08:41 +0100
committerRichard Brooksby2012-09-20 01:08:41 +0100
commit6376c0dfe985a325a05a71c1a9285e50befe67c3 (patch)
tree600dd5a437029518d5c019806b9fe989a9d2e7b4 /mps/code/amcss.c
parent85f3d6bbb4e329b724ecb2e15e7f688a527d7795 (diff)
downloademacs-6376c0dfe985a325a05a71c1a9285e50befe67c3.tar.gz
emacs-6376c0dfe985a325a05a71c1a9285e50befe67c3.zip
Fixing up remaining visible warnings in xcode (all in test programs).
Expanding or removing some '@@@@' marks. Copied from Perforce Change: 179574 ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code/amcss.c')
-rw-r--r--mps/code/amcss.c70
1 files changed, 33 insertions, 37 deletions
diff --git a/mps/code/amcss.c b/mps/code/amcss.c
index 236713cdf12..1be8d62811f 100644
--- a/mps/code/amcss.c
+++ b/mps/code/amcss.c
@@ -80,44 +80,40 @@ static void report(mps_arena_t arena)
80 80
81 cdie(mps_message_get(&message, arena, type), "message get"); 81 cdie(mps_message_get(&message, arena, type), "message get");
82 82
83 switch(type) { 83 if (type == mps_message_type_gc_start()) {
84 /* @@@@ is using these macros in a switch supported? */ 84 nCollsStart += 1;
85 case mps_message_type_gc_start(): { 85 printf("\n{\n Collection %d started. Because:\n", nCollsStart);
86 nCollsStart += 1; 86 printf(" %s\n", mps_message_gc_start_why(arena, message));
87 printf("\n{\n Collection %d started. Because:\n", nCollsStart); 87 printf(" clock: %"PRIuLONGEST"\n", (ulongest_t)mps_message_clock(arena, message));
88 printf(" %s\n", mps_message_gc_start_why(arena, message)); 88
89 printf(" clock: %"PRIuLONGEST"\n", (ulongest_t)mps_message_clock(arena, message)); 89 } else if (type == mps_message_type_gc()) {
90 break; 90 size_t live, condemned, not_condemned;
91 } 91
92 case mps_message_type_gc(): { 92 nCollsDone += 1;
93 size_t live, condemned, not_condemned; 93 live = mps_message_gc_live_size(arena, message);
94 94 condemned = mps_message_gc_condemned_size(arena, message);
95 nCollsDone += 1; 95 not_condemned = mps_message_gc_not_condemned_size(arena, message);
96 live = mps_message_gc_live_size(arena, message); 96
97 condemned = mps_message_gc_condemned_size(arena, message); 97 printf("\n Collection %d finished:\n", nCollsDone);
98 not_condemned = mps_message_gc_not_condemned_size(arena, message); 98 printf(" live %"PRIuLONGEST"\n", (ulongest_t)live);
99 99 printf(" condemned %"PRIuLONGEST"\n", (ulongest_t)condemned);
100 printf("\n Collection %d finished:\n", nCollsDone); 100 printf(" not_condemned %"PRIuLONGEST"\n", (ulongest_t)not_condemned);
101 printf(" live %"PRIuLONGEST"\n", (ulongest_t)live); 101 printf(" clock: %"PRIuLONGEST"\n", (ulongest_t)mps_message_clock(arena, message));
102 printf(" condemned %"PRIuLONGEST"\n", (ulongest_t)condemned); 102 printf("}\n");
103 printf(" not_condemned %"PRIuLONGEST"\n", (ulongest_t)not_condemned); 103
104 printf(" clock: %"PRIuLONGEST"\n", (ulongest_t)mps_message_clock(arena, message)); 104 if(condemned > (gen1SIZE + gen2SIZE + (size_t)128) * 1024) {
105 printf("}\n"); 105 /* When condemned size is larger than could happen in a gen 2
106 106 * collection (discounting ramps, natch), guess that was a dynamic
107 if(condemned > (gen1SIZE + gen2SIZE + (size_t)128) * 1024) { 107 * collection, and reset the commit limit, so it doesn't run out. */
108 /* When condemned size is larger than could happen in a gen 2 108 die(mps_arena_commit_limit_set(arena, 2 * testArenaSIZE),
109 * collection (discounting ramps, natch), guess that was a dynamic 109 "set limit");
110 * collection, and reset the commit limit, so it doesn't run out. */
111 die(mps_arena_commit_limit_set(arena, 2 * testArenaSIZE),
112 "set limit");
113 }
114 break;
115 }
116 default: {
117 cdie(0, "unknown message type");
118 break;
119 } 110 }
111
112 } else {
113 cdie(0, "unknown message type");
114 break;
120 } 115 }
116
121 mps_message_discard(arena, message); 117 mps_message_discard(arena, message);
122 } 118 }
123 119
@@ -223,7 +219,7 @@ static void *test(void *arg, size_t s)
223 /* test mps_arena_has_addr */ 219 /* test mps_arena_has_addr */
224 { 220 {
225 size_t hitRatio; 221 size_t hitRatio;
226 int hitsWanted = 4; /* aim for 4 hits (on average) */ 222 unsigned hitsWanted = 4; /* aim for 4 hits (on average) */
227 /* [Note: The for-loop condition used to be "i < 4 * hitRatio", 223 /* [Note: The for-loop condition used to be "i < 4 * hitRatio",
228 * with "4" an unexplained naked constant. I have now labelled 224 * with "4" an unexplained naked constant. I have now labelled
229 * it "hitsWanted", as I think that is the intent. RHSK] 225 * it "hitsWanted", as I think that is the intent. RHSK]