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