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 01:25:02 +0000 (17:25 -0800)
commiteebc3af4453f5c1fb5fd80c710cfd49566080d28
treeb4b679247bbee26fef7a818514a09849670090af
parent73e31f8ae826be5b9b0c3c216abb904cbfa71077
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

Change-Id: Iaad7977693c9ed927f779a66b29cd58341a837da
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]