Commit Graph

43 Commits

Author SHA1 Message Date
Nathan Froyd
6d588d66b5 Bug 1443613 - don't allocate temporary strings for DNSRequestChild; r=mayhemer
DNSRequestChild's constructor takes `const nsCString&` parameters.  If
you have a `const nsACString&` argument to pass in to the constructor,
you're forced to construct a temporary nsCString object to satisfy the
prototype.  But the temporary string will just get copied inside the
constructor and you'll have to destroy the temporary string object you
created.

Let's skip all this, and just have DNSRequestChild take `const
nsACString&` arguments instead, and avoid the temporary object.
2018-03-07 12:22:03 -05:00
Nathan Froyd
8b87608a7f Bug 1443587 - part 5 - more efficient string serialization; r=chutten
The code for serializing an EventKey in SerializeEventsArray does
something peculiar: it creates a temporary array of nsCStrings, copies
the appropriate strings from the event info for the key, and then
converts those into JavaScript strings.  But we shouldn't need to do any
copying into the temporary array.  We can do everything directly on the
strings from the event info themselves.

It seemed best to introduce a ToJSString for this purpose, which comes
in handy in a couple other places as well.
2018-03-07 11:00:44 -05:00
Nathan Froyd
7ff41aef97 Bug 1443587 - part 4 - more efficient snapshot creation; r=chutten
Once we've created the array of events for a given process, there's no
need to copy it in the array for all process events.  We can Move() it
instead, which is more efficient.
2018-03-07 11:00:44 -05:00
Nathan Froyd
4fd36b063b Bug 1443587 - part 3 - don't copy ChildEventData; r=chutten
We were copying the event, rather than taking a reference to it.  Let's
do the latter instead of the former.
2018-03-07 11:00:44 -05:00
Nathan Froyd
ede5812d9b Bug 1443587 - part 2 - improve construction of DynamicEventInfos; r=chutten
When constructing DynamicEventInfo, we can require the extra keys to be
passed in by rvalue reference, rather than copying the entire array.
When registering dynamic events, we also don't need to construct an
entirely new nsCString to pass to the constructor; we can simply pass
the nsACString reference we received and go from there.
2018-03-07 11:00:44 -05:00
Nathan Froyd
307d115bba Bug 1443587 - part 1 - make EventInfo string getters return dependent strings; r=chutten
These methods are returning nsCString wrappers for static char arrays;
we only need to return nsDependentCStrings, rather than allocating and
copying entirely new nsCString objects.
2018-03-07 11:00:44 -05:00
rohan
7ff8aad929 Bug 1422035 - Make RegisterEvents assert on children processes. r=Dexter
MozReview-Commit-ID: AnItcTFejUH
2018-01-11 23:23:19 +05:30
Georg Fritzsche
44eb2bb7e2 Bug 1414638 - Remove expiry_date property for Telemetry events. r=dexter 2017-11-08 12:36:33 +01:00
Georg Fritzsche
2d741966e2 Bug 1408975 - Allow to register new addon events for an existing category. r=dexter 2017-11-08 12:36:33 +01:00
Sebastian Hengst
f6d132346f Backed out changeset 82a3eab8a078 (bug 1408975) for eslint failures in test_TelemetryEvents.js (dot notation). r=backout on a CLOSED TREE 2017-11-07 22:25:09 +02:00
Sebastian Hengst
5549711ca3 Backed out changeset a94b8078bb5c (bug 1414638) so bug 1408975 can be backed out. r=backout on a CLOSED TREE 2017-11-07 22:24:24 +02:00
Georg Fritzsche
e1b9821946 Bug 1414638 - Remove expiry_date property for Telemetry events. r=dexter 2017-11-07 20:33:24 +01:00
Georg Fritzsche
31aabe64de Bug 1408975 - Allow to register new addon events for an existing category. r=dexter 2017-11-07 20:33:24 +01:00
Alessio Placitelli
e24412e896 Bug 1393801 - Enable dynamic scalar registration. f=gfritzsche,r=billm,chutten
MozReview-Commit-ID: JlRk7hLV5QD
2017-08-29 13:05:40 +02:00
Georg Fritzsche
9385f14125 Bug 1302681 - Part 1: Extend Event Telemetry core for recording from addons. r=dexter
To cut down on complexity, we don't require specifying any expiry versions.
Given that these events will be recorded non-persistently from off-train add-ons, they can be expired by shipping new add-on releases.

We also start to use the new "record on release" terminology here instead of opt-in/opt-out, but are not changing the internal functionality yet.

Technically, this is implemented by keeping a separate registry for the dynamic event information.
Built-in & dynamic events are tracked with separate numeric ids, so introduce a common identifier for both, an EventKey.
For actual event storage, the events are treated the same as built-in events. They are simply bucketed into the 'dynamic' process storage.
This approach ends up duplicating code paths that use the event info, but keeps a single implementation for recording, storage & serialization.
2017-08-03 07:03:00 -04:00
Georg Fritzsche
940a7067c5 Bug 1361661 - Part 3 - Update the Telemetry core. r=dexter
Updates the core Telemetry code to use the new headers and support the extension process.
TelemetryHistogram is not cleanly refactored here; doing this uncovered a few time consuming issues with the various lookup code paths.
2017-05-23 13:48:13 +07:00
Sebastian Hengst
2d99162f7f Backed out changeset 42a4e28e6210 (bug 1361661) 2017-05-22 20:40:17 +02:00
Georg Fritzsche
ab50d638c5 Bug 1361661 - Part 3: Update the Telemetry core. r=dexter
Updates the core Telemetry code to use the new headers and support the extension process.
TelemetryHistogram is not cleanly refactored here; doing this uncovered a few time consuming issues with the various lookup code paths.
2017-05-22 15:41:14 +07:00
Sebastian Hengst
de9a911353 Backed out changeset d1932fb366d4 (bug 1361661) 2017-05-22 16:19:21 +02:00
Georg Fritzsche
0f76edd4d9 Bug 1361661 - Part 3: Update the Telemetry core. r=dexter
Updates the core Telemetry code to use the new headers and support the extension process.
TelemetryHistogram is not cleanly refactored here; doing this uncovered a few time consuming issues with the various lookup code paths.
2017-05-22 15:41:14 +07:00
Nicholas Nethercote
c768a954ae Bug 1358320 - Make TimeStamp::ProcessCreation()'s outparam optional. r=gsvelto.
TimeStamp::ProcessCreations()'s aIsInconsistent outparam is ignored by the
majority of its caller. This patch makes it optional. Notably, this makes
ProcessCreation() easier to use in a constructor's initializer list.
2017-04-26 14:55:54 +10:00
Georg Fritzsche
49fd6d7993 Bug 1313326 - Part 5 - Use correct child event timestamps. r=dexter, f=chutten 2017-03-06 16:12:56 +01:00
Georg Fritzsche
d8b6b7d1e8 Bug 1313326 - Part 2 - Restrict event recording to specified processes. r=dexter 2017-03-06 16:12:49 +01:00
Georg Fritzsche
3b75819ee9 Bug 1313326 - Part 1 - Support recording events in child processes. r=dexter,froydnj 2017-02-14 14:43:51 +01:00
Sebastian Hengst
939e66513a Backed out changeset a6db4cae9990 (bug 1313326) for failing browser_UsageTelemetry_content.js on Linux x64 asan and debug (at least). r=backout on a CLOSED TREE 2017-03-01 19:48:09 +01:00
Sebastian Hengst
f464fc5724 Backed out changeset 223a0be48369 (bug 1313326) 2017-03-01 19:47:19 +01:00
Sebastian Hengst
b46669f4b3 Backed out changeset 49a7a91b73cc (bug 1313326) 2017-03-01 19:47:05 +01:00
Georg Fritzsche
845c7657c7 Bug 1313326 - Part 5: Use correct child event timestamps. r=dexter, f=chutten 2017-02-28 16:52:53 +01:00
Georg Fritzsche
ab4191da5a Bug 1313326 - Part 2: Restrict event recording to specified processes. r=dexter 2017-02-15 16:59:42 +01:00
Georg Fritzsche
75d3f1d9ef Bug 1313326 - Part 1: Support recording events in child processes. r=dexter, r=froydnj 2017-02-14 14:43:51 +01:00
Georg Fritzsche
2dacbb77e9 Bug 1329139 - Default event recording to disabled. r=dexter 2017-01-13 14:21:56 +07:00
Georg Fritzsche
320d864fe1 Bug 1316281 - Part 1 - Improve error message for unknown events. r=dexter 2016-12-02 12:17:12 +01:00
Georg Fritzsche
eb725e31b9 Bug 1316810 - Part 2 - Only serialize the events value & extra fields when needed. r=dexter 2016-12-02 12:17:12 +01:00
Georg Fritzsche
5c03e7d1cd Bug 1316810 - Part 1 - Use more strict size limits for event recording. r=dexter 2016-12-02 12:17:12 +01:00
Phil Ringnalda
6f651bae70 Backed out 5 changesets (bug 1316281, bug 1316810) for ASan failures in UsageTelemetry tests
Backed out changeset 2c711bb8e373 (bug 1316281)
Backed out changeset b3ea1334c33a (bug 1316281)
Backed out changeset 823e118b3fad (bug 1316281)
Backed out changeset 84e97301a8c9 (bug 1316810)
Backed out changeset f98ddece4b12 (bug 1316810)

MozReview-Commit-ID: 5tR2v8NWxQW
2016-12-01 07:46:00 -08:00
Georg Fritzsche
8be54109f0 Bug 1316281 - Part 1 - Improve error message for unknown events. r=dexter 2016-12-01 14:57:32 +01:00
Georg Fritzsche
10830030ab Bug 1316810 - Part 2 - Only serialize the events value & extra fields when needed. r=dexter 2016-12-01 14:57:32 +01:00
Georg Fritzsche
ec344d978a Bug 1316810 - Part 1 - Use more strict size limits for event recording. r=dexter 2016-12-01 14:57:32 +01:00
Georg Fritzsche
ee8fa595c6 Bug 1302663 - Part 2 - Implement Event Telemetry recording. r=froydnj,dexter
This implements the API, storage and serialization for Telemetry event recording.
2016-11-18 15:51:58 +01:00
Carsten "Tomcat" Book
6ee0c0ae44 Backed out changeset 64b95c8f9f12 (bug 1302663) 2016-11-18 14:27:50 +01:00
Georg Fritzsche
07339c0184 Bug 1302663 - Part 2 - Implement Event Telemetry recording. r=froydnj,dexter
This implements the API, storage and serialization for Telemetry event recording.
2016-11-18 13:03:58 +01:00
Sebastian Hengst
280534d947 Backed out changeset ab64c55508aa (bug 1302663) 2016-11-12 21:17:36 +01:00
Georg Fritzsche
41f4db552f Bug 1302663 - Part 2 - Implement Event Telemetry recording. r=froydnj,dexter
This implements the API, storage and serialization for Telemetry event recording.
2016-11-13 01:52:28 +07:00