OSDN Git Service

Do type checks in ArraySet without read barriers.
authorRoland Levillain <rpl@google.com>
Mon, 5 Sep 2016 14:57:33 +0000 (15:57 +0100)
committerRoland Levillain <rpl@google.com>
Wed, 7 Sep 2016 10:55:13 +0000 (11:55 +0100)
commit9d6e1f892768b0a0cf273ca455070f462a766a06
treefea5326fd36e3869a1d6d5fc0d0c8d80e2bca445
parent66d4779c8381db2dd5c0fbe92b3c3a45a7a57ef3
Do type checks in ArraySet without read barriers.

This approach is valid in the case of Baker and non-Baker
read barriers.

Benchmarks (ARM64) score variations on Nexus 5X with CPU
cores clamped at 960000 Hz (aosp_bullhead-userdebug build,
medians of 10 runs for each suite):
- Ritzperf - average (lower is better):       -0.44% (virtually unchanged)
- CaffeineMark - average (higher is better):  -0.20% (virtually unchanged)
- DeltaBlue (lower is better):                -4.08% (slightly better)
- Richards - average (lower is better):       -0.57% (virtually unchanged)
- SciMark2 - average (higher is better):      -0.52% (virtually unchanged)

Details about Ritzperf benchmarks with meaningful variations
(lower is better):
- GenericCalcActions.MemAllocTest:            +3.02% (slightly worse)

Details about Richards benchmarks with meaningful variations
(lower is better):
- gibbons                                     -5.01% (better)

Boot image code size variation on Nexus 5X
(aosp_bullhead-userdebug build):
- total ARM64 framework Oat files size change:
  83127840 bytes -> 83082656 bytes (-45184 bytes, -0.05%)
- total ARM framework Oat files size change:
  72571872 bytes -> 72522796 bytes (-49076 bytes, -0.07%)

Test: ART_USE_READ_BARRIER=true ART_HEAP_POISONING=true m test-art-host
Test: ART_USE_READ_BARRIER=true ART_HEAP_POISONING=true m test-art-target
Bug: 29516974
Bug: 12687968
Change-Id: I8fe130156ace87dd2e4a15d9f8b4111287e735b3
compiler/optimizing/code_generator_arm.cc
compiler/optimizing/code_generator_arm64.cc
compiler/optimizing/code_generator_x86.cc
compiler/optimizing/code_generator_x86_64.cc