Loading services/core/java/com/android/server/pm/PackageManagerShellCommand.java +33 −15 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ import android.os.Build; import android.os.Bundle; import android.os.RemoteException; import android.os.ShellCommand; import android.os.SystemProperties; import android.os.UserHandle; import android.text.TextUtils; import android.util.PrintWriterPrinter; Loading Loading @@ -249,12 +250,13 @@ class PackageManagerShellCommand extends ShellCommand { private int runCompile() throws RemoteException { final PrintWriter pw = getOutPrintWriter(); boolean useJitProfiles = false; boolean checkProfiles = SystemProperties.getBoolean("dalvik.vm.usejitprofiles", false); boolean forceCompilation = false; boolean allPackages = false; boolean clearProfileData = false; String compilerFilter = null; String compilationReason = null; String checkProfilesRaw = null; if (peekNextArg() == null) { // No arguments, show help. Loading @@ -263,6 +265,8 @@ class PackageManagerShellCommand extends ShellCommand { pw.println(); pw.println(" -c Clear profile data"); pw.println(" -f Force compilation"); pw.println(" --check-prof val Look at profiles when doing dexopt."); pw.println(" Overrides dalvik.vm.usejitprofiles to true of false"); pw.println(" --reset Reset package"); pw.println(" -m mode Compilation mode, one of the dex2oat compiler filters"); pw.println(" verify-none"); Loading Loading @@ -301,6 +305,9 @@ class PackageManagerShellCommand extends ShellCommand { case "-r": compilationReason = getNextArgRequired(); break; case "-check-prof": checkProfilesRaw = getNextArgRequired(); break; case "--reset": forceCompilation = true; clearProfileData = true; Loading @@ -312,6 +319,17 @@ class PackageManagerShellCommand extends ShellCommand { } } if (checkProfilesRaw != null) { if ("true".equals(checkProfilesRaw)) { checkProfiles = true; } else if ("false".equals(checkProfilesRaw)) { checkProfiles = false; } else { pw.println("Invalid value for \"--check-prof\". Expected \"true\" or \"false\"."); return 1; } } if (compilerFilter != null && compilationReason != null) { pw.println("Cannot use compilation filter (\"-m\") and compilation reason (\"-r\") " + "at the same time"); Loading Loading @@ -381,7 +399,7 @@ class PackageManagerShellCommand extends ShellCommand { } boolean result = mInterface.performDexOptMode(packageName, null /* instructionSet */, useJitProfiles, targetCompilerFilter, forceCompilation); checkProfiles, targetCompilerFilter, forceCompilation); if (!result) { failedPackages.add(packageName); } Loading Loading
services/core/java/com/android/server/pm/PackageManagerShellCommand.java +33 −15 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ import android.os.Build; import android.os.Bundle; import android.os.RemoteException; import android.os.ShellCommand; import android.os.SystemProperties; import android.os.UserHandle; import android.text.TextUtils; import android.util.PrintWriterPrinter; Loading Loading @@ -249,12 +250,13 @@ class PackageManagerShellCommand extends ShellCommand { private int runCompile() throws RemoteException { final PrintWriter pw = getOutPrintWriter(); boolean useJitProfiles = false; boolean checkProfiles = SystemProperties.getBoolean("dalvik.vm.usejitprofiles", false); boolean forceCompilation = false; boolean allPackages = false; boolean clearProfileData = false; String compilerFilter = null; String compilationReason = null; String checkProfilesRaw = null; if (peekNextArg() == null) { // No arguments, show help. Loading @@ -263,6 +265,8 @@ class PackageManagerShellCommand extends ShellCommand { pw.println(); pw.println(" -c Clear profile data"); pw.println(" -f Force compilation"); pw.println(" --check-prof val Look at profiles when doing dexopt."); pw.println(" Overrides dalvik.vm.usejitprofiles to true of false"); pw.println(" --reset Reset package"); pw.println(" -m mode Compilation mode, one of the dex2oat compiler filters"); pw.println(" verify-none"); Loading Loading @@ -301,6 +305,9 @@ class PackageManagerShellCommand extends ShellCommand { case "-r": compilationReason = getNextArgRequired(); break; case "-check-prof": checkProfilesRaw = getNextArgRequired(); break; case "--reset": forceCompilation = true; clearProfileData = true; Loading @@ -312,6 +319,17 @@ class PackageManagerShellCommand extends ShellCommand { } } if (checkProfilesRaw != null) { if ("true".equals(checkProfilesRaw)) { checkProfiles = true; } else if ("false".equals(checkProfilesRaw)) { checkProfiles = false; } else { pw.println("Invalid value for \"--check-prof\". Expected \"true\" or \"false\"."); return 1; } } if (compilerFilter != null && compilationReason != null) { pw.println("Cannot use compilation filter (\"-m\") and compilation reason (\"-r\") " + "at the same time"); Loading Loading @@ -381,7 +399,7 @@ class PackageManagerShellCommand extends ShellCommand { } boolean result = mInterface.performDexOptMode(packageName, null /* instructionSet */, useJitProfiles, targetCompilerFilter, forceCompilation); checkProfiles, targetCompilerFilter, forceCompilation); if (!result) { failedPackages.add(packageName); } Loading