comparison src/hotspot/cpu/arm/c1_Runtime1_arm.cpp @ 51224:dd1aa4229fd4

8207252: C1 still does eden allocations when TLAB is enabled Summary: Only do eden allocations when TLAB is disabled Reviewed-by: kbarrett, jrose, tschatzl, iveresov Contributed-by: jcbeyler@google.com
author jcbeyler
date Sun, 22 Jul 2018 20:00:39 -0700
parents bec342339138
children cc1a4a267798
comparison
equal deleted inserted replaced
11:1b30b5a18db7 12:783a68cc7f9d
544 case fast_new_instance_init_check_id: 544 case fast_new_instance_init_check_id:
545 { 545 {
546 const Register result = R0; 546 const Register result = R0;
547 const Register klass = R1; 547 const Register klass = R1;
548 548
549 if (UseTLAB && Universe::heap()->supports_inline_contig_alloc() && id != new_instance_id) { 549 // If TLAB is disabled, see if there is support for inlining contiguous
550 // We come here when TLAB allocation failed. 550 // allocations.
551 // In this case we try to allocate directly from eden. 551 // Otherwise, just go to the slow path.
552 if (!UseTLAB && Universe::heap()->supports_inline_contig_alloc() && id != new_instance_id) {
552 Label slow_case, slow_case_no_pop; 553 Label slow_case, slow_case_no_pop;
553 554
554 // Make sure the class is fully initialized 555 // Make sure the class is fully initialized
555 if (id == fast_new_instance_init_check_id) { 556 if (id == fast_new_instance_init_check_id) {
556 __ ldrb(result, Address(klass, InstanceKlass::init_state_offset())); 557 __ ldrb(result, Address(klass, InstanceKlass::init_state_offset()));
614 615
615 const Register result = R0; 616 const Register result = R0;
616 const Register klass = R1; 617 const Register klass = R1;
617 const Register length = R2; 618 const Register length = R2;
618 619
619 if (UseTLAB && Universe::heap()->supports_inline_contig_alloc()) { 620 // If TLAB is disabled, see if there is support for inlining contiguous
620 // We come here when TLAB allocation failed. 621 // allocations.
621 // In this case we try to allocate directly from eden. 622 // Otherwise, just go to the slow path.
623 if (!UseTLAB && Universe::heap()->supports_inline_contig_alloc()) {
622 Label slow_case, slow_case_no_pop; 624 Label slow_case, slow_case_no_pop;
623 625
624 #ifdef AARCH64 626 #ifdef AARCH64
625 __ mov_slow(Rtemp, C1_MacroAssembler::max_array_allocation_length); 627 __ mov_slow(Rtemp, C1_MacroAssembler::max_array_allocation_length);
626 __ cmp_32(length, Rtemp); 628 __ cmp_32(length, Rtemp);