summaryrefslogtreecommitdiff
path: root/profilers
diff options
context:
space:
mode:
authorPhil Nguyen <philnguyen@google.com>2022-03-21 22:59:51 +0000
committerPhil Nguyen <philnguyen@google.com>2022-03-29 13:42:03 -0700
commit99b69c55c359ecc5855ae7333bb85e05a16cfc99 (patch)
tree749c507659a68d0573c75e7ed6700c98b48292e1 /profilers
parentaf82981ea1bc147ce2de0caf374667b3830e6f0f (diff)
downloadidea-99b69c55c359ecc5855ae7333bb85e05a16cfc99.tar.gz
Remove "Cpu startup" feature flag
Fixes: 162493986 Test: existing Change-Id: I832ef01e659d79b900c93bc2644e795981178799
Diffstat (limited to 'profilers')
-rw-r--r--profilers/src/com/android/tools/profilers/FeatureConfig.java1
-rw-r--r--profilers/src/com/android/tools/profilers/StudioProfilers.java4
-rw-r--r--profilers/testSrc/com/android/tools/profilers/FakeIdeProfilerServices.java14
-rw-r--r--profilers/testSrc/com/android/tools/profilers/StudioProfilersTest.java2
4 files changed, 0 insertions, 21 deletions
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<ProfilerAspect> 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<Cpu.CpuTraceInfo> 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
@@ -110,11 +110,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.
*/
private boolean myEventsPipelineEnabled = false;
@@ -273,11 +268,6 @@ public final class FakeIdeProfilerServices implements IdeProfilerServices {
}
@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);