Bug 1444430 - Add a profiler feature called "screenshots". r?njn draft
authorMarkus Stange <mstange@themasta.com>
Thu, 12 Apr 2018 15:21:40 -0400
changeset 781248 396824d9633fbc9c78c5ab5c798b159281f2edb8
parent 781247 aea18715f6f1acaace3f631bc1760dce2bffe23c
child 781249 fecc634525ebe8c2af1201f05258c591378a0195
push id106255
push userbmo:mstange@themasta.com
push dateThu, 12 Apr 2018 19:45:02 +0000
reviewersnjn
bugs1444430
milestone61.0a1
Bug 1444430 - Add a profiler feature called "screenshots". r?njn MozReview-Commit-ID: 8blNvvliuog
browser/components/extensions/schemas/geckoProfiler.json
tools/profiler/public/GeckoProfiler.h
--- a/browser/components/extensions/schemas/geckoProfiler.json
+++ b/browser/components/extensions/schemas/geckoProfiler.json
@@ -25,16 +25,17 @@
         "enum": [
           "java",
           "js",
           "leaf",
           "mainthreadio",
           "memory",
           "privacy",
           "restyle",
+          "screenshots",
           "stackwalk",
           "tasktracer",
           "threads",
           "trackopts"
         ]
       }
     ],
     "functions": [
--- a/tools/profiler/public/GeckoProfiler.h
+++ b/tools/profiler/public/GeckoProfiler.h
@@ -116,27 +116,30 @@ class TimeStamp;
   macro(4, "memory", Memory) \
   \
   /* Do not include user-identifiable information. */ \
   macro(5, "privacy", Privacy) \
   \
   /* Restyle profiling. */ \
   macro(6, "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(7, "stackwalk", StackWalk) \
+  macro(8, "stackwalk", StackWalk) \
   \
   /* Start profiling with feature TaskTracer. */ \
-  macro(8, "tasktracer", TaskTracer) \
+  macro(9, "tasktracer", TaskTracer) \
   \
   /* Profile the registered secondary threads. */ \
-  macro(9, "threads", Threads) \
+  macro(10, "threads", Threads) \
   \
   /* Have the JavaScript engine track JIT optimizations. */ \
-  macro(10, "trackopts", TrackOptimizations)
+  macro(11, "trackopts", TrackOptimizations)
 
 struct ProfilerFeature
 {
   #define DECLARE(n_, str_, Name_) \
     static const uint32_t Name_ = (1u << n_); \
     static bool Has##Name_(uint32_t aFeatures) { return aFeatures & Name_; } \
     static void Set##Name_(uint32_t& aFeatures) { aFeatures |= Name_; } \
     static void Clear##Name_(uint32_t& aFeatures) { aFeatures &= ~Name_; }