summaryrefslogtreecommitdiff
path: root/src/native/java_lang_VMClassLoader.cc
diff options
context:
space:
mode:
author Ian Rogers <irogers@google.com> 2012-07-19 15:28:27 -0700
committer Ian Rogers <irogers@google.com> 2012-08-14 10:45:52 -0700
commit00f7d0eaa6bd93d33bf0c1429bf4ba0b3f28abac (patch)
tree6a2172ece15c4699e6c2a67ce76f019db0a9a21d /src/native/java_lang_VMClassLoader.cc
parent634ea28f78c4a138e6a1de54eae8696095422415 (diff)
Global lock levels.
Introduce the notion of the mutators/GC being a shared-exclusive (aka reader-writer) lock. Introduce globally ordered locks, analysable by annotalysis, statically at compile time. Add locking attributes to methods. More subtly, remove the heap_lock_ and split between various locks that are held for smaller periods (where work doesn't get blocked). Remove buggy Dalvik style thread transitions. Make GC use CMS in all cases when concurrent is enabled. Fix bug where suspend counts rather than debug suspend counts were sent to JDWP. Move the PathClassLoader to WellKnownClasses. In debugger refactor calls to send request and possibly suspend. Break apart different VmWait thread states. Move identity hash code to a shared method. Change-Id: Icdbfc3ce3fcccd14341860ac7305d8e97b51f5c6
Diffstat (limited to 'src/native/java_lang_VMClassLoader.cc')
-rw-r--r--src/native/java_lang_VMClassLoader.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/native/java_lang_VMClassLoader.cc b/src/native/java_lang_VMClassLoader.cc
index 0689f74986..4b5c31c64b 100644
--- a/src/native/java_lang_VMClassLoader.cc
+++ b/src/native/java_lang_VMClassLoader.cc
@@ -17,15 +17,15 @@
#include "class_linker.h"
#include "class_loader.h"
#include "jni_internal.h"
-#include "scoped_jni_thread_state.h"
+#include "scoped_thread_state_change.h"
#include "ScopedUtfChars.h"
#include "zip_archive.h"
namespace art {
static jclass VMClassLoader_findLoadedClass(JNIEnv* env, jclass, jobject javaLoader, jstring javaName) {
- ScopedJniThreadState ts(env);
- ClassLoader* loader = ts.Decode<ClassLoader*>(javaLoader);
+ ScopedObjectAccess soa(env);
+ ClassLoader* loader = soa.Decode<ClassLoader*>(javaLoader);
ScopedUtfChars name(env, javaName);
if (name.c_str() == NULL) {
return NULL;
@@ -34,7 +34,7 @@ static jclass VMClassLoader_findLoadedClass(JNIEnv* env, jclass, jobject javaLoa
std::string descriptor(DotToDescriptor(name.c_str()));
Class* c = Runtime::Current()->GetClassLinker()->LookupClass(descriptor.c_str(), loader);
if (c != NULL && c->IsResolved()) {
- return ts.AddLocalReference<jclass>(c);
+ return soa.AddLocalReference<jclass>(c);
} else {
// Class wasn't resolved so it may be erroneous or not yet ready, force the caller to go into
// the regular loadClass code.