ART: SHARED_REQUIRES to REQUIRES_SHARED
This coincides with the actual attribute name and upstream usage.
Preparation for deferring to libbase.
Test: m
Test: m test-art-host
Change-Id: Ia8986b5dfd926ba772bf00b0a35eaf83596d8518
diff --git a/runtime/jdwp/jdwp.h b/runtime/jdwp/jdwp.h
index ae02fe6..e5d34e1 100644
--- a/runtime/jdwp/jdwp.h
+++ b/runtime/jdwp/jdwp.h
@@ -88,7 +88,7 @@
uint64_t dex_pc;
};
std::ostream& operator<<(std::ostream& os, const JdwpLocation& rhs)
- SHARED_REQUIRES(Locks::mutator_lock_);
+ REQUIRES_SHARED(Locks::mutator_lock_);
bool operator==(const JdwpLocation& lhs, const JdwpLocation& rhs);
bool operator!=(const JdwpLocation& lhs, const JdwpLocation& rhs);
@@ -186,7 +186,7 @@
* The VM has finished initializing. Only called when the debugger is
* connected at the time initialization completes.
*/
- void PostVMStart() SHARED_REQUIRES(Locks::mutator_lock_) REQUIRES(!jdwp_token_lock_);
+ void PostVMStart() REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!jdwp_token_lock_);
/*
* A location of interest has been reached. This is used for breakpoints,
@@ -202,7 +202,7 @@
*/
void PostLocationEvent(const EventLocation* pLoc, mirror::Object* thisPtr, int eventFlags,
const JValue* returnValue)
- REQUIRES(!event_list_lock_, !jdwp_token_lock_) SHARED_REQUIRES(Locks::mutator_lock_);
+ REQUIRES(!event_list_lock_, !jdwp_token_lock_) REQUIRES_SHARED(Locks::mutator_lock_);
/*
* A field of interest has been accessed or modified. This is used for field access and field
@@ -213,7 +213,7 @@
*/
void PostFieldEvent(const EventLocation* pLoc, ArtField* field, mirror::Object* thisPtr,
const JValue* fieldValue, bool is_modification)
- REQUIRES(!event_list_lock_, !jdwp_token_lock_) SHARED_REQUIRES(Locks::mutator_lock_);
+ REQUIRES(!event_list_lock_, !jdwp_token_lock_) REQUIRES_SHARED(Locks::mutator_lock_);
/*
* An exception has been thrown.
@@ -222,19 +222,19 @@
*/
void PostException(const EventLocation* pThrowLoc, mirror::Throwable* exception_object,
const EventLocation* pCatchLoc, mirror::Object* thisPtr)
- REQUIRES(!event_list_lock_, !jdwp_token_lock_) SHARED_REQUIRES(Locks::mutator_lock_);
+ REQUIRES(!event_list_lock_, !jdwp_token_lock_) REQUIRES_SHARED(Locks::mutator_lock_);
/*
* A thread has started or stopped.
*/
void PostThreadChange(Thread* thread, bool start)
- REQUIRES(!event_list_lock_, !jdwp_token_lock_) SHARED_REQUIRES(Locks::mutator_lock_);
+ REQUIRES(!event_list_lock_, !jdwp_token_lock_) REQUIRES_SHARED(Locks::mutator_lock_);
/*
* Class has been prepared.
*/
void PostClassPrepare(mirror::Class* klass)
- REQUIRES(!event_list_lock_, !jdwp_token_lock_) SHARED_REQUIRES(Locks::mutator_lock_);
+ REQUIRES(!event_list_lock_, !jdwp_token_lock_) REQUIRES_SHARED(Locks::mutator_lock_);
/*
* The VM is about to stop.
@@ -242,7 +242,7 @@
bool PostVMDeath();
// Called if/when we realize we're talking to DDMS.
- void NotifyDdmsActive() SHARED_REQUIRES(Locks::mutator_lock_);
+ void NotifyDdmsActive() REQUIRES_SHARED(Locks::mutator_lock_);
void SetupChunkHeader(uint32_t type, size_t data_len, size_t header_size, uint8_t* out_header);
@@ -251,7 +251,7 @@
* Send up a chunk of DDM data.
*/
void DdmSendChunkV(uint32_t type, const iovec* iov, int iov_count)
- SHARED_REQUIRES(Locks::mutator_lock_);
+ REQUIRES_SHARED(Locks::mutator_lock_);
bool HandlePacket() REQUIRES(!shutdown_lock_, !jdwp_token_lock_);
@@ -259,7 +259,7 @@
void ResetState()
REQUIRES(!event_list_lock_)
- SHARED_REQUIRES(Locks::mutator_lock_);
+ REQUIRES_SHARED(Locks::mutator_lock_);
/* atomic ops to get next serial number */
uint32_t NextRequestSerial();
@@ -277,21 +277,21 @@
*/
JdwpError RegisterEvent(JdwpEvent* pEvent)
REQUIRES(!event_list_lock_)
- SHARED_REQUIRES(Locks::mutator_lock_);
+ REQUIRES_SHARED(Locks::mutator_lock_);
/*
* Unregister an event, given the requestId.
*/
void UnregisterEventById(uint32_t requestId)
REQUIRES(!event_list_lock_)
- SHARED_REQUIRES(Locks::mutator_lock_);
+ REQUIRES_SHARED(Locks::mutator_lock_);
/*
* Unregister all events.
*/
void UnregisterAll()
REQUIRES(!event_list_lock_)
- SHARED_REQUIRES(Locks::mutator_lock_);
+ REQUIRES_SHARED(Locks::mutator_lock_);
private:
explicit JdwpState(const JdwpOptions* options);
@@ -303,18 +303,18 @@
REQUIRES(!Locks::mutator_lock_);
void SendRequestAndPossiblySuspend(ExpandBuf* pReq, JdwpSuspendPolicy suspend_policy,
ObjectId threadId)
- SHARED_REQUIRES(Locks::mutator_lock_) REQUIRES(!jdwp_token_lock_);
+ REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!jdwp_token_lock_);
void CleanupMatchList(const std::vector<JdwpEvent*>& match_list)
- REQUIRES(event_list_lock_) SHARED_REQUIRES(Locks::mutator_lock_);
+ REQUIRES(event_list_lock_) REQUIRES_SHARED(Locks::mutator_lock_);
void EventFinish(ExpandBuf* pReq);
bool FindMatchingEvents(JdwpEventKind eventKind, const ModBasket& basket,
std::vector<JdwpEvent*>* match_list)
- REQUIRES(!event_list_lock_) SHARED_REQUIRES(Locks::mutator_lock_);
+ REQUIRES(!event_list_lock_) REQUIRES_SHARED(Locks::mutator_lock_);
void FindMatchingEventsLocked(JdwpEventKind eventKind, const ModBasket& basket,
std::vector<JdwpEvent*>* match_list)
- REQUIRES(event_list_lock_) SHARED_REQUIRES(Locks::mutator_lock_);
+ REQUIRES(event_list_lock_) REQUIRES_SHARED(Locks::mutator_lock_);
void UnregisterEvent(JdwpEvent* pEvent)
- REQUIRES(event_list_lock_) SHARED_REQUIRES(Locks::mutator_lock_);
+ REQUIRES(event_list_lock_) REQUIRES_SHARED(Locks::mutator_lock_);
void SendBufferedRequest(uint32_t type, const std::vector<iovec>& iov);
/*
@@ -410,9 +410,9 @@
bool processing_request_ GUARDED_BY(shutdown_lock_);
};
-std::string DescribeField(const FieldId& field_id) SHARED_REQUIRES(Locks::mutator_lock_);
-std::string DescribeMethod(const MethodId& method_id) SHARED_REQUIRES(Locks::mutator_lock_);
-std::string DescribeRefTypeId(const RefTypeId& ref_type_id) SHARED_REQUIRES(Locks::mutator_lock_);
+std::string DescribeField(const FieldId& field_id) REQUIRES_SHARED(Locks::mutator_lock_);
+std::string DescribeMethod(const MethodId& method_id) REQUIRES_SHARED(Locks::mutator_lock_);
+std::string DescribeRefTypeId(const RefTypeId& ref_type_id) REQUIRES_SHARED(Locks::mutator_lock_);
class Request {
public:
@@ -428,9 +428,9 @@
uint32_t ReadUnsigned32(const char* what);
- FieldId ReadFieldId() SHARED_REQUIRES(Locks::mutator_lock_);
+ FieldId ReadFieldId() REQUIRES_SHARED(Locks::mutator_lock_);
- MethodId ReadMethodId() SHARED_REQUIRES(Locks::mutator_lock_);
+ MethodId ReadMethodId() REQUIRES_SHARED(Locks::mutator_lock_);
ObjectId ReadObjectId(const char* specific_kind);
@@ -442,7 +442,7 @@
ObjectId ReadThreadGroupId();
- RefTypeId ReadRefTypeId() SHARED_REQUIRES(Locks::mutator_lock_);
+ RefTypeId ReadRefTypeId() REQUIRES_SHARED(Locks::mutator_lock_);
FrameId ReadFrameId();
@@ -456,7 +456,7 @@
JdwpTypeTag ReadTypeTag();
- JdwpLocation ReadLocation() SHARED_REQUIRES(Locks::mutator_lock_);
+ JdwpLocation ReadLocation() REQUIRES_SHARED(Locks::mutator_lock_);
JdwpModKind ReadModKind();
diff --git a/runtime/jdwp/jdwp_event.cc b/runtime/jdwp/jdwp_event.cc
index 06b67b3..e2d29fe 100644
--- a/runtime/jdwp/jdwp_event.cc
+++ b/runtime/jdwp/jdwp_event.cc
@@ -447,7 +447,7 @@
* need to do this even if later mods cause us to ignore the event.
*/
static bool ModsMatch(JdwpEvent* pEvent, const ModBasket& basket)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
JdwpEventMod* pMod = pEvent->mods;
for (int i = pEvent->modCount; i > 0; i--, pMod++) {
@@ -783,7 +783,7 @@
static void LogMatchingEventsAndThread(const std::vector<JdwpEvent*> match_list,
ObjectId thread_id)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
for (size_t i = 0, e = match_list.size(); i < e; ++i) {
JdwpEvent* pEvent = match_list[i];
VLOG(jdwp) << "EVENT #" << i << ": " << pEvent->eventKind
@@ -799,7 +799,7 @@
static void SetJdwpLocationFromEventLocation(const JDWP::EventLocation* event_location,
JDWP::JdwpLocation* jdwp_location)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
DCHECK(event_location != nullptr);
DCHECK(jdwp_location != nullptr);
Dbg::SetJdwpLocation(jdwp_location, event_location->method, event_location->dex_pc);
diff --git a/runtime/jdwp/jdwp_handler.cc b/runtime/jdwp/jdwp_handler.cc
index 6278ef0..f6008ac 100644
--- a/runtime/jdwp/jdwp_handler.cc
+++ b/runtime/jdwp/jdwp_handler.cc
@@ -54,7 +54,7 @@
}
static JdwpError WriteTaggedObject(ExpandBuf* reply, ObjectId object_id)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
uint8_t tag;
JdwpError rc = Dbg::GetObjectTag(object_id, &tag);
if (rc == ERR_NONE) {
@@ -65,7 +65,7 @@
}
static JdwpError WriteTaggedObjectList(ExpandBuf* reply, const std::vector<ObjectId>& objects)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
expandBufAdd4BE(reply, objects.size());
for (size_t i = 0; i < objects.size(); ++i) {
JdwpError rc = WriteTaggedObject(reply, objects[i]);
@@ -85,7 +85,7 @@
static JdwpError RequestInvoke(JdwpState*, Request* request,
ObjectId thread_id, ObjectId object_id,
RefTypeId class_id, MethodId method_id, bool is_constructor)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
CHECK(!is_constructor || object_id != 0);
int32_t arg_count = request->ReadSigned32("argument count");
@@ -124,7 +124,7 @@
}
static JdwpError VM_Version(JdwpState*, Request*, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
// Text information on runtime version.
std::string version(StringPrintf("Android Runtime %s", Runtime::Current()->GetVersion()));
expandBufAddUtf8String(pReply, version);
@@ -148,7 +148,7 @@
* been loaded by multiple class loaders.
*/
static JdwpError VM_ClassesBySignature(JdwpState*, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
std::string classDescriptor(request->ReadUtf8String());
std::vector<RefTypeId> ids;
@@ -180,7 +180,7 @@
* to be suspended, and that violates some JDWP expectations.
*/
static JdwpError VM_AllThreads(JdwpState*, Request*, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
std::vector<ObjectId> thread_ids;
Dbg::GetThreads(nullptr /* all thread groups */, &thread_ids);
@@ -196,7 +196,7 @@
* List all thread groups that do not have a parent.
*/
static JdwpError VM_TopLevelThreadGroups(JdwpState*, Request*, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
/*
* TODO: maintain a list of parentless thread groups in the VM.
*
@@ -215,7 +215,7 @@
* Respond with the sizes of the basic debugger types.
*/
static JdwpError VM_IDSizes(JdwpState*, Request*, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
expandBufAdd4BE(pReply, sizeof(FieldId));
expandBufAdd4BE(pReply, sizeof(MethodId));
expandBufAdd4BE(pReply, sizeof(ObjectId));
@@ -225,7 +225,7 @@
}
static JdwpError VM_Dispose(JdwpState*, Request*, ExpandBuf*)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
Dbg::Dispose();
return ERR_NONE;
}
@@ -237,7 +237,7 @@
* This needs to increment the "suspend count" on all threads.
*/
static JdwpError VM_Suspend(JdwpState*, Request*, ExpandBuf*)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
Thread* self = Thread::Current();
ScopedThreadSuspension sts(self, kWaitingForDebuggerSuspension);
Dbg::SuspendVM();
@@ -248,13 +248,13 @@
* Resume execution. Decrements the "suspend count" of all threads.
*/
static JdwpError VM_Resume(JdwpState*, Request*, ExpandBuf*)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
Dbg::ResumeVM();
return ERR_NONE;
}
static JdwpError VM_Exit(JdwpState* state, Request* request, ExpandBuf*)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
uint32_t exit_status = request->ReadUnsigned32("exit_status");
state->ExitAfterReplying(exit_status);
return ERR_NONE;
@@ -267,7 +267,7 @@
* string "java.util.Arrays".)
*/
static JdwpError VM_CreateString(JdwpState*, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
std::string str(request->ReadUtf8String());
ObjectId string_id;
JdwpError status = Dbg::CreateString(str, &string_id);
@@ -279,7 +279,7 @@
}
static JdwpError VM_ClassPaths(JdwpState*, Request*, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
expandBufAddUtf8String(pReply, "/");
std::vector<std::string> class_path;
@@ -300,7 +300,7 @@
}
static JdwpError VM_DisposeObjects(JdwpState*, Request* request, ExpandBuf*)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
size_t object_count = request->ReadUnsigned32("object_count");
for (size_t i = 0; i < object_count; ++i) {
ObjectId object_id = request->ReadObjectId();
@@ -311,7 +311,7 @@
}
static JdwpError VM_Capabilities(JdwpState*, Request*, ExpandBuf* reply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
expandBufAdd1(reply, true); // canWatchFieldModification
expandBufAdd1(reply, true); // canWatchFieldAccess
expandBufAdd1(reply, true); // canGetBytecodes
@@ -323,7 +323,7 @@
}
static JdwpError VM_CapabilitiesNew(JdwpState*, Request* request, ExpandBuf* reply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
// The first few capabilities are the same as those reported by the older call.
VM_Capabilities(nullptr, request, reply);
@@ -350,7 +350,7 @@
}
static JdwpError VM_AllClassesImpl(ExpandBuf* pReply, bool descriptor_and_status, bool generic)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
std::vector<JDWP::RefTypeId> classes;
Dbg::GetClassList(&classes);
@@ -381,17 +381,17 @@
}
static JdwpError VM_AllClasses(JdwpState*, Request*, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
return VM_AllClassesImpl(pReply, true, false);
}
static JdwpError VM_AllClassesWithGeneric(JdwpState*, Request*, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
return VM_AllClassesImpl(pReply, true, true);
}
static JdwpError VM_InstanceCounts(JdwpState*, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
int32_t class_count = request->ReadSigned32("class count");
if (class_count < 0) {
return ERR_ILLEGAL_ARGUMENT;
@@ -415,7 +415,7 @@
}
static JdwpError RT_Modifiers(JdwpState*, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
RefTypeId refTypeId = request->ReadRefTypeId();
return Dbg::GetModifiers(refTypeId, pReply);
}
@@ -424,7 +424,7 @@
* Get values from static fields in a reference type.
*/
static JdwpError RT_GetValues(JdwpState*, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
RefTypeId refTypeId = request->ReadRefTypeId();
int32_t field_count = request->ReadSigned32("field count");
expandBufAdd4BE(pReply, field_count);
@@ -442,7 +442,7 @@
* Get the name of the source file in which a reference type was declared.
*/
static JdwpError RT_SourceFile(JdwpState*, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
RefTypeId refTypeId = request->ReadRefTypeId();
std::string source_file;
JdwpError status = Dbg::GetSourceFile(refTypeId, &source_file);
@@ -457,7 +457,7 @@
* Return the current status of the reference type.
*/
static JdwpError RT_Status(JdwpState*, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
RefTypeId refTypeId = request->ReadRefTypeId();
JDWP::JdwpTypeTag type_tag;
uint32_t class_status;
@@ -473,7 +473,7 @@
* Return interfaces implemented directly by this class.
*/
static JdwpError RT_Interfaces(JdwpState*, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
RefTypeId refTypeId = request->ReadRefTypeId();
return Dbg::OutputDeclaredInterfaces(refTypeId, pReply);
}
@@ -482,7 +482,7 @@
* Return the class object corresponding to this type.
*/
static JdwpError RT_ClassObject(JdwpState*, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
RefTypeId refTypeId = request->ReadRefTypeId();
ObjectId class_object_id;
JdwpError status = Dbg::GetClassObject(refTypeId, &class_object_id);
@@ -500,13 +500,13 @@
* JDB seems interested, but DEX files don't currently support this.
*/
static JdwpError RT_SourceDebugExtension(JdwpState*, Request*, ExpandBuf*)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
/* referenceTypeId in, string out */
return ERR_ABSENT_INFORMATION;
}
static JdwpError RT_Signature(JdwpState*, Request* request, ExpandBuf* pReply, bool with_generic)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
RefTypeId refTypeId = request->ReadRefTypeId();
std::string signature;
@@ -522,12 +522,12 @@
}
static JdwpError RT_Signature(JdwpState* state, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
return RT_Signature(state, request, pReply, false);
}
static JdwpError RT_SignatureWithGeneric(JdwpState* state, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
return RT_Signature(state, request, pReply, true);
}
@@ -536,7 +536,7 @@
* reference type, or null if it was loaded by the system loader.
*/
static JdwpError RT_ClassLoader(JdwpState*, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
RefTypeId refTypeId = request->ReadRefTypeId();
return Dbg::GetClassLoader(refTypeId, pReply);
}
@@ -546,14 +546,14 @@
* fields declared by a class.
*/
static JdwpError RT_FieldsWithGeneric(JdwpState*, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
RefTypeId refTypeId = request->ReadRefTypeId();
return Dbg::OutputDeclaredFields(refTypeId, true, pReply);
}
// Obsolete equivalent of FieldsWithGeneric, without the generic type information.
static JdwpError RT_Fields(JdwpState*, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
RefTypeId refTypeId = request->ReadRefTypeId();
return Dbg::OutputDeclaredFields(refTypeId, false, pReply);
}
@@ -563,20 +563,20 @@
* methods declared by a class.
*/
static JdwpError RT_MethodsWithGeneric(JdwpState*, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
RefTypeId refTypeId = request->ReadRefTypeId();
return Dbg::OutputDeclaredMethods(refTypeId, true, pReply);
}
// Obsolete equivalent of MethodsWithGeneric, without the generic type information.
static JdwpError RT_Methods(JdwpState*, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
RefTypeId refTypeId = request->ReadRefTypeId();
return Dbg::OutputDeclaredMethods(refTypeId, false, pReply);
}
static JdwpError RT_Instances(JdwpState*, Request* request, ExpandBuf* reply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
RefTypeId class_id = request->ReadRefTypeId();
int32_t max_count = request->ReadSigned32("max count");
if (max_count < 0) {
@@ -596,7 +596,7 @@
* Return the immediate superclass of a class.
*/
static JdwpError CT_Superclass(JdwpState*, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
RefTypeId class_id = request->ReadRefTypeId();
RefTypeId superClassId;
JdwpError status = Dbg::GetSuperclass(class_id, &superClassId);
@@ -611,7 +611,7 @@
* Set static class values.
*/
static JdwpError CT_SetValues(JdwpState* , Request* request, ExpandBuf*)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
RefTypeId class_id = request->ReadRefTypeId();
int32_t values_count = request->ReadSigned32("values count");
@@ -641,7 +641,7 @@
*/
static JdwpError CT_InvokeMethod(JdwpState* state, Request* request,
ExpandBuf* pReply ATTRIBUTE_UNUSED)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
RefTypeId class_id = request->ReadRefTypeId();
ObjectId thread_id = request->ReadThreadId();
MethodId method_id = request->ReadMethodId();
@@ -658,7 +658,7 @@
*/
static JdwpError CT_NewInstance(JdwpState* state, Request* request,
ExpandBuf* pReply ATTRIBUTE_UNUSED)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
RefTypeId class_id = request->ReadRefTypeId();
ObjectId thread_id = request->ReadThreadId();
MethodId method_id = request->ReadMethodId();
@@ -675,7 +675,7 @@
* Create a new array object of the requested type and length.
*/
static JdwpError AT_newInstance(JdwpState*, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
RefTypeId arrayTypeId = request->ReadRefTypeId();
int32_t length = request->ReadSigned32("length");
@@ -694,7 +694,7 @@
*/
static JdwpError IT_InvokeMethod(JdwpState* state, Request* request,
ExpandBuf* pReply ATTRIBUTE_UNUSED)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
RefTypeId class_id = request->ReadRefTypeId();
ObjectId thread_id = request->ReadThreadId();
MethodId method_id = request->ReadMethodId();
@@ -706,7 +706,7 @@
* Return line number information for the method, if present.
*/
static JdwpError M_LineTable(JdwpState*, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
RefTypeId refTypeId = request->ReadRefTypeId();
MethodId method_id = request->ReadMethodId();
@@ -717,7 +717,7 @@
static JdwpError M_VariableTable(JdwpState*, Request* request, ExpandBuf* pReply,
bool generic)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
RefTypeId class_id = request->ReadRefTypeId();
MethodId method_id = request->ReadMethodId();
@@ -730,17 +730,17 @@
}
static JdwpError M_VariableTable(JdwpState* state, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
return M_VariableTable(state, request, pReply, false);
}
static JdwpError M_VariableTableWithGeneric(JdwpState* state, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
return M_VariableTable(state, request, pReply, true);
}
static JdwpError M_Bytecodes(JdwpState*, Request* request, ExpandBuf* reply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
RefTypeId class_id = request->ReadRefTypeId();
MethodId method_id = request->ReadMethodId();
@@ -760,7 +760,7 @@
// Default implementation for IDEs relying on this command.
static JdwpError M_IsObsolete(JdwpState*, Request* request, ExpandBuf* reply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
request->ReadRefTypeId(); // unused reference type ID
request->ReadMethodId(); // unused method ID
expandBufAdd1(reply, false); // a method is never obsolete.
@@ -775,7 +775,7 @@
* passed in here.
*/
static JdwpError OR_ReferenceType(JdwpState*, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
ObjectId object_id = request->ReadObjectId();
return Dbg::GetReferenceType(object_id, pReply);
}
@@ -784,7 +784,7 @@
* Get values from the fields of an object.
*/
static JdwpError OR_GetValues(JdwpState*, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
ObjectId object_id = request->ReadObjectId();
int32_t field_count = request->ReadSigned32("field count");
@@ -804,7 +804,7 @@
* Set values in the fields of an object.
*/
static JdwpError OR_SetValues(JdwpState*, Request* request, ExpandBuf*)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
ObjectId object_id = request->ReadObjectId();
int32_t field_count = request->ReadSigned32("field count");
@@ -826,7 +826,7 @@
}
static JdwpError OR_MonitorInfo(JdwpState*, Request* request, ExpandBuf* reply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
ObjectId object_id = request->ReadObjectId();
return Dbg::GetMonitorInfo(object_id, reply);
}
@@ -844,7 +844,7 @@
*/
static JdwpError OR_InvokeMethod(JdwpState* state, Request* request,
ExpandBuf* pReply ATTRIBUTE_UNUSED)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
ObjectId object_id = request->ReadObjectId();
ObjectId thread_id = request->ReadThreadId();
RefTypeId class_id = request->ReadRefTypeId();
@@ -854,19 +854,19 @@
}
static JdwpError OR_DisableCollection(JdwpState*, Request* request, ExpandBuf*)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
ObjectId object_id = request->ReadObjectId();
return Dbg::DisableCollection(object_id);
}
static JdwpError OR_EnableCollection(JdwpState*, Request* request, ExpandBuf*)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
ObjectId object_id = request->ReadObjectId();
return Dbg::EnableCollection(object_id);
}
static JdwpError OR_IsCollected(JdwpState*, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
ObjectId object_id = request->ReadObjectId();
bool is_collected;
JdwpError rc = Dbg::IsCollected(object_id, &is_collected);
@@ -875,7 +875,7 @@
}
static JdwpError OR_ReferringObjects(JdwpState*, Request* request, ExpandBuf* reply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
ObjectId object_id = request->ReadObjectId();
int32_t max_count = request->ReadSigned32("max count");
if (max_count < 0) {
@@ -895,7 +895,7 @@
* Return the string value in a string object.
*/
static JdwpError SR_Value(JdwpState*, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
ObjectId stringObject = request->ReadObjectId();
std::string str;
JDWP::JdwpError error = Dbg::StringToUtf8(stringObject, &str);
@@ -914,7 +914,7 @@
* Return a thread's name.
*/
static JdwpError TR_Name(JdwpState*, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
ObjectId thread_id = request->ReadThreadId();
std::string name;
@@ -935,7 +935,7 @@
* resume it; only the JDI is allowed to resume it.
*/
static JdwpError TR_Suspend(JdwpState*, Request* request, ExpandBuf*)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
ObjectId thread_id = request->ReadThreadId();
if (thread_id == Dbg::GetThreadSelfId()) {
@@ -953,7 +953,7 @@
* Resume the specified thread.
*/
static JdwpError TR_Resume(JdwpState*, Request* request, ExpandBuf*)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
ObjectId thread_id = request->ReadThreadId();
if (thread_id == Dbg::GetThreadSelfId()) {
@@ -969,7 +969,7 @@
* Return status of specified thread.
*/
static JdwpError TR_Status(JdwpState*, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
ObjectId thread_id = request->ReadThreadId();
JDWP::JdwpThreadStatus threadStatus;
@@ -991,7 +991,7 @@
* Return the thread group that the specified thread is a member of.
*/
static JdwpError TR_ThreadGroup(JdwpState*, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
ObjectId thread_id = request->ReadThreadId();
return Dbg::GetThreadGroup(thread_id, pReply);
}
@@ -1003,7 +1003,7 @@
* be THREAD_NOT_SUSPENDED.
*/
static JdwpError TR_Frames(JdwpState*, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
ObjectId thread_id = request->ReadThreadId();
uint32_t start_frame = request->ReadUnsigned32("start frame");
uint32_t length = request->ReadUnsigned32("length");
@@ -1035,7 +1035,7 @@
* Returns the #of frames on the specified thread, which must be suspended.
*/
static JdwpError TR_FrameCount(JdwpState*, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
ObjectId thread_id = request->ReadThreadId();
size_t frame_count;
@@ -1049,7 +1049,7 @@
}
static JdwpError TR_OwnedMonitors(Request* request, ExpandBuf* reply, bool with_stack_depths)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
ObjectId thread_id = request->ReadThreadId();
std::vector<ObjectId> monitors;
@@ -1073,17 +1073,17 @@
}
static JdwpError TR_OwnedMonitors(JdwpState*, Request* request, ExpandBuf* reply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
return TR_OwnedMonitors(request, reply, false);
}
static JdwpError TR_OwnedMonitorsStackDepthInfo(JdwpState*, Request* request, ExpandBuf* reply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
return TR_OwnedMonitors(request, reply, true);
}
static JdwpError TR_CurrentContendedMonitor(JdwpState*, Request* request, ExpandBuf* reply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
ObjectId thread_id = request->ReadThreadId();
ObjectId contended_monitor;
@@ -1095,7 +1095,7 @@
}
static JdwpError TR_Interrupt(JdwpState*, Request* request, ExpandBuf* reply ATTRIBUTE_UNUSED)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
ObjectId thread_id = request->ReadThreadId();
return Dbg::Interrupt(thread_id);
}
@@ -1107,7 +1107,7 @@
* its suspend count recently.)
*/
static JdwpError TR_DebugSuspendCount(JdwpState*, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
ObjectId thread_id = request->ReadThreadId();
return Dbg::GetThreadDebugSuspendCount(thread_id, pReply);
}
@@ -1118,7 +1118,7 @@
* The Eclipse debugger recognizes "main" and "system" as special.
*/
static JdwpError TGR_Name(JdwpState*, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
ObjectId thread_group_id = request->ReadThreadGroupId();
return Dbg::GetThreadGroupName(thread_group_id, pReply);
}
@@ -1128,7 +1128,7 @@
* thread group.
*/
static JdwpError TGR_Parent(JdwpState*, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
ObjectId thread_group_id = request->ReadThreadGroupId();
return Dbg::GetThreadGroupParent(thread_group_id, pReply);
}
@@ -1138,7 +1138,7 @@
* specified thread group.
*/
static JdwpError TGR_Children(JdwpState*, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
ObjectId thread_group_id = request->ReadThreadGroupId();
return Dbg::GetThreadGroupChildren(thread_group_id, pReply);
}
@@ -1147,7 +1147,7 @@
* Return the #of components in the array.
*/
static JdwpError AR_Length(JdwpState*, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
ObjectId array_id = request->ReadArrayId();
int32_t length;
@@ -1166,7 +1166,7 @@
* Return the values from an array.
*/
static JdwpError AR_GetValues(JdwpState*, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
ObjectId array_id = request->ReadArrayId();
uint32_t offset = request->ReadUnsigned32("offset");
uint32_t length = request->ReadUnsigned32("length");
@@ -1177,7 +1177,7 @@
* Set values in an array.
*/
static JdwpError AR_SetValues(JdwpState*, Request* request, ExpandBuf*)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
ObjectId array_id = request->ReadArrayId();
uint32_t offset = request->ReadUnsigned32("offset");
uint32_t count = request->ReadUnsigned32("count");
@@ -1185,7 +1185,7 @@
}
static JdwpError CLR_VisibleClasses(JdwpState*, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
request->ReadObjectId(); // classLoaderObject
// TODO: we should only return classes which have the given class loader as a defining or
// initiating loader. The former would be easy; the latter is hard, because we don't have
@@ -1206,7 +1206,7 @@
* Reply with a requestID.
*/
static JdwpError ER_Set(JdwpState* state, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
JdwpEventKind event_kind = request->ReadEnum1<JdwpEventKind>("event kind");
JdwpSuspendPolicy suspend_policy = request->ReadEnum1<JdwpSuspendPolicy>("suspend policy");
int32_t modifier_count = request->ReadSigned32("modifier count");
@@ -1348,7 +1348,7 @@
}
static JdwpError ER_Clear(JdwpState* state, Request* request, ExpandBuf*)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
request->ReadEnum1<JdwpEventKind>("event kind");
uint32_t requestId = request->ReadUnsigned32("request id");
@@ -1362,7 +1362,7 @@
* Return the values of arguments and local variables.
*/
static JdwpError SF_GetValues(JdwpState*, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
return Dbg::GetLocalValues(request, pReply);
}
@@ -1370,12 +1370,12 @@
* Set the values of arguments and local variables.
*/
static JdwpError SF_SetValues(JdwpState*, Request* request, ExpandBuf*)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
return Dbg::SetLocalValues(request);
}
static JdwpError SF_ThisObject(JdwpState*, Request* request, ExpandBuf* reply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
ObjectId thread_id = request->ReadThreadId();
FrameId frame_id = request->ReadFrameId();
@@ -1396,7 +1396,7 @@
* that, or I have no idea what this is for.)
*/
static JdwpError COR_ReflectedType(JdwpState*, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
RefTypeId class_object_id = request->ReadRefTypeId();
return Dbg::GetReflectedType(class_object_id, pReply);
}
@@ -1405,7 +1405,7 @@
* Handle a DDM packet with a single chunk in it.
*/
static JdwpError DDM_Chunk(JdwpState* state, Request* request, ExpandBuf* pReply)
- SHARED_REQUIRES(Locks::mutator_lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) {
state->NotifyDdmsActive();
uint8_t* replyBuf = nullptr;
int replyLen = -1;
diff --git a/runtime/jdwp/object_registry.cc b/runtime/jdwp/object_registry.cc
index 3fbad36..5989b61 100644
--- a/runtime/jdwp/object_registry.cc
+++ b/runtime/jdwp/object_registry.cc
@@ -63,12 +63,12 @@
// Explicit template instantiation.
template
-SHARED_REQUIRES(Locks::mutator_lock_)
+REQUIRES_SHARED(Locks::mutator_lock_)
REQUIRES(!Locks::thread_list_lock_, !Locks::thread_suspend_count_lock_)
JDWP::ObjectId ObjectRegistry::Add(Handle<mirror::Object> obj_h);
template
-SHARED_REQUIRES(Locks::mutator_lock_)
+REQUIRES_SHARED(Locks::mutator_lock_)
REQUIRES(!Locks::thread_list_lock_, !Locks::thread_suspend_count_lock_)
JDWP::ObjectId ObjectRegistry::Add(Handle<mirror::Throwable> obj_h);
diff --git a/runtime/jdwp/object_registry.h b/runtime/jdwp/object_registry.h
index 17490f4..7fa57c6 100644
--- a/runtime/jdwp/object_registry.h
+++ b/runtime/jdwp/object_registry.h
@@ -63,24 +63,24 @@
ObjectRegistry();
JDWP::ObjectId Add(mirror::Object* o)
- SHARED_REQUIRES(Locks::mutator_lock_)
+ REQUIRES_SHARED(Locks::mutator_lock_)
REQUIRES(!Locks::thread_list_lock_, !Locks::thread_suspend_count_lock_, !lock_);
JDWP::RefTypeId AddRefType(mirror::Class* c)
- SHARED_REQUIRES(Locks::mutator_lock_)
+ REQUIRES_SHARED(Locks::mutator_lock_)
REQUIRES(!Locks::thread_list_lock_, !Locks::thread_suspend_count_lock_, !lock_);
template<class T>
JDWP::ObjectId Add(Handle<T> obj_h)
- SHARED_REQUIRES(Locks::mutator_lock_)
+ REQUIRES_SHARED(Locks::mutator_lock_)
REQUIRES(!Locks::thread_list_lock_, !Locks::thread_suspend_count_lock_, !lock_);
JDWP::RefTypeId AddRefType(Handle<mirror::Class> c_h)
- SHARED_REQUIRES(Locks::mutator_lock_)
+ REQUIRES_SHARED(Locks::mutator_lock_)
REQUIRES(!Locks::thread_list_lock_, !Locks::thread_suspend_count_lock_, !lock_);
template<typename T> T Get(JDWP::ObjectId id, JDWP::JdwpError* error)
- SHARED_REQUIRES(Locks::mutator_lock_) REQUIRES(!lock_) {
+ REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!lock_) {
if (id == 0) {
*error = JDWP::ERR_NONE;
return nullptr;
@@ -88,42 +88,42 @@
return down_cast<T>(InternalGet(id, error));
}
- void Clear() SHARED_REQUIRES(Locks::mutator_lock_) REQUIRES(!lock_);
+ void Clear() REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!lock_);
void DisableCollection(JDWP::ObjectId id)
- SHARED_REQUIRES(Locks::mutator_lock_) REQUIRES(!lock_);
+ REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!lock_);
void EnableCollection(JDWP::ObjectId id)
- SHARED_REQUIRES(Locks::mutator_lock_) REQUIRES(!lock_);
+ REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!lock_);
bool IsCollected(JDWP::ObjectId id)
- SHARED_REQUIRES(Locks::mutator_lock_) REQUIRES(!lock_);
+ REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!lock_);
void DisposeObject(JDWP::ObjectId id, uint32_t reference_count)
- SHARED_REQUIRES(Locks::mutator_lock_) REQUIRES(!lock_);
+ REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!lock_);
// This is needed to get the jobject instead of the Object*.
// Avoid using this and use standard Get when possible.
- jobject GetJObject(JDWP::ObjectId id) SHARED_REQUIRES(Locks::mutator_lock_) REQUIRES(!lock_);
+ jobject GetJObject(JDWP::ObjectId id) REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!lock_);
private:
template<class T>
JDWP::ObjectId InternalAdd(Handle<T> obj_h)
- SHARED_REQUIRES(Locks::mutator_lock_)
+ REQUIRES_SHARED(Locks::mutator_lock_)
REQUIRES(!lock_, !Locks::thread_list_lock_, !Locks::thread_suspend_count_lock_);
mirror::Object* InternalGet(JDWP::ObjectId id, JDWP::JdwpError* error)
- SHARED_REQUIRES(Locks::mutator_lock_) REQUIRES(!lock_);
+ REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!lock_);
void Demote(ObjectRegistryEntry& entry)
- SHARED_REQUIRES(Locks::mutator_lock_) REQUIRES(lock_);
+ REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(lock_);
void Promote(ObjectRegistryEntry& entry)
- SHARED_REQUIRES(Locks::mutator_lock_) REQUIRES(lock_);
+ REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(lock_);
bool ContainsLocked(Thread* self, mirror::Object* o, int32_t identity_hash_code,
ObjectRegistryEntry** out_entry)
- REQUIRES(lock_) SHARED_REQUIRES(Locks::mutator_lock_);
+ REQUIRES(lock_) REQUIRES_SHARED(Locks::mutator_lock_);
Mutex lock_ DEFAULT_MUTEX_ACQUIRED_AFTER;
std::multimap<int32_t, ObjectRegistryEntry*> object_to_entry_ GUARDED_BY(lock_);