Commit graph

456 commits

Author SHA1 Message Date
Kris Maglione
6b12d08f7d Bug 1462937: Update callers to use nsIFile::GetDirectoryEntries as a nsIDirectoryEnumerator. r=froydnj
MozReview-Commit-ID: Iv4T1MVAF5

--HG--
extra : rebase_source : 1c518883d082884db7f9323a5acc20361228c26b
extra : histedit_source : 70a73c23d1199d3bfbb5379c78930401166c094b
2018-05-19 20:17:45 -07:00
Csoregi Natalia
00dd116638 Merge inbound to mozilla-central. a=merge 2018-05-15 12:53:24 +03:00
Nika Layzell
2d188849ae Bug 1455217 - Part 3: Use the new xpidl Promise type instead of nsISupports, r=bz 2018-05-14 17:55:54 -04:00
Alessio Placitelli
fd8a6b0d67 Bug 1453591 - Add gtest coverage for the persistence logic. r=chutten,froydnj,janerik
This changes the build system to add a new define when on
Android or when tests are enabled, MOZ_TELEMETRY_GECKOVIEW.

MozReview-Commit-ID: 5n2A8G2ZzRK

--HG--
rename : toolkit/components/telemetry/tests/gtest/TelemetryFixture.h => toolkit/components/telemetry/tests/gtest/TelemetryFixture.cpp
extra : rebase_source : 09e42c85b754f3fd5d9d699b1b52f8afe8694a5c
2018-04-23 19:14:23 +02:00
Alessio Placitelli
daa7d2c647 Bug 1453591 - Add persistence support for GeckoView in the Telemetry core. r=bz,chutten,froydnj,gfritzsche,janerik
This implements the persistence timer and the logic to write measurements
to a persistence file off-the-main thread using JSONWriter. The code to
load persisted measurements off the disk uses the builtin JSON parsing
functions from JS (as we cannot use jsoncpp).
It additionally exposes the ClearProbes method to clear the probe storage and
trigger clearing the persisted data (GeckoView only).

MozReview-Commit-ID: 94FoZac47Cw

--HG--
extra : rebase_source : 9d207958932ae0d8063bf137c0c7078c6103edb4
2018-04-16 11:15:48 +02:00
Cosmin Sabou
dd3e040a8d Backed out 5 changesets (bug 1453591) for build bustages on TelemetryGeckoViewPersistence.cpp. CLOSED TREE
Backed out changeset 6bd51139f05a (bug 1453591)
Backed out changeset f128be7d5256 (bug 1453591)
Backed out changeset e5cf4d14019f (bug 1453591)
Backed out changeset 47634ee93be3 (bug 1453591)
Backed out changeset 8e56f01b7ae4 (bug 1453591)
2018-05-14 22:56:28 +03:00
Alessio Placitelli
4e5efad716 Bug 1453591 - Add gtest coverage for the persistence logic. r=chutten,froydnj,janerik
This changes the build system to add a new define when on
Android or when tests are enabled, MOZ_TELEMETRY_GECKOVIEW.

MozReview-Commit-ID: 5n2A8G2ZzRK

--HG--
rename : toolkit/components/telemetry/tests/gtest/TelemetryFixture.h => toolkit/components/telemetry/tests/gtest/TelemetryFixture.cpp
extra : rebase_source : a12fb699982170d6244e0153d7bbc5cdc8386cd8
2018-04-23 19:14:23 +02:00
Alessio Placitelli
afa9b63b2c Bug 1453591 - Add persistence support for GeckoView in the Telemetry core. r=bz,chutten,froydnj,gfritzsche,janerik
This implements the persistence timer and the logic to write measurements
to a persistence file off-the-main thread using JSONWriter. The code to
load persisted measurements off the disk uses the builtin JSON parsing
functions from JS (as we cannot use jsoncpp).
It additionally exposes the ClearProbes method to clear the probe storage and
trigger clearing the persisted data (GeckoView only).

MozReview-Commit-ID: 94FoZac47Cw

--HG--
extra : rebase_source : 9d207958932ae0d8063bf137c0c7078c6103edb4
2018-04-16 11:15:48 +02:00
Jan-Erik Rediger
871a4b2e0d Bug 1320052 - Unify histogram storage into a single container. r=chutten
On Desktop and GeckoView we only ever need to store histograms for a
subsession and clear the histograms when a snapshot is done (e.g. a main ping is built).
On Fennec we don't have subsessions and only store for a session and never clear the storage.

