Loading services/core/java/com/android/server/pm/PackageDexOptimizer.java +11 −6 Original line number Diff line number Diff line Loading @@ -404,12 +404,17 @@ public class PackageDexOptimizer { + " dexoptFlags=" + printDexoptFlags(dexoptFlags) + " target-filter=" + compilerFilter); // TODO(calin): b/64530081 b/66984396. Use SKIP_SHARED_LIBRARY_CHECK for the context // (instead of dexUseInfo.getClassLoaderContext()) in order to compile secondary dex files // in isolation (and avoid to extract/verify the main apk if it's in the class path). // Note this trades correctness for performance since the resulting slow down is // unacceptable in some cases until b/64530081 is fixed. String classLoaderContext = SKIP_SHARED_LIBRARY_CHECK; String classLoaderContext; if (dexUseInfo.isUnknownClassLoaderContext() || dexUseInfo.isVariableClassLoaderContext()) { // If we have an unknown (not yet set), or a variable class loader chain, compile // without a context and mark the oat file with SKIP_SHARED_LIBRARY_CHECK. Note that // this might lead to a incorrect compilation. // TODO(calin): We should just extract in this case. classLoaderContext = SKIP_SHARED_LIBRARY_CHECK; } else { classLoaderContext = dexUseInfo.getClassLoaderContext(); } int reason = options.getCompilationReason(); try { for (String isa : dexUseInfo.getLoaderIsas()) { Loading services/core/java/com/android/server/pm/dex/PackageDexUsage.java +2 −4 Original line number Diff line number Diff line Loading @@ -863,15 +863,13 @@ public class PackageDexUsage extends AbstractStatsBase<Void> { public String getClassLoaderContext() { return mClassLoaderContext; } @VisibleForTesting /* package */ boolean isUnknownClassLoaderContext() { public boolean isUnknownClassLoaderContext() { // The class loader context may be unknown if we loaded the data from a previous version // which didn't save the context. return UNKNOWN_CLASS_LOADER_CONTEXT.equals(mClassLoaderContext); } @VisibleForTesting /* package */ boolean isVariableClassLoaderContext() { public boolean isVariableClassLoaderContext() { return VARIABLE_CLASS_LOADER_CONTEXT.equals(mClassLoaderContext); } } Loading Loading
services/core/java/com/android/server/pm/PackageDexOptimizer.java +11 −6 Original line number Diff line number Diff line Loading @@ -404,12 +404,17 @@ public class PackageDexOptimizer { + " dexoptFlags=" + printDexoptFlags(dexoptFlags) + " target-filter=" + compilerFilter); // TODO(calin): b/64530081 b/66984396. Use SKIP_SHARED_LIBRARY_CHECK for the context // (instead of dexUseInfo.getClassLoaderContext()) in order to compile secondary dex files // in isolation (and avoid to extract/verify the main apk if it's in the class path). // Note this trades correctness for performance since the resulting slow down is // unacceptable in some cases until b/64530081 is fixed. String classLoaderContext = SKIP_SHARED_LIBRARY_CHECK; String classLoaderContext; if (dexUseInfo.isUnknownClassLoaderContext() || dexUseInfo.isVariableClassLoaderContext()) { // If we have an unknown (not yet set), or a variable class loader chain, compile // without a context and mark the oat file with SKIP_SHARED_LIBRARY_CHECK. Note that // this might lead to a incorrect compilation. // TODO(calin): We should just extract in this case. classLoaderContext = SKIP_SHARED_LIBRARY_CHECK; } else { classLoaderContext = dexUseInfo.getClassLoaderContext(); } int reason = options.getCompilationReason(); try { for (String isa : dexUseInfo.getLoaderIsas()) { Loading
services/core/java/com/android/server/pm/dex/PackageDexUsage.java +2 −4 Original line number Diff line number Diff line Loading @@ -863,15 +863,13 @@ public class PackageDexUsage extends AbstractStatsBase<Void> { public String getClassLoaderContext() { return mClassLoaderContext; } @VisibleForTesting /* package */ boolean isUnknownClassLoaderContext() { public boolean isUnknownClassLoaderContext() { // The class loader context may be unknown if we loaded the data from a previous version // which didn't save the context. return UNKNOWN_CLASS_LOADER_CONTEXT.equals(mClassLoaderContext); } @VisibleForTesting /* package */ boolean isVariableClassLoaderContext() { public boolean isVariableClassLoaderContext() { return VARIABLE_CLASS_LOADER_CONTEXT.equals(mClassLoaderContext); } } Loading