diff options
| author | David Brazdil <dbrazdil@google.com> | 2018-12-07 01:20:17 -0800 |
|---|---|---|
| committer | android-build-merger <android-build-merger@google.com> | 2018-12-07 01:20:17 -0800 |
| commit | 4e7a33fb083d4332034aea8240bd182c673b8471 (patch) | |
| tree | 93ae119f519cb88c1a783c5f9873bd66d8559a4e /core/java/android/app/LoadedApk.java | |
| parent | 73694f8faa54071759744901bd1c64457dc9cf49 (diff) | |
| parent | 385c42a2e9431fd345d42be57a21f03308f0fdec (diff) | |
Merge "Move DexLoadReporter setup before AppComponentFactory calls"
am: 385c42a2e9
Change-Id: I1b37135225175c74c578a29dfbd269bf7230f2e5
Diffstat (limited to 'core/java/android/app/LoadedApk.java')
| -rw-r--r-- | core/java/android/app/LoadedApk.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/java/android/app/LoadedApk.java b/core/java/android/app/LoadedApk.java index 3f1075448c84..0d3110cfded8 100644 --- a/core/java/android/app/LoadedApk.java +++ b/core/java/android/app/LoadedApk.java @@ -57,6 +57,7 @@ import android.view.DisplayAdjustments; import com.android.internal.util.ArrayUtils; +import dalvik.system.BaseDexClassLoader; import dalvik.system.VMRuntime; import java.io.File; @@ -929,6 +930,15 @@ public final class LoadedApk { if (!SystemProperties.getBoolean("dalvik.vm.usejitprofiles", false)) { return; } + + // If we use profiles, setup the dex reporter to notify package manager + // of any relevant dex loads. The idle maintenance job will use the information + // reported to optimize the loaded dex files. + // Note that we only need one global reporter per app. + // Make sure we do this before invoking app code for the first time so that we + // can capture the complete application startup. + BaseDexClassLoader.setReporter(DexLoadReporter.getInstance()); + // Only set up profile support if the loaded apk has the same uid as the // current process. // Currently, we do not support profiling across different apps. |