MozReview-Commit-ID: BeVi86kZPs2

--HG--
extra : rebase_source : 50bb218c9fb9a04c8d60d6300e4e9e67544232c0
2018-05-02 15:43:02 +02:00
arthur.iakab
5a17556f02 Backed out 6 changesets (bug 1320052) on request by Dexter for requently failing test verify dom/base/test/browser_use_counters.js
Backed out changeset 07db52945b1f (bug 1320052)
Backed out changeset 7a64a23bf183 (bug 1320052)
Backed out changeset c95a4b0c6642 (bug 1320052)
Backed out changeset 4749633bd02f (bug 1320052)
Backed out changeset c7b8f6d55a0b (bug 1320052)
Backed out changeset b0396db0229c (bug 1320052)
2018-05-08 17:38:29 +03:00
Jan-Erik Rediger
3e7d72f6bf Bug 1320052 - Unify histogram storage into a single container. r=chutten
On Desktop and GeckoView we only ever need to store histograms for a
subsession and clear the histograms when a snapshot is done (e.g. a main ping is built).
On Fennec we don't have subsessions and only store for a session and never clear the storage.

MozReview-Commit-ID: BeVi86kZPs2

--HG--
extra : rebase_source : 50bb218c9fb9a04c8d60d6300e4e9e67544232c0
2018-05-02 15:43:02 +02:00
Jan-Erik Rediger
d0ea4a9015 Bug 1452552 - Add a method to reset the product during runtime on Android. r=Dexter
This should only be used in xpcshell on Android after toggling the GeckoView mode.
This is a workaround as we have no better way to detecting the current product (Fennec or GeckoView) on Android.

MozReview-Commit-ID: LEHt1Gt3JJ7

--HG--
extra : rebase_source : 44092e84d1dd9518ab4a7f5706a98ed0eb58f1b6
2018-04-26 16:41:46 +02:00
Jan-Erik Rediger
c4ce7a9169 Bug 1448945 - Enable recording events in artifact builds without rebuilding Firefox. r=chutten
This patch enables the Firefox Telemetry core to register and record
to dynamic builtin scalars.

MozReview-Commit-ID: 8FeAgmmsQXw

--HG--
extra : rebase_source : f5eddb24bb8c16b75a49850568efd38141eb6a5a
2018-04-09 15:04:49 +02:00
Aaron Klotz
fe0034391b Bug 1444361: Don't obtain cert subject info on main thread; r=chutten
--HG--
extra : rebase_source : b42ff1b60a7be46d3dfd3c084480e36a55d6021c
2018-03-09 11:27:51 -07:00
Landry Breuil
82988cdd0e Bug 1442746 - use clock_gettime on all unices but osx, not only linux - fixes build on BSD. r=chutten
--HG--
extra : rebase_source : 5ae4e5642ea7b06f2426171919d7d22c9053eef9
extra : source : 865c06c8aae729a258d9f56d4f292421ecdfae57
2018-03-08 23:25:00 +02:00
Dorel Luca
a8e6e9a85e Backed out changeset 865c06c8aae7 (bug 1442746) for lint failure on gecko/toolkit/components/telemetry/parse_scalars.py 2018-03-09 19:02:38 +02:00
Landry Breuil
bbb67800ba Bug 1442746 - use clock_gettime on all unices but osx, not only linux - fixes build on BSD. r=chutten
--HG--
extra : rebase_source : 94875eca5e8ef048079119b033374a6cd6723900
2018-03-08 23:25:00 +02:00
Aaron Klotz
5063d110dd Bug 1434489: Add optional certSubject field to modules ping; r=chutten, data-review=francois (via bug 1430857)
--HG--
extra : rebase_source : 35fb3fbb174c4b4605e3fd685bb0d383c8f83af2
2018-03-05 18:13:28 -07:00
Masatoshi Kimura
8426d81c48 Bug 1428258 - Stop using GetNativePath in Telemetry.cpp. r=Dexter
MozReview-Commit-ID: A8CCpfWAf73

