Bug 1463408 part 1 - Remove unused restyle profiler feature. r?mstange draft
authorXidorn Quan <me@upsuper.org>
Wed, 23 May 2018 19:34:23 +1000 (2018-05-23)
changeset 799150 ad9b870e4680cdf629f5be224ae8f99d2792cb89
parent 799141 4235e0be5cdf1c3d410ce28c38c8da1ad7cd74c0
child 799151 dcade557435696733f7be4cd43539cd96e819e9e
push id110939
push userxquan@mozilla.com
push dateThu, 24 May 2018 01:22:29 +0000 (2018-05-24)
reviewersmstange
bugs1463408
milestone62.0a1
Bug 1463408 part 1 - Remove unused restyle profiler feature. r?mstange MozReview-Commit-ID: F5i5W02jhEV
browser/components/extensions/schemas/geckoProfiler.json
tools/profiler/public/GeckoProfiler.h
tools/profiler/tests/gtest/GeckoProfiler.cpp
--- a/browser/components/extensions/schemas/geckoProfiler.json
+++ b/browser/components/extensions/schemas/geckoProfiler.json
@@ -25,17 +25,16 @@
         "enum": [
           "java",
           "js",
           "leaf",
           "mainthreadio",
           "memory",
           "privacy",
           "responsiveness",
-          "restyle",
           "screenshots",
           "stackwalk",
           "tasktracer",
           "threads",
           "trackopts"
         ]
       }
     ],
--- a/tools/profiler/public/GeckoProfiler.h
+++ b/tools/profiler/public/GeckoProfiler.h
@@ -120,19 +120,16 @@ class TimeStamp;
   macro(4, "memory", Memory) \
   \
   /* Do not include user-identifiable information. */ \
   macro(5, "privacy", Privacy) \
   \
   /* Collect thread responsiveness information. */ \
   macro(6, "responsiveness", Responsiveness) \
   \
-  /* Restyle profiling. */ \
-  macro(7, "restyle", Restyle) \
-  \
   /* Take a snapshot of the window on every composition. */ \
   macro(7, "screenshots", Screenshots) \
   \
   /* Walk the C++ stack. Not available on all platforms. */ \
   macro(8, "stackwalk", StackWalk) \
   \
   /* Start profiling with feature TaskTracer. */ \
   macro(9, "tasktracer", TaskTracer) \
--- a/tools/profiler/tests/gtest/GeckoProfiler.cpp
+++ b/tools/profiler/tests/gtest/GeckoProfiler.cpp
@@ -37,17 +37,16 @@ InactiveFeaturesAndParamsCheck()
   int entries;
   double interval;
   uint32_t features;
   StrVec filters;
 
   ASSERT_TRUE(!profiler_is_active());
   ASSERT_TRUE(!profiler_feature_active(ProfilerFeature::MainThreadIO));
   ASSERT_TRUE(!profiler_feature_active(ProfilerFeature::Privacy));
-  ASSERT_TRUE(!profiler_feature_active(ProfilerFeature::Restyle));
 
   profiler_get_start_params(&entries, &interval, &features, &filters);
 
   ASSERT_TRUE(entries == 0);
   ASSERT_TRUE(interval == 0);
   ASSERT_TRUE(features == 0);
   ASSERT_TRUE(filters.empty());
 }
@@ -82,17 +81,16 @@ TEST(GeckoProfiler, FeaturesAndParams)
     const char* filters[] = { "GeckoMain", "Compositor" };
 
     profiler_start(PROFILER_DEFAULT_ENTRIES, PROFILER_DEFAULT_INTERVAL,
                    features, filters, MOZ_ARRAY_LENGTH(filters));
 
     ASSERT_TRUE(profiler_is_active());
     ASSERT_TRUE(!profiler_feature_active(ProfilerFeature::MainThreadIO));
     ASSERT_TRUE(!profiler_feature_active(ProfilerFeature::Privacy));
-    ASSERT_TRUE(!profiler_feature_active(ProfilerFeature::Restyle));
 
     ActiveParamsCheck(PROFILER_DEFAULT_ENTRIES, PROFILER_DEFAULT_INTERVAL,
                       features, filters, MOZ_ARRAY_LENGTH(filters));
 
     profiler_stop();
 
     InactiveFeaturesAndParamsCheck();
   }
