Commit Graph

113 Commits

Author SHA1 Message Date
Jeremy Lempereur
bad7346661 Bug 1444735 - Guard AutoCounter and RuntimeAutoCounter against over/under flows. r=chutten
Made sure the telemetry AutoCounter and RuntimeAutoCounter increments are guarded against over/under flows.

MozReview-Commit-ID: 8CZhpKkthoB

--HG--
extra : rebase_source : 4eafb249555128f9bc9fc3ecea13983bfa402aab
2018-03-20 20:04:13 +01:00
Jeremy Lempereur
db59d8a93a Bug 1436680 - Allow non-templated uses of AutoCounter. r=chutten,Dexter
In order to stay consistent with the AutoTimer api, allowed non-templates uses or AutoCounter.

MozReview-Commit-ID: 9qnAeQTIY9T

--HG--
extra : rebase_source : 57ac472030945bf0434a4616037ac0963dd3bbd5
2018-02-13 19:08:34 +01:00
Jeremy Lempereur
f241ccd125 Bug 1436680 - Allow non-templated uses of AutoTimer. r=chutten,Dexter,janv
Moved the runtime Telemetry::AutoTimer implementation to the Telemetry public API.

MozReview-Commit-ID: KNT6toDQUtR

--HG--
extra : rebase_source : 4c55df7321570d49daa0aef7b916e4550b1f2ffd
2018-02-13 15:23:09 +01:00
Ciure Andrei
7e72dc58ce Backed out 2 changesets (bug 1436680) for bustages on /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/Telemetry.h. a=backout on a CLOSED TREE
Backed out changeset 66fb8813478c (bug 1436680)
Backed out changeset 4258b9e2ebfc (bug 1436680)
2018-02-28 05:56:00 +02:00
Jeremy Lempereur
9c6c1ed9e2 Bug 1436680 - Allow non-templated uses of AutoCounter. r=Dexter
In order to stay consistent with the AutoTimer api, allowed non-templates uses or AutoCounter.

MozReview-Commit-ID: 9qnAeQTIY9T

--HG--
extra : rebase_source : 8c95992e2d291d628721febbc7b641b91c850288
2018-02-13 19:08:34 +01:00
Jeremy Lempereur
fabf9a4e7b Bug 1436680 - Allow non-templated uses of AutoTimer. r=Dexter,janv
Moved the runtime Telemetry::AutoTimer implementation to the Telemetry public API.

MozReview-Commit-ID: KNT6toDQUtR

--HG--
extra : rebase_source : 8d40759f616511f0a3a19d42c8105e6278bf7e2a
2018-02-13 15:23:09 +01: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
Aditya Bharti
62e40e00b4 Bug 1433998 - Allow C++ to accumulate multiple samples into a keyed categorical histogram. r=chutten
Extended the Telemetry::Accumulate() API to accept a string key and a nsTArray of Telemetry::LABELS_*
enums. The typesafety of the class templates ensures there are no label mismatches within the array.

Since there is no singular version for accumulating a single string label into a keyed categorical
histogram, support for the plural version with multiple string labels has not been included here.
2018-01-30 04:30:36 +05:30
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
Chris H-C
1e75fd7c99 bug 1431868 Handle AutoTimer users passing us future values for start. r=Dexter
UBSan found some cases where people are setting the Telemetry AutoTimer values
of `start` that are in the future. Not a problem if the value for `end` is
further in the future... which it isn't always.

Let's normalize those cases to 0, shall we?

MozReview-Commit-ID: 7AdTMf2rss6

--HG--
extra : rebase_source : aa3415c85d80286cab9d44a2d6aea532493f7212
2018-01-23 14:30:13 -05: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
Eric Rahm
07c97a5afe Bug 1423773 - Part 1: Remove usage of nsStringGlue.h. r=glandium
This removes an unnecessary level of indirection by replacing all
nsStringGlue.h instances with just nsString.h.

--HG--
extra : rebase_source : 340989240af4018f3ebfd92826ae11b0cb46d019
2017-12-06 16:52:51 -08:00
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
FSeita
f3d5101a06 Bug 1376333 - Improve naming of accumulation types & variables r=Dexter
MozReview-Commit-ID: F9w7CLUOP6r

