OSDN Git Service

Change one read barrier bit to mark bit
authorMathieu Chartier <mathieuc@google.com>
Fri, 29 Jul 2016 01:08:51 +0000 (18:08 -0700)
committerMathieu Chartier <mathieuc@google.com>
Wed, 3 Aug 2016 22:46:18 +0000 (15:46 -0700)
commit36a270ae4f288e49493432b7128f899ad579849e
tree99f134bbfe111b1c42b1b0c19d8b65175a3e6fc8
parent89bd8358c0a69e8cd6456d81d88ef366e261f732
Change one read barrier bit to mark bit

Optimization to help slow path performance. When the GC marks an
object through the read barrier slow path. The GC sets the mark bit
in the lock word of that reference. This bit is checked from the
assembly entrypoint the common case is that it is set. If the bit is
set, the read barrier knows the object is already marked and there is
no work to do.

To prevent dirty pages in zygote and image, the bit is set by the
image writer and zygote space creation.

EAAC score (lower is better):
N9: 777 -> 700 (average 31 of runs)
N6P (960000 mhz): 1737.48 -> 1442.31 (average of 25 runs)

Bug: 30162165
Bug: 12687968

Test: N9, N6P booting, test-art-host, test-art-target all with CC

Change-Id: Iae0cacfae221e33151d3c0ab65338d1c822ab63d
21 files changed:
compiler/image_writer.cc
compiler/image_writer.h
compiler/optimizing/code_generator_arm64.cc
runtime/arch/arm/quick_entrypoints_arm.S
runtime/arch/arm64/quick_entrypoints_arm64.S
runtime/arch/x86/quick_entrypoints_x86.S
runtime/arch/x86_64/quick_entrypoints_x86_64.S
runtime/gc/collector/concurrent_copying-inl.h
runtime/gc/collector/concurrent_copying.cc
runtime/gc/collector/concurrent_copying.h
runtime/gc/heap.cc
runtime/generated/asm_support_gen.h
runtime/globals.h
runtime/lock_word-inl.h
runtime/lock_word.h
runtime/mirror/object-inl.h
runtime/mirror/object.cc
runtime/mirror/object.h
runtime/monitor.cc
runtime/read_barrier.h
tools/cpp-define-generator/constant_lockword.def