Bug 1563242 - TelemetryEvent's GetEventRecordsForProcess takes an EventKey but doesn't use it, r=janerik
authorAlok Nikhil <aloknnikhil@gmail.com>
Mon, 14 Oct 2019 08:51:28 +0000
changeset 497388 afd4a2504dc779af4d47d8294cdc90fe06dfada2
parent 497387 aac323190bccc872933f938ab610db59121b8fe0
child 497389 49422c0bd800d5ab7a618ffcaa2855026cbfa931
push id97861
push userjrediger@mozilla.com
push dateMon, 14 Oct 2019 08:52:01 +0000
treeherderautoland@afd4a2504dc7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjanerik
bugs1563242
milestone71.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 1563242 - TelemetryEvent's GetEventRecordsForProcess takes an EventKey but doesn't use it, r=janerik Differential Revision: https://phabricator.services.mozilla.com/D48802
toolkit/components/telemetry/core/TelemetryEvent.cpp
--- a/toolkit/components/telemetry/core/TelemetryEvent.cpp
+++ b/toolkit/components/telemetry/core/TelemetryEvent.cpp
@@ -366,18 +366,17 @@ bool CanRecordEvent(const StaticMutexAut
   }
 
   return true;
 }
 
 bool IsExpired(const EventKey& key) { return key.id == kExpiredEventId; }
 
 EventRecordArray* GetEventRecordsForProcess(const StaticMutexAutoLock& lock,
-                                            ProcessID processType,
-                                            const EventKey& eventKey) {
+                                            ProcessID processType) {
   EventRecordArray* eventRecords = nullptr;
   if (!gEventRecords.Get(uint32_t(processType), &eventRecords)) {
     eventRecords = new EventRecordArray();
     gEventRecords.Put(uint32_t(processType), eventRecords);
   }
   return eventRecords;
 }
 
@@ -472,18 +471,17 @@ RecordEventResult RecordEvent(const Stat
   }
 
   static bool sEventPingEnabled = mozilla::Preferences::GetBool(
       "toolkit.telemetry.eventping.enabled", true);
   if (!sEventPingEnabled) {
     return RecordEventResult::Ok;
   }
 
-  EventRecordArray* eventRecords =
-      GetEventRecordsForProcess(lock, processType, *eventKey);
+  EventRecordArray* eventRecords = GetEventRecordsForProcess(lock, processType);
   eventRecords->AppendElement(EventRecord(timestamp, *eventKey, value, extra));
 
   // Notify observers when we hit the "event" ping event record limit.
   static uint32_t sEventPingLimit = mozilla::Preferences::GetUint(
       "toolkit.telemetry.eventping.eventLimit", 1000);
   if (eventRecords->Length() == sEventPingLimit) {
     return RecordEventResult::StorageLimitReached;
   }