diff options
| author | 2018-03-29 18:48:29 +0000 | |
|---|---|---|
| committer | 2018-03-29 18:48:29 +0000 | |
| commit | b8c40e22ad7c9a2ba5e89036d38b89df1a9eaf2f (patch) | |
| tree | 889e8ef9c0f06a02784135e93643a6c50e0a0b6a | |
| parent | 80f5fe5fa4fd4044c409b39db0f6b1b77542ce6e (diff) | |
| parent | 4d9081cfac1f850e05b27a9a1c5c40ec94fdd9c0 (diff) | |
Merge "Ensure that we don't suspend during GetOwnedMonitorInfoCommon" into pi-dev
| -rw-r--r-- | openjdkjvmti/ti_stack.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/openjdkjvmti/ti_stack.cc b/openjdkjvmti/ti_stack.cc index 41a649b5e3..4526be4cbe 100644 --- a/openjdkjvmti/ti_stack.cc +++ b/openjdkjvmti/ti_stack.cc @@ -925,7 +925,9 @@ static jvmtiError GetOwnedMonitorInfoCommon(const art::ScopedObjectAccessAlready if (target != self) { called_method = true; // RequestSynchronousCheckpoint releases the thread_list_lock_ as a part of its execution. - if (!target->RequestSynchronousCheckpoint(&closure)) { + // Since this deals with object references we need to avoid going to sleep. + art::ScopedAssertNoThreadSuspension sants("Getting owned monitor usage"); + if (!target->RequestSynchronousCheckpoint(&closure, art::ThreadState::kRunnable)) { return ERR(THREAD_NOT_ALIVE); } } else { |