summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2018-11-06 10:35:48 -0800
committer Mathieu Chartier <mathieuc@google.com> 2018-11-06 10:38:04 -0800
commit456b492978389d9b5384d1a730bdff55602790fd (patch)
tree15e4c5e67f129ef7d9e00651565b22dfd41b3eb9
parent4fc843c4fc9f33c4ba49c1303d526d0e0e6a3788 (diff)
Add timing split for updating app image class loaders
Added since this a non-trivial portion of app image loading time. Test: test-art-host Bug: 111397239 Bug: 116052292 Change-Id: I922077a8929a46efaa7f5567beffee6d7b634392
-rw-r--r--runtime/class_linker.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index 9ba52c429d..ff455f6875 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -2034,11 +2034,15 @@ bool ClassLinker::AddImageSpace(
}
if (app_image) {
AppImageLoadingHelper::Update(this, space, class_loader, dex_caches, &temp_set);
- // Update class loader and resolved strings. If added_class_table is false, the resolved
- // strings were forwarded UpdateAppImageClassLoadersAndDexCaches.
- UpdateClassLoaderVisitor visitor(space, class_loader.Get());
- for (const ClassTable::TableSlot& root : temp_set) {
- visitor(root.Read());
+
+ {
+ ScopedTrace trace("AppImage:UpdateClassLoaders");
+ // Update class loader and resolved strings. If added_class_table is false, the resolved
+ // strings were forwarded UpdateAppImageClassLoadersAndDexCaches.
+ UpdateClassLoaderVisitor visitor(space, class_loader.Get());
+ for (const ClassTable::TableSlot& root : temp_set) {
+ visitor(root.Read());
+ }
}
if (kBitstringSubtypeCheckEnabled) {