--HG--
extra : rebase_source : 5330f9cb47145f5867a92277f4fa6c610e8eed56
2017-09-13 11:20:36 +02: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
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
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
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
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
Shih-Chiang Chien
36156c3e82 Bug 1357682 - Part 1, helper function for keyed categorical histogram. r=gfritzsche
Create AccumulateCategoricalKeyed() to specify both key and value for the categorical histogram,
sinc AccumulateCategorical() only support non-keyed histogram.

MozReview-Commit-ID: qYMnL9P6Ik

--HG--
extra : rebase_source : 446543601e9234da25d292018d8a6e8a7ac7ba22
2017-07-11 16:51:07 +08:00
Michael Layzell
cc6563e878 Bug 1369594 - Get module information for BHR off main thread, r=froydnj
MozReview-Commit-ID: L0ANHNKKAkY
2017-06-16 14:55:15 -04:00
Paavini
19e44237f2 Bug 1333624 - AutoTimer now asserts on empty histogram key names. r=billm 2017-05-25 05:43:00 +02:00
Georg Fritzsche
be604ef5af Bug 1313326 - Part 1 - Support recording events in child processes. r=dexter,froydnj 2017-02-14 14:43:51 +01:00
Sebastian Hengst
53a7c500b2 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
Georg Fritzsche
5094a3ae8d Bug 1313326 - Part 1: Support recording events in child processes. r=dexter, r=froydnj 2017-02-14 14:43:51 +01:00
Vedant Sareen
7d4bd52fae Bug 1330907 - Rename Telemetry::ID to Telemetry::HistogramID. r=dexter
Changed |print("enum ID : uint32_t {", file=output)| to |print("enum HistogramID : uint32_t {", file=output)| at line 53 of the file |toolkit/components/telemetry/gen-histogram-enum.py|, and then replaced all the textual occurrences of |Telemetry::ID| to |Telemetry::HistogramID| and |ID| to |HistogramID| in 43 other files.
2017-02-16 00:45:15 +05:30
Georg Fritzsche
ea73f15059 Bug 1339749 - Refactor Telemetry IPC code. r=chutten
--HG--
rename : toolkit/components/telemetry/TelemetryComms.h => toolkit/components/telemetry/ipc/TelemetryComms.h
rename : toolkit/components/telemetry/TelemetryIPCAccumulator.cpp => toolkit/components/telemetry/ipc/TelemetryIPCAccumulator.cpp
rename : toolkit/components/telemetry/TelemetryIPCAccumulator.h => toolkit/components/telemetry/ipc/TelemetryIPCAccumulator.h
2017-02-15 16:25:40 +01:00
Carsten "Tomcat" Book
5447789960 Backed out changeset 3a90f1f64d8d (bug 1339749) for bustage on a CLOSED TREE
--HG--
rename : toolkit/components/telemetry/ipc/TelemetryComms.h => toolkit/components/telemetry/TelemetryComms.h
rename : toolkit/components/telemetry/ipc/TelemetryIPCAccumulator.cpp => toolkit/components/telemetry/TelemetryIPCAccumulator.cpp
rename : toolkit/components/telemetry/ipc/TelemetryIPCAccumulator.h => toolkit/components/telemetry/TelemetryIPCAccumulator.h
extra : amend_source : 2f4229556609103157901609fee02aaedcdb8606
2017-02-15 16:10:29 +01:00
Georg Fritzsche
ce683a039f Bug 1339749 - Refactor Telemetry IPC code. r=chutten
--HG--
rename : toolkit/components/telemetry/TelemetryComms.h => toolkit/components/telemetry/ipc/TelemetryComms.h
rename : toolkit/components/telemetry/TelemetryIPCAccumulator.cpp => toolkit/components/telemetry/ipc/TelemetryIPCAccumulator.cpp
rename : toolkit/components/telemetry/TelemetryIPCAccumulator.h => toolkit/components/telemetry/ipc/TelemetryIPCAccumulator.h
2017-02-15 10:37:17 +01:00
Nicholas Nethercote
22b6d342d7 Bug 1333296 (part 1) - Rename MOZ_ENABLE_PROFILER_SPS as MOZ_GECKO_PROFILER. r=mstange,glandium.
--HG--
extra : rebase_source : 223f3a17f009645369be503392cc1f0cea7f19a1
2017-01-24 14:15:12 +11:00
Alessio Placitelli
932126d970 Bug 1278556 - Enable child process scalar recording. r=chutten, f=gfritzsche,froydnj
MozReview-Commit-ID: IddrszBX0f5
2017-01-16 05:12:00 +01:00
Iaroslav (yarik) Sheptykin
6cb6fc4177 Bug 1225851: Capturing keyed call stacks on demand inside Telemetry. r=chutten,r=gfritzsche
MozReview-Commit-ID: XSs5MeQ1Bs
2016-11-17 20:52:53 +01:00
David Anderson
fb068517da Refactor TelemetryHistogram to support multiple child process types. (bug 1304494 part 2, r=gfritzsche) 2016-10-30 22:35:57 -07:00
Mark Banner
c4565f5765 Bug 1306631 - Remove old Loop telemetry hooks from WebRTC code. r=jesup
MozReview-Commit-ID: 1ctKZPDVEha

