src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp

changeset 9465
1556c6d89036
parent 9138
b56ab8e56604
child 9931
fd44df5e3bc3
equal deleted inserted replaced
9464:117cf4377bf4 9465:1556c6d89036
73 oop PSPromotionManager::copy_to_survivor_space(oop o) { 73 oop PSPromotionManager::copy_to_survivor_space(oop o) {
74 assert(PSScavenge::should_scavenge(&o), "Sanity"); 74 assert(PSScavenge::should_scavenge(&o), "Sanity");
75 75
76 oop new_obj = NULL; 76 oop new_obj = NULL;
77 77
78 #ifdef MIPS 78 #if defined MIPS && !defined ZERO
79 if (UseSyncLevel >= 2000) OrderAccess::fence(); 79 if (UseSyncLevel >= 2000) OrderAccess::fence();
80 #endif 80 #endif
81 81
82 // NOTE! We must be very careful with any methods that access the mark 82 // NOTE! We must be very careful with any methods that access the mark
83 // in o. There may be multiple threads racing on it, and it may be forwarded 83 // in o. There may be multiple threads racing on it, and it may be forwarded
84 // at any time. Do not use oop methods for accessing the mark! 84 // at any time. Do not use oop methods for accessing the mark!
85 markOop test_mark = o->mark(); 85 markOop test_mark = o->mark();
86 86
87 #ifdef MIPS 87 #if defined MIPS && !defined ZERO
88 if (UseSyncLevel >= 2000) OrderAccess::fence(); 88 if (UseSyncLevel >= 2000) OrderAccess::fence();
89 #endif 89 #endif
90 90
91 // The same test as "o->is_forwarded()" 91 // The same test as "o->is_forwarded()"
92 if (!test_mark->is_marked()) { 92 if (!test_mark->is_marked()) {
119 _young_gen_is_full = true; 119 _young_gen_is_full = true;
120 } 120 }
121 } 121 }
122 } 122 }
123 123
124 #ifdef MIPS 124 #if defined MIPS && !defined ZERO
125 if (UseSyncLevel >= 2000) OrderAccess::fence(); 125 if (UseSyncLevel >= 2000) OrderAccess::fence();
126 #endif 126 #endif
127 } 127 }
128 } 128 }
129 129
179 179
180 assert(new_obj != NULL, "allocation should have succeeded"); 180 assert(new_obj != NULL, "allocation should have succeeded");
181 181
182 // Copy obj 182 // Copy obj
183 Copy::aligned_disjoint_words((HeapWord*)o, (HeapWord*)new_obj, new_obj_size); 183 Copy::aligned_disjoint_words((HeapWord*)o, (HeapWord*)new_obj, new_obj_size);
184 #ifdef MIPS 184 #if defined MIPS && !defined ZERO
185 if (UseSyncLevel >= 2000) OrderAccess::fence(); 185 if (UseSyncLevel >= 2000) OrderAccess::fence();
186 #endif 186 #endif
187 187
188 // Now we have to CAS in the header. 188 // Now we have to CAS in the header.
189 if (o->cas_forward_to(new_obj, test_mark)) { 189 if (o->cas_forward_to(new_obj, test_mark)) {
230 230
231 // don't update this before the unallocation! 231 // don't update this before the unallocation!
232 new_obj = o->forwardee(); 232 new_obj = o->forwardee();
233 } 233 }
234 234
235 #ifdef MIPS 235 #if defined MIPS && !defined ZERO
236 if (UseSyncLevel >= 2000) OrderAccess::fence(); 236 if (UseSyncLevel >= 2000) OrderAccess::fence();
237 #endif 237 #endif
238 } else { 238 } else {
239 assert(o->is_forwarded(), "Sanity"); 239 assert(o->is_forwarded(), "Sanity");
240 new_obj = o->forwardee(); 240 new_obj = o->forwardee();

mercurial