OSDN Git Service

Add GC critical section to GetObjectsAllocated
authorMathieu Chartier <mathieuc@google.com>
Sat, 4 Mar 2017 02:02:18 +0000 (18:02 -0800)
committerMathieu Chartier <mathieuc@google.com>
Sat, 4 Mar 2017 02:08:34 +0000 (18:08 -0800)
commite8649c7f1f1c21fdee1a40068c03d1e294e397ca
treef1e691e11a9277189d354049be3fab1976d9cca9
parentd9f647ac9a5cb0c6f112332d584756251c2cfb9f
Add GC critical section to GetObjectsAllocated

Prevent GC running during GetObjectsAllocated since we may get a
checkpoint request that tells us to suspend while we are doing
SuspendAll. This can cause a deadlock.

Bug: 35232978

Test: test-art-host

Change-Id: I9c02415df0a0b9fa787d7ce449ec06a40dfaf624
runtime/gc/collector_type.h
runtime/gc/gc_cause.cc
runtime/gc/gc_cause.h
runtime/gc/heap.cc