Commit Graph

81 Commits

Author SHA1 Message Date
AdamG2
54e9f2b30e Bug 1300491 - Removed histogramFrom and resulting unused functions, all STARTUP_* histograms, and any tests using these. r=chutten
MozReview-Commit-ID: CgeLy5kJbj5
2016-10-21 07:49:31 -04:00
Chris H-C
5d2f4dd5c0 bug 1304519 - Ensure we hold a lock before accumulating. r=gfritzsche
Lock calls to internal_Accumulate from functions that run without locks.

This doesn't render TelemetryHistogram perfectly threadsafe. However,
this does protect all accumulation sites.

MozReview-Commit-ID: 16JUek8NiXI
2016-10-05 09:21:25 -04:00
Chris H-C
b6e063b270 bug 1304660 - Don't dispatch to main once xpcom starts shutting down. r=froydnj
If we manage to dispatch to main after xpcom shutdown, the main thread won't
care for our new runnable and leak it.

MozReview-Commit-ID: 8t4hOgfgEeP
2016-09-28 14:44:35 -04:00
Carsten "Tomcat" Book
63402ac422 merge mozilla-inbound to mozilla-central a=merge 2016-09-29 11:44:58 +02:00
Tooru Fujisawa
a5294e0308 Bug 1289050 - Part 1: Use ASCII variant of JS_ReportError in simple case. r=jwalden 2016-08-14 20:39:28 +09:00
ajay
f09b5e319d Bug 1304735 - Remove ClearHistogram r=chutten
MozReview-Commit-ID: Ez7u2gsRX6R
2016-09-22 21:48:19 +05:30
Chris H-C
a0fde28cee bug 1218576 - Request an immediate batch send when the batch size hits a high water mark. r=gfritzsche
We've now seen an OOM trying to grow the accumulations array during a test
suite. The g*Accumulations arrays do grow unboundedly in size waiting for the
IPC timer to fire, so we should put a size bound as well as a time bound to
trigger the batch send.

The current size bound is 5K elements. This was chosen out of a hat.

MozReview-Commit-ID: 5HeWdbLfN03
2016-09-19 13:30:25 -04:00
Chris H-C
079b09b927 bug 1218576 - Ensure accumulations are for valid IDs. r=gfritzsche
We're seeing occasional failures of the isValid assert on the parent side where
the ID we're being asked to accumulate on is invalid.

Check the IDs on both sides to ensure that they're valid heading in.

