diff options
author | Roland Levillain <rpl@google.com> | 2016-07-22 17:10:06 +0100 |
---|---|---|
committer | Roland Levillain <rpl@google.com> | 2016-07-22 18:54:35 +0100 |
commit | dec8f63fdf50815f24efe1c03af64208da15f339 (patch) | |
tree | 36c8dec8c2c93312d17c6d9d1452d4b133212dbd /compiler/optimizing/code_generator.cc | |
parent | 41c7e2e6ac0a59da2f3e066e20630b295fbe4661 (diff) |
Do not emit stack maps for runtime calls to ReadBarrierMarkRegX.
* Boot image code size variation on Nexus 5X
(aosp_bullhead-userdebug build):
- total ARM64 framework Oat files size change:
115584120 bytes -> 109124728 bytes (-5.59%)
- total ARM framework Oat files size change:
97387728 bytes -> 92517584 (-5.00%)
Test: ART host and target (ARM, ARM64) tests.
Bug: 29506760
Bug: 12687968
Change-Id: I979d9fb2b4e09f4c0c7bf33af2cd91750a67f989
Diffstat (limited to 'compiler/optimizing/code_generator.cc')
-rw-r--r-- | compiler/optimizing/code_generator.cc | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc index 9c6dcaa7b3..3269dc6605 100644 --- a/compiler/optimizing/code_generator.cc +++ b/compiler/optimizing/code_generator.cc @@ -1178,19 +1178,19 @@ void CodeGenerator::ValidateInvokeRuntime(HInstruction* instruction, SlowPathCod << "instruction->DebugName()=" << instruction->DebugName() << " slow_path->GetDescription()=" << slow_path->GetDescription(); DCHECK(instruction->GetSideEffects().Includes(SideEffects::CanTriggerGC()) || - // When read barriers are enabled, some instructions use a - // slow path to emit a read barrier, which does not trigger - // GC, is not fatal, nor is emitted by HDeoptimize - // instructions. + // When (non-Baker) read barriers are enabled, some instructions + // use a slow path to emit a read barrier, which does not trigger + // GC. (kEmitCompilerReadBarrier && + !kUseBakerReadBarrier && (instruction->IsInstanceFieldGet() || instruction->IsStaticFieldGet() || - instruction->IsArraySet() || instruction->IsArrayGet() || instruction->IsLoadClass() || instruction->IsLoadString() || instruction->IsInstanceOf() || - instruction->IsCheckCast()))) + instruction->IsCheckCast() || + (instruction->IsInvokeVirtual() && instruction->GetLocations()->Intrinsified())))) << "instruction->DebugName()=" << instruction->DebugName() << " instruction->GetSideEffects().ToString()=" << instruction->GetSideEffects().ToString() << " slow_path->GetDescription()=" << slow_path->GetDescription(); @@ -1204,6 +1204,27 @@ void CodeGenerator::ValidateInvokeRuntime(HInstruction* instruction, SlowPathCod << instruction->DebugName() << ((slow_path != nullptr) ? slow_path->GetDescription() : ""); } +void CodeGenerator::ValidateInvokeRuntimeWithoutRecordingPcInfo(HInstruction* instruction, + SlowPathCode* slow_path) { + DCHECK(instruction->GetLocations()->OnlyCallsOnSlowPath()) + << "instruction->DebugName()=" << instruction->DebugName() + << " slow_path->GetDescription()=" << slow_path->GetDescription(); + // Only the Baker read barrier marking slow path used by certains + // instructions is expected to invoke the runtime without recording + // PC-related information. + DCHECK(kUseBakerReadBarrier); + DCHECK(instruction->IsInstanceFieldGet() || + instruction->IsStaticFieldGet() || + instruction->IsArrayGet() || + instruction->IsLoadClass() || + instruction->IsLoadString() || + instruction->IsInstanceOf() || + instruction->IsCheckCast() || + (instruction->IsInvokeVirtual() && instruction->GetLocations()->Intrinsified())) + << "instruction->DebugName()=" << instruction->DebugName() + << " slow_path->GetDescription()=" << slow_path->GetDescription(); +} + void SlowPathCode::SaveLiveRegisters(CodeGenerator* codegen, LocationSummary* locations) { RegisterSet* live_registers = locations->GetLiveRegisters(); size_t stack_offset = codegen->GetFirstRegisterSlotInSlowPath(); |