408 size_t word_sz,
409 uint node_index) {
410 _plab_allocator->undo_allocation(dest_attr, obj_ptr, word_sz, node_index);
411 }
412
413 void G1ParScanThreadState::update_bot_after_copying(oop obj, size_t word_sz) {
414 HeapWord* obj_start = cast_from_oop<HeapWord*>(obj);
415 G1HeapRegion* region = _g1h->heap_region_containing(obj_start);
416 region->update_bot_for_block(obj_start, obj_start + word_sz);
417 }
418
419 ALWAYSINLINE
420 void G1ParScanThreadState::do_iterate_object(oop const obj,
421 oop const old,
422 Klass* const klass,
423 G1HeapRegionAttr const region_attr,
424 G1HeapRegionAttr const dest_attr,
425 uint age) {
426 // Most objects are not arrays, so do one array check rather than
427 // checking for each array category for each object.
428 if (klass->is_array_klass()) {
429 assert(!klass->is_stack_chunk_instance_klass(), "must be");
430
431 if (klass->is_objArray_klass()) {
432 start_partial_objarray(old, obj);
433 } else {
434 // Nothing needs to be done for typeArrays. Body doesn't contain
435 // any oops to scan, and the type in the klass will already be handled
436 // by processing the built-in module.
437 assert(klass->is_typeArray_klass(), "invariant");
438 }
439 return;
440 }
441
442 ContinuationGCSupport::transform_stack_chunk(obj);
443
444 // Check for deduplicating young Strings.
445 if (G1StringDedup::is_candidate_from_evacuation(klass,
446 region_attr,
447 dest_attr,
448 age)) {
|
408 size_t word_sz,
409 uint node_index) {
410 _plab_allocator->undo_allocation(dest_attr, obj_ptr, word_sz, node_index);
411 }
412
413 void G1ParScanThreadState::update_bot_after_copying(oop obj, size_t word_sz) {
414 HeapWord* obj_start = cast_from_oop<HeapWord*>(obj);
415 G1HeapRegion* region = _g1h->heap_region_containing(obj_start);
416 region->update_bot_for_block(obj_start, obj_start + word_sz);
417 }
418
419 ALWAYSINLINE
420 void G1ParScanThreadState::do_iterate_object(oop const obj,
421 oop const old,
422 Klass* const klass,
423 G1HeapRegionAttr const region_attr,
424 G1HeapRegionAttr const dest_attr,
425 uint age) {
426 // Most objects are not arrays, so do one array check rather than
427 // checking for each array category for each object.
428 if (klass->is_array_klass() && !klass->is_flatArray_klass()) {
429 assert(!klass->is_stack_chunk_instance_klass(), "must be");
430
431 if (klass->is_objArray_klass()) {
432 start_partial_objarray(old, obj);
433 } else {
434 // Nothing needs to be done for typeArrays. Body doesn't contain
435 // any oops to scan, and the type in the klass will already be handled
436 // by processing the built-in module.
437 assert(klass->is_typeArray_klass(), "invariant");
438 }
439 return;
440 }
441
442 ContinuationGCSupport::transform_stack_chunk(obj);
443
444 // Check for deduplicating young Strings.
445 if (G1StringDedup::is_candidate_from_evacuation(klass,
446 region_attr,
447 dest_attr,
448 age)) {
|