From 99b69c55c359ecc5855ae7333bb85e05a16cfc99 Mon Sep 17 00:00:00 2001 From: Phil Nguyen Date: Mon, 21 Mar 2022 22:59:51 +0000 Subject: Remove "Cpu startup" feature flag Fixes: 162493986 Test: existing Change-Id: I832ef01e659d79b900c93bc2644e795981178799 --- .../src/com/android/tools/profilers/FeatureConfig.java | 1 - .../src/com/android/tools/profilers/StudioProfilers.java | 4 ---- .../android/tools/profilers/FakeIdeProfilerServices.java | 14 -------------- .../com/android/tools/profilers/StudioProfilersTest.java | 2 -- 4 files changed, 21 deletions(-) (limited to 'profilers') diff --git a/profilers/src/com/android/tools/profilers/FeatureConfig.java b/profilers/src/com/android/tools/profilers/FeatureConfig.java index 997ce12a3da..f88a664e1df 100644 --- a/profilers/src/com/android/tools/profilers/FeatureConfig.java +++ b/profilers/src/com/android/tools/profilers/FeatureConfig.java @@ -30,7 +30,6 @@ public interface FeatureConfig { boolean isProfileableBuildsEnabled(); - boolean isStartupCpuProfilingEnabled(); boolean isUnifiedPipelineEnabled(); // Add new features alphabetically instead of at the end of the list // This reduces the chance of having to deal with an annoying merge conflict. diff --git a/profilers/src/com/android/tools/profilers/StudioProfilers.java b/profilers/src/com/android/tools/profilers/StudioProfilers.java index 056ec2b861f..0a8a8cc4ccf 100644 --- a/profilers/src/com/android/tools/profilers/StudioProfilers.java +++ b/profilers/src/com/android/tools/profilers/StudioProfilers.java @@ -725,10 +725,6 @@ public class StudioProfilers extends AspectModel implements Upda * Checks whether startup CPU Profiling started for the selected session by making RPC call to perfd. */ private boolean startupCpuProfilingStarted() { - if (!getIdeServices().getFeatureConfig().isStartupCpuProfilingEnabled()) { - return false; - } - List traceInfoList = CpuProfiler.getTraceInfoFromSession(myClient, mySelectedSession, myIdeServices.getFeatureConfig().isUnifiedPipelineEnabled()); if (!traceInfoList.isEmpty()) { diff --git a/profilers/testSrc/com/android/tools/profilers/FakeIdeProfilerServices.java b/profilers/testSrc/com/android/tools/profilers/FakeIdeProfilerServices.java index d3ec5ca36c9..2561730ad36 100644 --- a/profilers/testSrc/com/android/tools/profilers/FakeIdeProfilerServices.java +++ b/profilers/testSrc/com/android/tools/profilers/FakeIdeProfilerServices.java @@ -109,11 +109,6 @@ public final class FakeIdeProfilerServices implements IdeProfilerServices { */ private boolean myShouldProceedYesNoDialog = false; - /** - * Can toggle for tests via {@link #enableStartupCpuProfiling(boolean)}, but each test starts with this defaulted to false. - */ - private boolean myStartupCpuProfilingEnabled = false; - /** * Whether the new pipeline is used or the old one for devices / processes / sessions. */ @@ -272,11 +267,6 @@ public final class FakeIdeProfilerServices implements IdeProfilerServices { return myCustomEventVisualizationEnabled; } - @Override - public boolean isStartupCpuProfilingEnabled() { - return myStartupCpuProfilingEnabled; - } - @Override public boolean isUnifiedPipelineEnabled() { return myEventsPipelineEnabled; @@ -445,10 +435,6 @@ public final class FakeIdeProfilerServices implements IdeProfilerServices { myIsJankDetectionUiEnabled = enabled; } - public void enableStartupCpuProfiling(boolean enabled) { - myStartupCpuProfilingEnabled = enabled; - } - public void enableEventsPipeline(boolean enabled) { myEventsPipelineEnabled = enabled; } diff --git a/profilers/testSrc/com/android/tools/profilers/StudioProfilersTest.java b/profilers/testSrc/com/android/tools/profilers/StudioProfilersTest.java index 86bbfefe26a..a174865a9a2 100644 --- a/profilers/testSrc/com/android/tools/profilers/StudioProfilersTest.java +++ b/profilers/testSrc/com/android/tools/profilers/StudioProfilersTest.java @@ -646,8 +646,6 @@ public final class StudioProfilersTest { @Test public void shouldOpenCpuProfileStageIfStartupProfilingStarted() { - myIdeProfilerServices.enableStartupCpuProfiling(true); - Common.Device device = createDevice(AndroidVersion.VersionCodes.BASE, "FakeDevice", Common.Device.State.ONLINE); Common.Process process = createProcess(device.getDeviceId(), 20, "FakeProcess", Common.Process.State.ALIVE); -- cgit v1.2.3