--HG--
extra : rebase_source : 76b78ffaf73e958f8e987434a471c3ede69d1b90
extra : intermediate-source : 033b0138016a8ecfd825dd5d1a1ec45b0df3a1f8
extra : source : e33809bfad92f43ee4d828e4e24f55c5d952195b
2017-12-16 22:40:32 +09:00
Jeremy Lempereur
97a98031cd Bug 1432791 - Remove the Microsecond AutoTimer resolution. r=Dexter
Telemetry's AutoTimer Microsecond resolution was not used. I removed it with the TimerResolution enum, which allowed me to remove a couple of templates as well.

MozReview-Commit-ID: 76qHgmYEsE3

--HG--
extra : rebase_source : 1f5826f1be990d4814de15875cd0a726213712d4
2018-02-07 21:11:22 +01:00
Alessio Placitelli
52d0b9348d Bug 1425909 - Enable adding scalars in artifact builds without rebuilding Firefox. r=chutten,froydnj
This patch enables generating a JSON file that mirrors the scalar definitions
in Scalars.yaml. On local developer builds, this file is loaded when Firefox
starts to register all the scalars. If some change was introduced in the
definition files, the new scalar will be dynamically added.
The JSON definition file will be regenerated every time an artifact build
is performed or the build faster command is invoked.

MozReview-Commit-ID: Do3WjE38aIK

--HG--
extra : rebase_source : 64fdd324bf760412bc1504a2f1c2b8952096c513
2018-01-18 18:25:01 +01:00
Narcis Beleuzu
b709f2768b Backed out 2 changesets (bug 1425909) for mochitest C3 failures on test_memoryReporters.xul. on a CLOSED TREE
Backed out changeset 6bcaae60c82e (bug 1425909)
Backed out changeset 0b5d96b317c3 (bug 1425909)
2018-02-01 19:45:22 +02:00
Alessio Placitelli
e39fc7c8b3 Bug 1425909 - Enable adding scalars in artifact builds without rebuilding Firefox. r=chutten,froydnj
This patch enables generating a JSON file that mirrors the scalar definitions
in Scalars.yaml. On local developer builds, this file is loaded when Firefox
starts to register all the scalars. If some change was introduced in the
definition files, the new scalar will be dynamically added.
The JSON definition file will be regenerated every time an artifact build
is performed or the build faster command is invoked.

MozReview-Commit-ID: Do3WjE38aIK

--HG--
extra : rebase_source : 2d9701d77abeb6ce8de096674349b6d071c4b102
2018-01-18 18:25:01 +01:00
Aditya Bharti
2d08e81fe6 Bug 1428888 - Allow C++ to accumulate multiple samples into a categorical histogram in one call r=chutten
Telemetry::Accumulate now supports two new signatures: Accumulate(HistogramId, nsTArray stringLabels) and
Accumulate(nsTArray enumValues). In the stringLabels case, if the array contains an invalid label, then no
samples are accumulated at all. In the enumValues array case, the class template ensures that we do not have
a mismatch of labels in the array, since the enumValues class is tied to the id of the histogram we want to
accumulate to.
2018-01-28 16:53:40 +05:30
Georg Fritzsche
e415abb416 Bug 1429510 - Make last shutdown time a scalar. r=chutten 2018-01-15 13:22:56 +01:00
Tiberius Oros
c8bf742d99 Backed out 1 changesets (bug 1429510)for build bustage on CLOSED TREE
Backed out changeset 809a14e1c12b (bug 1429510)
2018-01-12 22:20:40 +02:00
Georg Fritzsche
f252fd08ea Bug 1429510 - Make last shutdown time a scalar. r=chutten,liuche
--HG--
extra : rebase_source : ba25df9128f95a74b04c65f7042518a42f313eb5
2018-01-11 06:06:00 +02:00
Aditya Bharti
1dc396f38a bug 1428885 - Allow C++ to accumulate multiple samples into a keyed histogram in one call r=chutten
Extended the Telemetry::Accumulate API to take a Histogram ID, string key, and a nsTArray<uint32_t> of samples.
Test cases check for linear, count and histograms with a set of allowed keys. Made changes to fix try failures.
2018-01-12 03:26:04 +05:30
Aditya Bharti
9166b51536 bug 1364043 - Allow C++ to accumulate multiple samples into histograms with one call. r=chutten
Added another Telemetry::Accumulate function that takes a histogram id and an array of samples as arguments.
As of this patch, adding multiple samples to keyed and categorical histograms is not supported.

