summaryrefslogtreecommitdiffstats
path: root/runtime/reference_table.h
diff options
context:
space:
mode:
authorHiroshi Yamauchi <yamauchi@google.com>2014-06-18 13:47:35 -0700
committerHiroshi Yamauchi <yamauchi@google.com>2014-06-20 11:23:58 -0700
commitea2e1bd713ca8295ba4fcd01e77a3ce532ea61e4 (patch)
treed41be4b08041c5a2b1af626d8cdf6b69280723d5 /runtime/reference_table.h
parent241fd1192dfc0f7322660343179f9fc0591ed9ff (diff)
downloadart-ea2e1bd713ca8295ba4fcd01e77a3ce532ea61e4.zip
art-ea2e1bd713ca8295ba4fcd01e77a3ce532ea61e4.tar.gz
art-ea2e1bd713ca8295ba4fcd01e77a3ce532ea61e4.tar.bz2
Add more read barriers for JNI roots.
To make it possible to concurrently scan the JNI global roots (that is, the roots visited by JavaVMExt::VisitRoots()), add read barriers to the indirect reference table and the reference table. Also, add read barriers to the jmethodID/jfieldID decode routines (ScopedObjectAccessAlreadyRunnable::DecodeField/DecodeMethod) so that we can concurrently handle (encoded) fields and methods. Bug: 12687968 Change-Id: I3df4e4e622a572ff0ea8d44b2dc70a4d6b3ba058
Diffstat (limited to 'runtime/reference_table.h')
-rw-r--r--runtime/reference_table.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/reference_table.h b/runtime/reference_table.h
index 45309c9..1cd0999 100644
--- a/runtime/reference_table.h
+++ b/runtime/reference_table.h
@@ -39,19 +39,19 @@ class ReferenceTable {
ReferenceTable(const char* name, size_t initial_size, size_t max_size);
~ReferenceTable();
- void Add(mirror::Object* obj);
+ void Add(mirror::Object* obj) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
- void Remove(mirror::Object* obj);
+ void Remove(mirror::Object* obj) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
size_t Size() const;
- void Dump(std::ostream& os) const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+ void Dump(std::ostream& os) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
void VisitRoots(RootCallback* visitor, void* arg, uint32_t tid, RootType root_type);
private:
typedef std::vector<mirror::Object*> Table;
- static void Dump(std::ostream& os, const Table& entries)
+ static void Dump(std::ostream& os, Table& entries)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
friend class IndirectReferenceTable; // For Dump.