OSDN Git Service

Fix allocation tracking race
authorMathieu Chartier <mathieuc@google.com>
Tue, 1 Mar 2016 02:13:38 +0000 (18:13 -0800)
committerMathieu Chartier <mathieuc@google.com>
Wed, 2 Mar 2016 02:42:03 +0000 (18:42 -0800)
commitab4058c14ad800d20138a6c41b999029d342de2c
tree0956dad36fe4bd6c0d19f5966c52b977a2fe2b83
parente701f088f8fe3a2c1f16e2895402f26283f4bcc7
Fix allocation tracking race

Check if changed from uninstrumented to instrumented during GC for
alloc. If we changed, retry the allocation with kInstrumented = true.

Added stress test.

Bug: 27337759

(cherry picked from commit eebc3af4453f5c1fb5fd80c710cfd49566080d28)

Change-Id: I8fa50975b558199fcf142c8555476053001ace50
runtime/gc/heap-inl.h
runtime/gc/heap.cc
runtime/gc/heap.h
runtime/instrumentation.h
test/145-alloc-tracking-stress/expected.txt [new file with mode: 0644]
test/145-alloc-tracking-stress/info.txt [new file with mode: 0644]
test/145-alloc-tracking-stress/src/Main.java [new file with mode: 0644]