Use the holder's gray bit in Baker read barrier slow paths (ARM, ARM64).

In compiler-generated code, when deciding whether to mark
a heap reference or not in a read barrier, after checking
whether the GC is currently marking, also check (in the
slow path) whether the lock word of the reference's holder
is gray, before actually marking the reference.

This change is only for ARM and ARM64, as it does not
benefit x86 nor x86-64.

Test: Run ART tests in Baker read barrier configuration.
Test: Boot a device in Baker read barrier configuration.
Bug: 29516974
Change-Id: I60595a8f4987747faeaa359ad873e9758c1ded75
3 files changed