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

Commit c9342849 authored by Hector Dearman's avatar Hector Dearman
Browse files

perfetto: Add setting to enable/disable traced

This will help us run P/H experiments by controlling the
whether traced runs through P/H.

This will allow to gradually roll out traced and, in an
emergency, remotely disable it.

Run:
$ adb shell 'ps -A | grep traced'
Should see traced.
$ adb shell 'settings put global sys_traced 0'
$ adb shell 'ps -A | grep traced'
Should no longer see traced.

Test: See above.
Bug: b/71737179
Change-Id: I1f564421d9abae14d7d80769e9517eb363dae33a
parent 757fb482
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -10374,6 +10374,17 @@ public final class Settings {
        */
        public static final String SYS_UIDCPUPOWER = "sys_uidcpupower";

        /**
        * traced global setting. This controls weather the deamons: traced and
        * traced_probes run. This links the sys.traced system property.
        * The following values are supported:
        * 0 -> traced and traced_probes are disabled
        * 1 -> traced and traced_probes are enabled
        * Any other value defaults to disabled.
        * @hide
        */
        public static final String SYS_TRACED = "sys_traced";

        /**
         * An integer to reduce the FPS by this factor. Only for experiments. Need to reboot the
         * device for this setting to take full effect.
+1 −0
Original line number Diff line number Diff line
@@ -382,6 +382,7 @@ public class SettingsBackupTest {
                    Settings.Global.SYS_STORAGE_THRESHOLD_PERCENTAGE,
                    Settings.Global.SYS_VDSO,
                    Settings.Global.SYS_UIDCPUPOWER,
                    Settings.Global.SYS_TRACED,
                    Settings.Global.FPS_DEVISOR,
                    Settings.Global.TCP_DEFAULT_INIT_RWND,
                    Settings.Global.TETHER_DUN_APN,
+1 −0
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ class GlobalSettingsToPropertiesMapper {
        {Settings.Global.FPS_DEVISOR, ThreadedRenderer.DEBUG_FPS_DIVISOR},
        {Settings.Global.DISPLAY_PANEL_LPM, "sys.display_panel_lpm"},
        {Settings.Global.SYS_UIDCPUPOWER, "sys.uidcpupower"},
        {Settings.Global.SYS_TRACED, "persist.traced.enable"},
    };