--HG--
extra : rebase_source : 530df82d85d87dd605289b8af8ce372ba6cd4ed9
2016-09-23 16:55:48 +01:00
ajay
9b6d615f82 Bug 1304735 - Remove ClearHistogram r=chutten
MozReview-Commit-ID: Ez7u2gsRX6R

--HG--
extra : rebase_source : efcaba545b853bd6bb1df0ce85cd2b4c4cf33076
2016-09-22 21:48:19 +05:30
Alessio Placitelli
c514c653b1 Bug 1277806 - Add the missing C++ API for boolean scalars. r=gfritzsche 2016-09-14 02:59:00 +02:00
Alessio Placitelli
9d5a57541f Bug 1277806 - Implement keyed scalar measurements in Telemetry. r=gfritzsche,nfroyd
MozReview-Commit-ID: 9kkjpLAIQUX
2016-09-16 03:43:00 +02:00
Chris H-C
7876f2ef1e bug 1218576 - Accumulate child histograms in the parent process r=froydnj
Batch the accumulations to only transmit every so often, so we don't incur
too much in the way of IPC overhead penalties.

What this doesn't do:
* remove or restructure child telemetry code to adapt to the new way
* send the telemetry anywhere
* allow for the child process to clear child histograms
* support anything but histograms (but this is expected and okay)

MozReview-Commit-ID: JnUkcmN3Ya7
2016-09-19 13:30:25 -04:00
Georg Fritzsche
35da089986 Bug 1188888 - Part 6 - Implement C++ API for categorical histograms. r=chutten,r=froyndj 2016-07-20 17:10:24 +02:00
Alessio Placitelli
f882637f17 Bug 1276195 - Add scalar measurements API & storage in Telemetry C++ core. r=gfritzsche
MozReview-Commit-ID: K27PoMxWRMp
2016-06-25 01:01:00 +02:00
Julian Seward
e00ffcdc37 Bug 1258183 - TSan: data race toolkit/components/telemetry/Telemetry.cpp in CanRecordBase (part 2, derace). r=chutten.
--HG--
extra : rebase_source : 403c8ec419ee8ac2ece248a8395480dbd3018c74
2016-06-08 17:46:24 +02:00
Julian Seward
7a4c826078 Bug 1261052 - Move C++ histogram implementation code into a separate module. r=gfritzsche.
--HG--
extra : rebase_source : 8799fa405c655795fc42350666e0f3baffd316fc
2016-05-17 15:05:19 +02:00
Carsten "Tomcat" Book
07ece0dad9 Backed out changeset 6bf8922cd1b7 (bug 1261052) for windows pgo bustage 2016-05-13 14:26:12 +02:00
Julian Seward
1e8fe1fb86 Bug 1261052 - Move C++ histogram implementation code into a separate module. r=gfritzsche. 2016-05-13 11:29:49 +02:00