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
diff --git a/src/utf.h b/src/utf.h
index 0758896..dd5791c 100644
--- a/src/utf.h
+++ b/src/utf.h
@@ -19,6 +19,7 @@
#include <stddef.h>
#include <stdint.h>
+#include "macros.h"
/*
* All UTF-8 in art is actually modified UTF-8. Mostly, this distinction
@@ -63,7 +64,8 @@
/*
* The java.lang.String hashCode() algorithm.
*/
-int32_t ComputeUtf16Hash(const CharArray* chars, int32_t offset, size_t char_count);
+int32_t ComputeUtf16Hash(const CharArray* chars, int32_t offset, size_t char_count)
+ SHARED_LOCKS_REQUIRED(GlobalSynchronization::mutator_lock_);
int32_t ComputeUtf16Hash(const uint16_t* chars, size_t char_count);
/*