MozReview-Commit-ID: 4gLG54Tx64s
2016-09-19 13:30:25 -04:00
Chris H-C
896c9e6ad1 bug 1218576 - Ensure IPCTimer is on the main thread. r=froydnj f=gfritzsche
nsTimer fires on the thread that created the timer. An nsTimer instance should
only be manipulated on its target thread (it isn't threadsafe). IPC using
PContent must be on the main thread.

Thus, everything to do with the gIPCTimer must be on the main thread.

This also takes care of bug 1299312.

MozReview-Commit-ID: IcVRYsoX2R9
2016-09-19 13:30:25 -04:00
Chris H-C
24c99fcfd8 bug 1218576 - Change unused.h to Unused.h, which matters to some filesystems. r=gfritzsche
MozReview-Commit-ID: GOy5Xz2Pxta
2016-09-19 13:30:25 -04:00
Chris H-C
983a145ecf bug 1218576 - Aggregate child categorical histograms in the parent process. r=gfritzsche
Rewrite the categorical histogram accumulation code to use the common path.
This way it gets remote accumulation for cheap.

MozReview-Commit-ID: 3q6gdSvBix
2016-09-19 13:30:25 -04:00
Chris H-C
afef75f258 bug 1218576 - Ensure we can record before trying to record categorical histograms. r=gfritzsche
Every other Accumulate call has it :S

MozReview-Commit-ID: 8uWtADebuJ1
2016-09-19 13:30:25 -04:00
Chris H-C
6582dbcb12 bug 1218576 - Ensure Telemetry IDs coming from IPC are valid r=gfritzsche
I saw a one-off crash on try in internal_GetHistogramByEnumId. Not reproducible
but maybe possible if we're trying to accumulate using an invalid ID. So let's
guard against that.

MozReview-Commit-ID: Ei6eTlV91mJ
2016-09-19 13:30:25 -04:00
Chris H-C
00251d488b bug 1218576 - Ensure remaining batched telemetry is flushed on content process shutdown r=gfritzsche
On content process shutdown we send a content process ping to ensure we have
up-to-date data from the content process before it goes away. Now we need to
also flush the batched telemetry accumulations to the parent so that it can be
present in the ping.

No attempt is made to synchronize access to IPCTimerFired. It is safe to
re-enter.

No attempt is made to cancel the timer as its firing is benign.

MozReview-Commit-ID: 1gjNH9IPhKf
2016-09-19 13:30:25 -04:00
Chris H-C
83ced604e0 bug 1218576 - Assert we're the parent process when clearing histograms. r=gfritzsche
Clear isn't generally called at all, and isn't dispatched to the parent process
for child telemetry aggregation. Clear should only be called on the parent
process.

MozReview-Commit-ID: stIutvAO6h
2016-09-19 13:30:25 -04:00
Chris H-C
a4334b1b30 bug 1218576 - Support remote accumulation via JS histograms. r=gfritzsche
The JS histograms, too, need to dispatch their accumulations from child to
parent.

JSHistograms_Add now only supports histograms that are in gHistogramsMap or
that were created in the parent process. After bug 1288745, maybe we'll be able
to change this to be less convoluted.

MozReview-Commit-ID: 3qTH89YKbGP
2016-09-19 13:30:25 -04:00
Chris H-C
e8f4e068f1 bug 1218576 - Pre-allocate child keyed histograms in the parent process r=gfritzsche
I originally thought we'd be able to avoid the previous implementation's waste
of a map full of every kind of keyed histogram. Unfortunately, other code
(TelemetrySession at the very least) depends on this (and will throw if a keyed
histogram isn't present, even if it is empty)

MozReview-Commit-ID: 8MCGVa595UB
2016-09-19 13:30:25 -04:00
Chris H-C
3e67c97758 bug 1218576 - Support subsession hgrams for child aggregation r=gfritzsche
The original commit didn't properly support subsession histograms, so rectify
that lapse by adding support for stripping out the base name of a histogram
when trying to determine its id.

MozReview-Commit-ID: LvUek6f5WUx
2016-09-19 13:30:25 -04:00
Chris H-C
b15477b262 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
AdamG2
43b3c47b39 Bug 1299144 - Replace TelemetryHistogram::NewKeyedHistogram and replace with predefined histograms. r=chutten
MozReview-Commit-ID: FLRyEswR6r7
2016-09-13 01:04:39 -04:00
AdamG2
ba4b44c12c Bug 1288745 - Remove TelemetryHistogram::NewHistogram and replace with predefined histograms. r=chutten
MozReview-Commit-ID: 6v270MnquqT
2016-09-03 15:26:40 -04:00
Georg Fritzsche
e54db4e599 Bug 1188888 - Part 6 - Implement C++ API for categorical histograms. r=chutten,r=froyndj 2016-07-20 17:10:24 +02:00
Georg Fritzsche
75a2db27c3 Bug 1188888 - Part 4 - Implement categorical histograms with JS API. r=chutten 2016-07-20 17:10:24 +02:00
Julian Seward
39faa31be1 Bug 1279614 - 2,000 instances of "XPCOM objects created/destroyed from static ctor/dtor" emitted from xpcom/base/nsTraceRefcnt.cpp during linux64 debug testing. r=gfritzsche,jmathies. 2016-06-30 14:04:15 +02:00
Alessio Placitelli
b63d53634e 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
0e2d48e6dc Bug 1258183 - TSan: data race toolkit/components/telemetry/Telemetry.cpp in CanRecordBase (part 2, derace). r=chutten. 2016-06-08 17:46:24 +02:00
Nicholas Nethercote
e91dc6571a Bug 1267551 (part 10) - Use MOZ_MUST_USE in AutoVectorRooterBase. r=terrence.
This patch fixes numerous unchecked calls.
2016-06-01 15:49:04 +10:00
Alessio Placitelli
f745b6aff4 Bug 1145164 - Allow non-unitary increments to count histograms. r=gfritzsche
MozReview-Commit-ID: 7HxoGWmm22h
2016-05-10 09:49:00 +02:00
Julian Seward
64b3a1608f Bug 1261052 - Move C++ histogram implementation code into a separate module. r=gfritzsche. 2016-05-17 15:05:19 +02:00
Carsten "Tomcat" Book
7efeacf304 Backed out changeset 6bf8922cd1b7 (bug 1261052) for windows pgo bustage 2016-05-13 14:26:12 +02:00
Julian Seward
57ccf65321 Bug 1261052 - Move C++ histogram implementation code into a separate module. r=gfritzsche. 2016-05-13 11:29:49 +02:00