@@ -104,17 +102,16 @@ TEST(GeckoProfiler, FeaturesAndParams)
     const char* filters[] = { "GeckoMain", "Foo", "Bar" };
 
     profiler_start(999999, 3,
                    features, filters, MOZ_ARRAY_LENGTH(filters));
 
     ASSERT_TRUE(profiler_is_active());
     ASSERT_TRUE(profiler_feature_active(ProfilerFeature::MainThreadIO));
     ASSERT_TRUE(profiler_feature_active(ProfilerFeature::Privacy));
-    ASSERT_TRUE(!profiler_feature_active(ProfilerFeature::Restyle));
 
     // Profiler::Threads is added because filters has multiple entries.
     ActiveParamsCheck(999999, 3,
                       features | ProfilerFeature::Threads,
                       filters, MOZ_ARRAY_LENGTH(filters));
 
     profiler_stop();
 
@@ -127,17 +124,16 @@ TEST(GeckoProfiler, FeaturesAndParams)
     const char* filters[] = { "" };
 
     profiler_start(88888, 10,
                    availableFeatures, filters, MOZ_ARRAY_LENGTH(filters));
 
     ASSERT_TRUE(profiler_is_active());
     ASSERT_TRUE(profiler_feature_active(ProfilerFeature::MainThreadIO));
     ASSERT_TRUE(profiler_feature_active(ProfilerFeature::Privacy));
-    ASSERT_TRUE(profiler_feature_active(ProfilerFeature::Restyle));
 
     ActiveParamsCheck(88888, 10,
                       availableFeatures, filters, MOZ_ARRAY_LENGTH(filters));
 
     // Don't call profiler_stop() here.
   }
 
   // Try no features, and filters that match no threads.
@@ -148,17 +144,16 @@ TEST(GeckoProfiler, FeaturesAndParams)
     // Second profiler_start() call in a row without an intervening
     // profiler_stop(); this will do an implicit profiler_stop() and restart.
     profiler_start(0, 0,
                    features, filters, MOZ_ARRAY_LENGTH(filters));
 
     ASSERT_TRUE(profiler_is_active());
     ASSERT_TRUE(!profiler_feature_active(ProfilerFeature::MainThreadIO));
     ASSERT_TRUE(!profiler_feature_active(ProfilerFeature::Privacy));
-    ASSERT_TRUE(!profiler_feature_active(ProfilerFeature::Restyle));
 
     // Entries and intervals go to defaults if 0 is specified.
     ActiveParamsCheck(PROFILER_DEFAULT_ENTRIES, PROFILER_DEFAULT_INTERVAL,
                       features | ProfilerFeature::Threads,
                       filters, MOZ_ARRAY_LENGTH(filters));
 
     profiler_stop();
 
@@ -262,17 +257,16 @@ TEST(GeckoProfiler, DifferentThreads)
                                               filters,
                                               MOZ_ARRAY_LENGTH(filters));
                              }),
       NS_DISPATCH_SYNC);
 
     ASSERT_TRUE(profiler_is_active());
     ASSERT_TRUE(!profiler_feature_active(ProfilerFeature::MainThreadIO));
     ASSERT_TRUE(!profiler_feature_active(ProfilerFeature::Privacy));
-    ASSERT_TRUE(!profiler_feature_active(ProfilerFeature::Restyle));
 
     ActiveParamsCheck(PROFILER_DEFAULT_ENTRIES, PROFILER_DEFAULT_INTERVAL,
                       features, filters, MOZ_ARRAY_LENGTH(filters));
 
     thread->Dispatch(
       NS_NewRunnableFunction("GeckoProfiler_DifferentThreads_Test::TestBody",
                              [&]() { profiler_stop(); }),
       NS_DISPATCH_SYNC);
@@ -291,17 +285,16 @@ TEST(GeckoProfiler, DifferentThreads)
 
     thread->Dispatch(
       NS_NewRunnableFunction(
         "GeckoProfiler_DifferentThreads_Test::TestBody",
         [&]() {
           ASSERT_TRUE(profiler_is_active());
           ASSERT_TRUE(!profiler_feature_active(ProfilerFeature::MainThreadIO));
           ASSERT_TRUE(!profiler_feature_active(ProfilerFeature::Privacy));
-          ASSERT_TRUE(!profiler_feature_active(ProfilerFeature::Restyle));
 
           ActiveParamsCheck(PROFILER_DEFAULT_ENTRIES,
                             PROFILER_DEFAULT_INTERVAL,
                             features,
                             filters,
                             MOZ_ARRAY_LENGTH(filters));
         }),
       NS_DISPATCH_SYNC);