Fix deadlock between ConcurrentCopying and thread holding dex_lock exclusively

Similar to the issue addressed by
https://android-review.googlesource.com/628465, we observe a deadlock
between

- a thread executing ConcurrentCopying::RevokeThreadLocalMarkStacks
  which has disabled weak references access and waiting for check_point
  barrier;
- a thread which had acquired the mutator lock exclusively and was blocking
  on a condition variable regarding weak references access; and
- a thread which cannot execute the checkpoint until it acquires the
  dex_lock.

This change prevents garbage collection from occurring when dex_lock is held
exclusively.

Bug: 109720594
Test: m test-art-host
Change-Id: I7a7e8e20aada4a9fad344b2f2f45a233639cda14
1 file changed