--HG--
extra : rebase_source : e84c53d23c9d2a6fc07f57b626e76e09c61c3bee
2018-01-09 02:16:30 +05:30
Chris H-C
02fe85f6af bug 1410907 - Add CanRecord(Pre)Release data to nsITTelemetry r=Dexter
We're starting a shift towards talking about release/prerelease data instead of
base/extended collection. For now this is just a naming change.

At the same time, we can render these attributes read-only, which is nice.

MozReview-Commit-ID: IRuKpzLYW7i

--HG--
extra : rebase_source : 866fd35f854aaa0c504795912e82d443521c4952
2017-11-03 12:44:23 -04:00
Sebastian Hengst
6825b43218 Backed out changeset 58b0f65614be (bug 1410907) for build bustage at toolkit/components/telemetry/Telemetry.cpp:1591. r=backout on a CLOSED TREE 2017-11-06 16:41:51 +01:00
Chris H-C
f7ae527fc3 bug 1410907 - Add CanRecord(Pre)Release data to nsITTelemetry r=Dexter
We're starting a shift towards talking about release/prerelease data instead of
base/extended collection. For now this is just a naming change.

At the same time, we can render these attributes read-only, which is nice.

MozReview-Commit-ID: IRuKpzLYW7i

--HG--
extra : rebase_source : 7f6ae060a520f9685c279b680a9356070fb93923
2017-11-03 12:44:23 -04:00
Nicholas Nethercote
8a68e6fb83 Bug 1403868 (part 4) - Reduce tools/profiler/public/*.h to almost nothing in non-MOZ_GECKO_PROFILER builds. r=mstange.
Currently the Gecko Profiler defines a moderate amount of stuff when
MOZ_GECKO_PROFILER is undefined. It also #includes various headers, including
JS ones. This is making it difficult to separate Gecko's media stack for
inclusion in Servo.

This patch greatly simplifies how things are exposed. The starting point is:

- GeckoProfiler.h can be #included unconditionally;

- everything else from the profiler must be guarded by MOZ_GECKO_PROFILER.

In practice this introduces way too many #ifdefs, so the patch loosens it by
adding no-op macros for a number of the most common operations.

The net result is that #ifdefs and macros are used a bit more, but almost
nothing is exposed in non-MOZ_GECKO_PROFILER builds (including
ProfilerMarkerPayload.h and GeckoProfiler.h), and understanding what is exposed
is much simpler than before.

Note also that in BHR, ThreadStackHelper is now entirely absent in
non-MOZ_GECKO_PROFILER builds.
2017-10-04 09:11:18 +11:00
Alessio Placitelli
ad0ce3147c Bug 1395835 - Rename "group" to "category" in the scalar code and docs. r=chutten
MozReview-Commit-ID: HQ3I2cfEaa

--HG--
extra : rebase_source : e7639b2b33d6ad1b20d6e20f7e2c84fef68e9096
2017-09-27 10:12:13 +02:00
Alessio Placitelli
cffe8a8404 Bug 1393801 - Enable dynamic scalar registration. f=gfritzsche,r=billm,chutten
MozReview-Commit-ID: JlRk7hLV5QD

--HG--
extra : rebase_source : 8e7a0823e5c395ce3d58aee978360fd588e6e879
2017-08-29 13:05:40 +02:00
Chris H-C
28c67cf8bd bug 1376600 - Remove registered(Keyed)Histograms r=Dexter
With the removal of the old addonHistograms, all histograms are now registered.
So removing registered(Keyed)Histograms should be straightforward?

Unfortunately not, as this was how we filtered data based on dataset
(opt-in/opt-out), so a little more fiddling was needed to get C++ to only
serialize dataset-appropriate data (instead of post-facto filtering it in JS).

MozReview-Commit-ID: HDplhmzmzJl

--HG--
extra : rebase_source : 9c38c97e39e3c4fb192288d751505e1f0f2a2c6d
2017-08-22 09:42:09 -04:00
Michael Layzell
65ece3dba5 Bug 1380081 - Part 11: Simplify the HangAnnotations abstraction, r=froydnj
HangAnnotations was very complex, required a separate allocation, and used this
unfortunate virtual interface implementation which made it harder to do
interesting things with it (such as serialize it over IPC).

This new implementation is much simpler and more concrete, making
HangAnnotations simply be a nsTArray<Annotation>. This also simplifies some of
the IPC code which was added in part 7.

MozReview-Commit-ID: EzaaxdHpW1t
2017-08-15 16:35:46 -04:00
Michael Layzell
82b2097078 Bug 1380081 - Part 7: Add all necessary data for BHR to nsIHangDetails, r=froydnj
We're going to use HangDetails as the type containing hang information. We'll
have a JS component which reads the data out of nsIHangDetails, builds the
payload, and submits it to telemetry for us.

We'll do it in JS because telemetry has to be submitted from JS.

This patch also adds IPC serization for the relevant types so that we can send
HangDetails objects over IPDL.

MozReview-Commit-ID: CeikKabY9Vs
2017-08-15 16:35:39 -04:00
Michael Layzell
cd973809f7 Bug 1380081 - Part 3: Remove the ThreadHangStats object and related code, r=froydnj
MozReview-Commit-ID: EtrktVmc3vP
2017-08-15 16:34:21 -04:00
Sebastian Hengst
655e0abe18 Backed out changeset bd63a8fecf00 (bug 1380081) 2017-08-11 09:28:47 +02:00
Sebastian Hengst
9f41dbabdb Backed out changeset 6bc453505dc3 (bug 1380081) 2017-08-11 09:28:27 +02:00
Sebastian Hengst
3547a3cd0e Backed out changeset 9158ca4292bb (bug 1380081) 2017-08-11 09:28:06 +02:00
Michael Layzell
e51c323738 Bug 1380081 - Part 11: Simplify the HangAnnotations abstraction, r=froydnj
HangAnnotations was very complex, required a separate allocation, and used this
unfortunate virtual interface implementation which made it harder to do
interesting things with it (such as serialize it over IPC).

This new implementation is much simpler and more concrete, making
HangAnnotations simply be a nsTArray<Annotation>. This also simplifies some of
the IPC code which was added in part 7.

MozReview-Commit-ID: EzaaxdHpW1t
2017-08-10 15:55:12 -04:00
Michael Layzell
49ede48e96 Bug 1380081 - Part 7: Add all necessary data for BHR to nsIHangDetails, r=froydnj
We're going to use HangDetails as the type containing hang information. We'll
have a JS component which reads the data out of nsIHangDetails, builds the
payload, and submits it to telemetry for us.

We'll do it in JS because telemetry has to be submitted from JS.

This patch also adds IPC serization for the relevant types so that we can send
HangDetails objects over IPDL.

MozReview-Commit-ID: CeikKabY9Vs
2017-08-10 15:55:12 -04:00
Michael Layzell
b0eb879969 Bug 1380081 - Part 3: Remove the ThreadHangStats object and related code, r=froydnj
MozReview-Commit-ID: EtrktVmc3vP
2017-08-10 15:55:12 -04:00
Georg Fritzsche
e035cc0e52 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.

--HG--
extra : rebase_source : 639f9353a7e9383efe87f7f059ca83b56fb3b2a7
2017-08-03 07:03:00 -04:00
Avikalpa Kundu
89a80f967f Bug 1370489 - Factor out TelemetryIOInterposeObserver from Telemetry.cpp. r=gfritzsche 2017-06-15 17:42:00 -04:00
Chris H-C
fca9d2bae4 bug 1366294 - Part 7 - Use keyed histogram snaphots to build payloads. r=gfritzsche
TelemetrySession's getKeyedHistograms asks for each keyed histogram
individually. This is inefficient and doesn't work well with the storage
refactor.

So, plumb through a subsession keyed histogram snapshot API and convert
TelemetrySession over to using it.

MozReview-Commit-ID: Af9dTqw99UA
2017-07-24 09:52:26 -04:00
Georg Fritzsche
09d533dae9 Bug 1366294 - Part 1 - Remove base::StatisticsRecorder. r=chutten
The Chromium IPC histogram code used the StatisticsRecorder object for storage.
This is keyed by histogram name, which doesn't match our storage reality anymore.
Instead we use a name to refer to a set of histogram instances that record data from different processes, as well as separating session and subsession data.
Consequently we need to rewrite this storage, which means StatisticsRecorder is not used anymore.

MozReview-Commit-ID: 1LC7YubpKaD
2017-07-24 09:52:26 -04:00
Carsten "Tomcat" Book
4e00eff077 merge mozilla-inbound to mozilla-central a=merge 2017-06-27 10:56:41 +02:00