Annotate dump methods with @NeverCompile [3/5]
This change annotates dump/debug methods in services.odex that are
larger than 10000 bytes with NeverCompile so that they will not be
compiled. This results in an overall ~1% decrease in the size of
services.odex.
Bug: 215417388
Test: Build and check that these methods are not called during boot or
app startup.
Change-Id: Idf1417b0157fe8a42b9c9c1874806a7a81dd45cb
This commit is contained in:
@@ -137,6 +137,8 @@ import com.android.server.backup.utils.BackupManagerMonitorUtils;
|
||||
import com.android.server.backup.utils.BackupObserverUtils;
|
||||
import com.android.server.backup.utils.SparseArrayUtils;
|
||||
|
||||
import dalvik.annotation.optimization.NeverCompile;
|
||||
|
||||
import com.google.android.collect.Sets;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
@@ -4072,6 +4074,7 @@ public class UserBackupManagerService {
|
||||
}
|
||||
}
|
||||
|
||||
@NeverCompile // Avoid size overhead of debugging code.
|
||||
private void dumpInternal(PrintWriter pw) {
|
||||
// Add prefix for only non-system users so that system user dumpsys is the same as before
|
||||
String userPrefix = mUserId == UserHandle.USER_SYSTEM ? "" : "User " + mUserId + ":";
|
||||
|
||||
@@ -179,6 +179,8 @@ import com.android.server.SystemServiceManager;
|
||||
import com.android.server.pm.PackageList;
|
||||
import com.android.server.pm.parsing.pkg.AndroidPackage;
|
||||
|
||||
import dalvik.annotation.optimization.NeverCompile;
|
||||
|
||||
import libcore.util.EmptyArray;
|
||||
|
||||
import org.json.JSONException;
|
||||
@@ -5882,6 +5884,7 @@ public class AppOpsService extends IAppOpsService.Stub {
|
||||
}
|
||||
}
|
||||
|
||||
@NeverCompile // Avoid size overhead of debugging code.
|
||||
@Override
|
||||
protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
|
||||
if (!DumpUtils.checkDumpAndUsageStatsPermission(mContext, TAG, pw)) return;
|
||||
|
||||
@@ -125,6 +125,8 @@ import com.android.server.power.batterysaver.BatterySaverPolicy;
|
||||
import com.android.server.power.batterysaver.BatterySaverStateMachine;
|
||||
import com.android.server.power.batterysaver.BatterySavingStats;
|
||||
|
||||
import dalvik.annotation.optimization.NeverCompile;
|
||||
|
||||
import java.io.FileDescriptor;
|
||||
import java.io.PrintWriter;
|
||||
import java.lang.annotation.Retention;
|
||||
@@ -4322,6 +4324,7 @@ public final class PowerManagerService extends SystemService
|
||||
}
|
||||
}
|
||||
|
||||
@NeverCompile // Avoid size overhead of debugging code.
|
||||
private void dumpInternal(PrintWriter pw) {
|
||||
pw.println("POWER MANAGER (dumpsys power)\n");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user