OSDN Git Service

Revert "Revert "Improve the thread flip.""
authorHiroshi Yamauchi <yamauchi@google.com>
Sat, 20 Aug 2016 00:03:27 +0000 (17:03 -0700)
committerHiroshi Yamauchi <yamauchi@google.com>
Mon, 22 Aug 2016 18:33:58 +0000 (11:33 -0700)
commitee23582af60b36f982de2ad16f485a61f35ae817
treeae35b6885b345e210c66acdd992103e345202131
parentbf042503dc2c2d328a6331baf33697a7d06acccf
Revert "Revert "Improve the thread flip.""

This reverts commit db3204f87c3f7c4de89762ce9e8502a9dc25c2d8.

Improve the thread flip.

- In addition to the threads that are suspended in FullSuspendCheck(),
  prioritize the resume of threads that are blocking for the thread
  flip at the JNI critical section entry and threads are about to
  transition to runnable (eg. blocking at the SOA entry from JNI).
- Shorten the length of the thread flip critical
  section (ThreadFlipBegin/End).
- Add some systrace scopes.
- Add a read barrier for the locked objects during the thread dump in
  case the thread is in the middle of flipping.

Bug: 30980189
Bug: 29517059
Bug: 12687968
Test: test-art-host, Ritz EAAC, N9 libartd boot
Change-Id: I3a903c47c0fcc746664ec376cc31dee8af3c3ecb
runtime/gc/collector/concurrent_copying.cc
runtime/gc/heap.cc
runtime/thread-inl.h
runtime/thread.cc
runtime/thread.h
runtime/thread_list.cc