Bug 1595482: change "responsiveness" field to "eventDelay" in profiler r=canaltinova
☠☠ backed out by 76886efb06b4 ☠ ☠
authorRandell Jesup <rjesup@wgate.com>
Wed, 13 Nov 2019 14:21:52 +0000
changeset 501744 70738ac7ba9b76a586cedc22ca11e02ebf659f16
parent 501743 be6ff7053ebe1e620a8a57af13bb6b6c11aab4a0
child 501745 149d044837d69f645972cc10319baee944cd121b
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscanaltinova
bugs1595482
milestone72.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1595482: change "responsiveness" field to "eventDelay" in profiler r=canaltinova We want the profiler UI to be able to know if the data can be used for reconstructing the event delays, since it measures something different from the old 16ms event injection. Differential Revision: https://phabricator.services.mozilla.com/D52534
mozglue/baseprofiler/core/ProfileBufferEntry.cpp
mozglue/baseprofiler/core/ProfileBufferEntry.h
mozglue/baseprofiler/core/ProfiledThreadData.cpp
tools/profiler/core/ProfileBufferEntry.cpp
tools/profiler/core/ProfileBufferEntry.h
tools/profiler/core/ProfiledThreadData.cpp
tools/profiler/core/platform.cpp
--- a/mozglue/baseprofiler/core/ProfileBufferEntry.cpp
+++ b/mozglue/baseprofiler/core/ProfileBufferEntry.cpp
@@ -342,27 +342,27 @@ struct ProfileSample {
 };
 
 static void WriteSample(SpliceableJSONWriter& aWriter,
                         UniqueJSONStrings& aUniqueStrings,
                         const ProfileSample& aSample) {
   enum Schema : uint32_t {
     STACK = 0,
     TIME = 1,
-    RESPONSIVENESS = 2,
+    EVENT_DELAY = 2,
   };
 
   AutoArraySchemaWriter writer(aWriter, aUniqueStrings);
 
   writer.IntElement(STACK, aSample.mStack);
 
   writer.DoubleElement(TIME, aSample.mTime);
 
   if (aSample.mResponsiveness.isSome()) {
-    writer.DoubleElement(RESPONSIVENESS, *aSample.mResponsiveness);
+    writer.DoubleElement(EVENT_DELAY, *aSample.mResponsiveness);
   }
 }
 
 class EntryGetter {
  public:
   explicit EntryGetter(BlocksRingBuffer::Reader& aReader,
                        uint64_t aInitialReadPos = 0)
       : mBlockIt(aReader.At(
--- a/mozglue/baseprofiler/core/ProfileBufferEntry.h
+++ b/mozglue/baseprofiler/core/ProfileBufferEntry.h
@@ -314,21 +314,21 @@ class UniqueStacks {
 //   "name": "Foo",
 //   "tid": 42,
 //   "samples":
 //   {
 //     "schema":
 //     {
 //       "stack": 0,          /* index into stackTable */
 //       "time": 1,           /* number */
-//       "responsiveness": 2, /* number */
+//       "eventDelay": 2, /* number */
 //     },
 //     "data":
 //     [
-//       [ 1, 0.0, 0.0 ]      /* { stack: 1, time: 0.0, responsiveness: 0.0 } */
+//       [ 1, 0.0, 0.0 ]      /* { stack: 1, time: 0.0, eventDelay: 0.0 } */
 //     ]
 //   },
 //
 //   "markers":
 //   {
 //     "schema":
 //     {
 //       "name": 0,           /* index into stringTable */
--- a/mozglue/baseprofiler/core/ProfiledThreadData.cpp
+++ b/mozglue/baseprofiler/core/ProfiledThreadData.cpp
@@ -120,17 +120,17 @@ void StreamSamplesAndMarkers(const char*
   }
 
   aWriter.StartObjectProperty("samples");
   {
     {
       JSONSchemaWriter schema(aWriter);
       schema.WriteField("stack");
       schema.WriteField("time");
-      schema.WriteField("responsiveness");
+      schema.WriteField("eventDelay");
     }
 
     aWriter.StartArrayProperty("data");
     {
       aBuffer.StreamSamplesToJSON(aWriter, aThreadId, aSinceTime,
                                   aUniqueStacks);
     }
     aWriter.EndArray();
--- a/tools/profiler/core/ProfileBufferEntry.cpp
+++ b/tools/profiler/core/ProfileBufferEntry.cpp
@@ -689,27 +689,27 @@ struct ProfileSample {
 };
 
 static void WriteSample(SpliceableJSONWriter& aWriter,
                         UniqueJSONStrings& aUniqueStrings,
                         const ProfileSample& aSample) {
   enum Schema : uint32_t {
     STACK = 0,
     TIME = 1,
-    RESPONSIVENESS = 2,
+    EVENT_DELAY = 2,
   };
 
   AutoArraySchemaWriter writer(aWriter, aUniqueStrings);
 
   writer.IntElement(STACK, aSample.mStack);
 
   writer.DoubleElement(TIME, aSample.mTime);
 
   if (aSample.mResponsiveness.isSome()) {
-    writer.DoubleElement(RESPONSIVENESS, *aSample.mResponsiveness);
+    writer.DoubleElement(EVENT_DELAY, *aSample.mResponsiveness);
   }
 }
 
 class EntryGetter {
  public:
   explicit EntryGetter(BlocksRingBuffer::Reader& aReader,
                        uint64_t aInitialReadPos = 0)
       : mBlockIt(aReader.At(
--- a/tools/profiler/core/ProfileBufferEntry.h
+++ b/tools/profiler/core/ProfileBufferEntry.h
@@ -452,21 +452,21 @@ class UniqueStacks {
 //   "name": "Foo",
 //   "tid": 42,
 //   "samples":
 //   {
 //     "schema":
 //     {
 //       "stack": 0,          /* index into stackTable */
 //       "time": 1,           /* number */
-//       "responsiveness": 2, /* number */
+//       "eventDelay": 2,     /* number */
 //     },
 //     "data":
 //     [
-//       [ 1, 0.0, 0.0 ]      /* { stack: 1, time: 0.0, responsiveness: 0.0 } */
+//       [ 1, 0.0, 0.0 ]      /* { stack: 1, time: 0.0, eventDelay: 0.0 } */
 //     ]
 //   },
 //
 //   "markers":
 //   {
 //     "schema":
 //     {
 //       "name": 0,           /* index into stringTable */
--- a/tools/profiler/core/ProfiledThreadData.cpp
+++ b/tools/profiler/core/ProfiledThreadData.cpp
@@ -237,17 +237,17 @@ void StreamSamplesAndMarkers(const char*
   }
 
   aWriter.StartObjectProperty("samples");
   {
     {
       JSONSchemaWriter schema(aWriter);
       schema.WriteField("stack");
       schema.WriteField("time");
-      schema.WriteField("responsiveness");
+      schema.WriteField("eventDelay");
     }
 
     aWriter.StartArrayProperty("data");
     {
       aBuffer.StreamSamplesToJSON(aWriter, aThreadId, aSinceTime,
                                   aUniqueStacks);
     }
     aWriter.EndArray();
--- a/tools/profiler/core/platform.cpp
+++ b/tools/profiler/core/platform.cpp
@@ -2872,17 +2872,17 @@ void SamplerThread::Run() {
             // Suspend the thread and collect its stack data in the local
             // buffer.
             mSampler.SuspendAndSampleAndResumeThread(
                 lock, *registeredThread, now,
                 [&](const Registers& aRegs, const TimeStamp& aNow) {
                   DoPeriodicSample(lock, *registeredThread, *profiledThreadData,
                                    now, aRegs, samplePos, localProfileBuffer);
 
-                  // For "responsiveness", we want the input delay - but if
+                  // For "eventDelay", we want the input delay - but if
                   // there are no events in the input queue (or even if there
                   // are), we're interested in how long the delay *would* be for
                   // an input event now, which would be the time to finish the
                   // current event + the delay caused by any events already in
                   // the input queue (plus any High priority events).  Events at
                   // lower priorities (in a PrioritizedEventQueue) than Input
                   // count for input delay only for the duration that they're
                   // running, since when they finish, any queued input event
@@ -3049,29 +3049,29 @@ void SamplerThread::Run() {
                   // per queue per thread - so there would be a memory impact as
                   // well.
 
                   TimeDuration currentEventDelay;
                   TimeDuration currentEventRunning;
                   registeredThread->GetRunningEventDelay(
                       aNow, currentEventDelay, currentEventRunning);
 
-                  // Note: a different definition of responsiveness than the
-                  // 16ms event injection.
+                  // Note: eventDelay is a different definition of
+                  // responsiveness than the 16ms event injection.
 
                   // Don't suppress 0's for now; that can be a future
                   // optimization.  We probably want one zero to be stored
                   // before we start suppressing, which would be more
                   // complex.
                   unresponsiveDuration_ms =
                       Some(currentEventDelay.ToMilliseconds() +
                            currentEventRunning.ToMilliseconds());
                 });
 
-            // If we got responsiveness data, store it before the CompactStack.
+            // If we got eventDelay data, store it before the CompactStack.
             // Note: It is not stored inside the CompactStack so that it doesn't
             // get incorrectly duplicated when the thread is sleeping.
             if (unresponsiveDuration_ms.isSome()) {
               CorePS::CoreBlocksRingBuffer().PutObjects(
                   ProfileBufferEntry::Kind::UnresponsiveDurationMs,
                   *unresponsiveDuration_ms);
             }