282 if (forwardee == nullptr) { // forwardee is null when forwarding is successful
283 // We won any races, we "own" this object.
284 oop new_obj = cast_to_oop(new_obj_addr);
285 assert(new_obj == o->forwardee(), "Sanity");
286
287 // Increment age if obj still in new generation. Now that
288 // we're dealing with a markWord that cannot change, it is
289 // okay to use the non mt safe oop methods.
290 if (!new_obj_is_tenured) {
291 new_obj->incr_age();
292 assert(young_space()->contains(new_obj), "Attempt to push non-promoted obj");
293 }
294
295 ContinuationGCSupport::transform_stack_chunk(new_obj);
296
297 // Do the size comparison first with new_obj_size, which we
298 // already have. Hopefully, only a few objects are larger than
299 // _min_array_size_for_chunking, and most of them will be arrays.
300 // So, the objArray test would be very infrequent.
301 if (new_obj_size > _min_array_size_for_chunking &&
302 klass->is_objArray_klass() &&
303 PSChunkLargeArrays) {
304 push_objArray(o, new_obj);
305 } else {
306 // we'll just push its contents
307 push_contents(new_obj);
308
309 if (StringDedup::is_enabled_string(klass) &&
310 psStringDedup::is_candidate_from_evacuation(new_obj, new_obj_is_tenured)) {
311 _string_dedup_requests.add(o);
312 }
313 }
314 return new_obj;
315 } else {
316 // We lost, someone else "owns" this object.
317 assert(o->is_forwarded(), "Object must be forwarded if the cas failed.");
318 assert(o->forwardee() == forwardee, "invariant");
319
320 if (new_obj_is_tenured) {
321 _old_lab.unallocate_object(new_obj_addr, new_obj_size);
322 } else {
|
282 if (forwardee == nullptr) { // forwardee is null when forwarding is successful
283 // We won any races, we "own" this object.
284 oop new_obj = cast_to_oop(new_obj_addr);
285 assert(new_obj == o->forwardee(), "Sanity");
286
287 // Increment age if obj still in new generation. Now that
288 // we're dealing with a markWord that cannot change, it is
289 // okay to use the non mt safe oop methods.
290 if (!new_obj_is_tenured) {
291 new_obj->incr_age();
292 assert(young_space()->contains(new_obj), "Attempt to push non-promoted obj");
293 }
294
295 ContinuationGCSupport::transform_stack_chunk(new_obj);
296
297 // Do the size comparison first with new_obj_size, which we
298 // already have. Hopefully, only a few objects are larger than
299 // _min_array_size_for_chunking, and most of them will be arrays.
300 // So, the objArray test would be very infrequent.
301 if (new_obj_size > _min_array_size_for_chunking &&
302 klass->is_refArray_klass() &&
303 PSChunkLargeArrays) {
304 push_objArray(o, new_obj);
305 } else {
306 // we'll just push its contents
307 push_contents(new_obj);
308
309 if (StringDedup::is_enabled_string(klass) &&
310 psStringDedup::is_candidate_from_evacuation(new_obj, new_obj_is_tenured)) {
311 _string_dedup_requests.add(o);
312 }
313 }
314 return new_obj;
315 } else {
316 // We lost, someone else "owns" this object.
317 assert(o->is_forwarded(), "Object must be forwarded if the cas failed.");
318 assert(o->forwardee() == forwardee, "invariant");
319
320 if (new_obj_is_tenured) {
321 _old_lab.unallocate_object(new_obj_addr, new_obj_size);
322 } else {
|