Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c08069b8 authored by Kevin Jeon's avatar Kevin Jeon
Browse files

Annotate dump methods with @NeverCompile [4/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: I07a13fbd72c84229ac42c3779abc352ba3f8086c
parent ce48a19f
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -103,6 +103,8 @@ import com.android.internal.util.FrameworkStatsLog;
import com.android.internal.util.IndentingPrintWriter;
import com.android.server.am.BatteryStatsService;

import dalvik.annotation.optimization.NeverCompile;

import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.util.ArrayList;
@@ -2879,6 +2881,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
        }
    }

    @NeverCompile // Avoid size overhead of debugging code.
    @Override
    public void dump(FileDescriptor fd, PrintWriter writer, String[] args) {
        final IndentingPrintWriter pw = new IndentingPrintWriter(writer, "  ");
+3 −0
Original line number Diff line number Diff line
@@ -37,6 +37,8 @@ import com.android.internal.util.ArrayUtils;
import com.android.internal.util.IndentingPrintWriter;
import com.android.server.pm.verify.domain.proxy.DomainVerificationProxy;

import dalvik.annotation.optimization.NeverCompile;

import java.io.FileDescriptor;
import java.io.PrintWriter;

@@ -50,6 +52,7 @@ final class DumpHelper {
        mPm = pm;
    }

    @NeverCompile // Avoid size overhead of debugging code.
    public void doDump(FileDescriptor fd, PrintWriter pw, String[] args) {
        DumpState dumpState = new DumpState();
        ArraySet<String> permissionNames = null;
+3 −0
Original line number Diff line number Diff line
@@ -134,6 +134,8 @@ import com.android.server.utils.WatchedSparseArray;
import com.android.server.utils.WatchedSparseIntArray;
import com.android.server.utils.Watcher;

import dalvik.annotation.optimization.NeverCompile;

import libcore.io.IoUtils;

import org.xmlpull.v1.XmlPullParser;
@@ -4472,6 +4474,7 @@ public final class Settings implements Watchable, Snappable {
        pw.decreaseIndent();
    }

    @NeverCompile // Avoid size overhead of debugging code.
    void dumpPackageLPr(PrintWriter pw, String prefix, String checkinTag,
            ArraySet<String> permissionNames, PackageSetting ps,
            LegacyPermissionState permissionsState, SimpleDateFormat sdf, Date date,