summaryrefslogtreecommitdiff
path: root/runtime/intern_table.h
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2015-11-09 11:16:49 -0800
committer Mathieu Chartier <mathieuc@google.com> 2016-01-22 15:01:55 -0800
commitf7fd970244f143b1abb956e29794c446e4d57f46 (patch)
treeaac1f57ac70747957f609bb46305dfeca87645a1 /runtime/intern_table.h
parent95005291d8ebdd1d2ac58ffc5181fef4fbbf2383 (diff)
Load app images
Support in-place patching of the app image based on boot image location and app oat location. Only loads for art run test so far since we do not automatically generate app images for app installs. N5 maps launch time (~200 runs): Before: 930ms After: 878.18ms After + image class table: 864.57ms TODO: Oatdump support. Store class loaders as class roots in image. Bug: 22858531 Change-Id: I9cbc645645e62ea2ed1ad8e139e91af7d88514c1
Diffstat (limited to 'runtime/intern_table.h')
-rw-r--r--runtime/intern_table.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/runtime/intern_table.h b/runtime/intern_table.h
index 2b2176efe1..274f5ade5e 100644
--- a/runtime/intern_table.h
+++ b/runtime/intern_table.h
@@ -84,10 +84,22 @@ class InternTable {
bool ContainsWeak(mirror::String* s) SHARED_REQUIRES(Locks::mutator_lock_)
REQUIRES(!Locks::intern_table_lock_);
+ // Lookup a strong intern, returns null if not found.
+ mirror::String* LookupStrong(Thread* self, mirror::String* s)
+ REQUIRES(!Locks::intern_table_lock_)
+ SHARED_REQUIRES(Locks::mutator_lock_);
+
+ // Lookup a weak intern, returns null if not found.
+ mirror::String* LookupWeak(Thread* self, mirror::String* s)
+ REQUIRES(!Locks::intern_table_lock_)
+ SHARED_REQUIRES(Locks::mutator_lock_);
+
// Total number of interned strings.
size_t Size() const REQUIRES(!Locks::intern_table_lock_);
+
// Total number of weakly live interned strings.
size_t StrongSize() const REQUIRES(!Locks::intern_table_lock_);
+
// Total number of strongly live interned strings.
size_t WeakSize() const REQUIRES(!Locks::intern_table_lock_);
@@ -186,9 +198,9 @@ class InternTable {
mirror::String* Insert(mirror::String* s, bool is_strong, bool holding_locks)
REQUIRES(!Locks::intern_table_lock_) SHARED_REQUIRES(Locks::mutator_lock_);
- mirror::String* LookupStrong(mirror::String* s)
+ mirror::String* LookupStrongLocked(mirror::String* s)
SHARED_REQUIRES(Locks::mutator_lock_) REQUIRES(Locks::intern_table_lock_);
- mirror::String* LookupWeak(mirror::String* s)
+ mirror::String* LookupWeakLocked(mirror::String* s)
SHARED_REQUIRES(Locks::mutator_lock_) REQUIRES(Locks::intern_table_lock_);
mirror::String* InsertStrong(mirror::String* s)
SHARED_REQUIRES(Locks::mutator_lock_) REQUIRES(Locks::intern_table_lock_);