History log of /art/runtime/handle_scope-inl.h
Revision Date Author Comments
ed15000a5099f5e230c8ded5ac75692bae272650 28-Aug-2015 Mathieu Chartier <mathieuc@google.com> Fix some HandleScope bugs and add corresponding checks

Some places were creating or destroying handle scopes without holding
the mutator lock. This can cause GC crashes if thread roots are being
marked or hprof dumps to also fail.

Also added checks to catch some of these errors.

Bug: 23468617
Change-Id: I1a2d615923484cfc25014967656775c445aa3f1f
bef89c910dc40f7e82ee56c3c8e8fdaa0cd5562b 09-Jan-2015 Mathieu Chartier <mathieuc@google.com> Fix HandleScope with wrong thread error

Possibly fixes
+art F 5127 6995 art/runtime/handle_scope-inl.h:43]
Check failed: top_handle_scope == this
(top_handle_scope=0x2b449293c770, this=0x2b4492d6a0a8)
Seen in tests. A possible cause was that the thread dumping stacks
was running checkpoints on a suspended thread but putting a
HandleScope on that thread instead of itself. This isn't safe if the
suspended thread is doing HandleScope stuff in a non runnable state.

Change-Id: Icdaadabca5aff8d380d5cc9570b9e899fe790a62
3e0acf673ce1fbb3932d288d7b52a6dc551a920f 08-Jan-2015 Mathieu Chartier <mathieuc@google.com> Add VerifyObject to StackHandleScope::SetReference

Helps catch GC bugs. Also moved some of the HandleScope logic to the
inl file.

Bug: 13054004
Change-Id: I81b9dd717092b6a467fcd28b4df0089ec075dd44
575e78c41ece0dec969d31f46be563d4eb7ae43b 04-Nov-2014 Andreas Gampe <agampe@google.com> ART: Replace COMPILE_ASSERT with static_assert (runtime)

Replace all occurrences of COMPILE_ASSERT in the runtime tree.

Change-Id: I01e420899c760094fb342cc6cb9e692dd670a0b2
2d2621a1463d2f3f03fa73503fa42e43657cdcfc 24-Oct-2014 Mathieu Chartier <mathieuc@google.com> Optimize method linking

Added more inlining, removed imt array allocation and replaced it
with a handle scope. Removed some un-necessary handle scopes.

Added logic to base interface method tables from the superclass so
that we dont need to reconstruct for every interface (large win).

Facebook launch Dalvik KK MR2:
TotalTime: 3165
TotalTime: 3652
TotalTime: 3143
TotalTime: 3298
TotalTime: 3212
TotalTime: 3211

Facebook launch TOT before:
WaitTime: 3702
WaitTime: 3616
WaitTime: 3616
WaitTime: 3687
WaitTime: 3742
WaitTime: 3767

After optimizations:
WaitTime: 2903
WaitTime: 2953
WaitTime: 2918
WaitTime: 2940
WaitTime: 2879
WaitTime: 2792

LinkInterfaceMethods no longer one of the hottest methods, new list:
4.73% art::ClassLinker::LinkVirtualMethods(art::Thread*, art::Handle<art::mirror::Class>)
3.07% art::DexFile::FindClassDef(char const*) const
2.94% art::mirror::Class::FindDeclaredStaticField(art::mirror::DexCache const*, unsigned int)
2.90% art::DexFile::FindStringId(char const*) const

Bug: 18054905
Bug: 16828525

(cherry picked from commit 1fb463e42cf1d67595cff66d19c0f99e3046f4c4)

Change-Id: I27cc70178fd3655fbe5a3178887fcba189d21321
1fb463e42cf1d67595cff66d19c0f99e3046f4c4 24-Oct-2014 Mathieu Chartier <mathieuc@google.com> Optimize method linking

Added more inlining, removed imt array allocation and replaced it
with a handle scope. Removed some un-necessary handle scopes.

Added logic to base interface method tables from the superclass so
that we dont need to reconstruct for every interface (large win).

Facebook launch Dalvik KK MR2:
TotalTime: 3165
TotalTime: 3652
TotalTime: 3143
TotalTime: 3298
TotalTime: 3212
TotalTime: 3211

Facebook launch TOT before:
WaitTime: 3702
WaitTime: 3616
WaitTime: 3616
WaitTime: 3687
WaitTime: 3742
WaitTime: 3767

After optimizations:
WaitTime: 2903
WaitTime: 2953
WaitTime: 2918
WaitTime: 2940
WaitTime: 2879
WaitTime: 2792

LinkInterfaceMethods no longer one of the hottest methods, new list:
4.73% art::ClassLinker::LinkVirtualMethods(art::Thread*, art::Handle<art::mirror::Class>)
3.07% art::DexFile::FindClassDef(char const*) const
2.94% art::mirror::Class::FindDeclaredStaticField(art::mirror::DexCache const*, unsigned int)
2.90% art::DexFile::FindStringId(char const*) const

Bug: 18054905
Bug: 16828525

Change-Id: I27cc70178fd3655fbe5a3178887fcba189d21321
59c07060a6fbb93e455b44f00098cafb8e7e26cc 10-Oct-2014 Ian Rogers <irogers@google.com> Work around ICE bugs with MIPS GCC and O1.

Also, work around GCC warning bugs where array accesses with explicit
bounds checks are flagged as being out-of-bounds. Significantly, clean-up
the HandleScope so the array accesses don't appear out-of-bounds at compile
time.

Change-Id: I5d66567559cc1f97cd0aa02c0df8575ebadbfe3d
22d5e735f403c57525fe868304c7123f0ce66399 16-Jul-2014 Ian Rogers <irogers@google.com> Remove object_utils.h.

Break into object_lock, field_helper and method_helper.
Clean up header files following this.
Also tidy some of the Handle code in response to compiler errors when resolving
the changes in this CL.

Change-Id: I73e63015a0f02a754d0866bfaf58208aebcaa295
bc56fc3242ea2fad6630abdee1657f444eee8d30 04-Jun-2014 Mathieu Chartier <mathieuc@google.com> Fix compiler warnings.

Added GetReference, GetHandle to StackHandleScope to prevent the
compiler from optimizing away these loads/stores from inline
functions.

Change-Id: I4db02dd3194665d844292e74e3a7d7c80e730e06
421c53742610c053543f8c84e04d5e0c5185d68c 14-May-2014 Mathieu Chartier <mathieuc@google.com> Address comments from HandleScope change.

For:
https://android-review.googlesource.com/#/c/93793

Change-Id: I020d22a1508bf4f1770e6806d70e4fbb9a0fa0ab
eb8167a4f4d27fce0530f6724ab8032610cd146b 08-May-2014 Mathieu Chartier <mathieuc@google.com> Add Handle/HandleScope and delete SirtRef.

Delete SirtRef and replaced it with Handle. Handles are value types
which wrap around StackReference*.

Renamed StackIndirectReferenceTable to HandleScope.

Added a scoped handle wrapper which wraps around an Object** and
restores it in its destructor.

Renamed Handle::get -> Get.

Bug: 8473721

Change-Id: Idbfebd4f35af629f0f43931b7c5184b334822c7a