This patch the list of process and crash types that can be recorded in a keyed
histogram by the crash manager; the relevant pattern was updated to match
these kesy. A test was also added to ensure that no new crash types can be
added without also updating Histograms.json. This also fixes a related
existing test.
MozReview-Commit-ID: FKUZHd17a3V
We don't need or want cookies sent to incoming.tmo. It just throws them on the
floor, but we needn't waste clients' bandwidth on it.
MozReview-Commit-ID: F9WjcDyKFGN
As requested, a test for the key limit pref.
This sets it to a value lower than the limit of events we can currently send
without truncation (100), but higher than is likely to be hit by tests (since
the first time we record an event, we read the pref, so we can't unsend it).
MozReview-Commit-ID: 7pGftCa1rz3
To test the TelemetryEvents portion of the code we need TelemetryEvents
tests. (The gtests only cover portions deeper than the TelemetryScalar API).
MozReview-Commit-ID: ExaiW0OiwFI
(This is a partial revert of bug 1443587 part 2 where the `Move`s were added.)
When registering multiple methods and objects within the same `eventData` item,
we must copy the list of acceptable event keys into each new DynamicEventInfo.
Also includes a test.
MozReview-Commit-ID: 5PSH15nSWEB
We no longer support legacy extensions with e10s shims, and the only remaining
uses that matter are in-tree test harnesses, which have been fixed. This flag
no longer serves a purpose.
MozReview-Commit-ID: EdCNqF4MttN
On macOS, the paths for the special directories `GreD` (Resources) vs. `GreBinD`
(MacOS) are different. On other platforms, they are the same.
With scalar loading for artifact builds, we need to load a file from
`Resources`, so `GreD` should be used for this case.
MozReview-Commit-ID: 91JFwOISQCk
This patch adds support for value arrays to the internal_JSHistogram_Add method.
The histogram.add() js method can now be called with a single value or an array of values.
The accumulation is "all-or-nothing", i.e. if there is even a single invalid value in the
array, then nothing is accumulated.
The logic for type checking arguments before accumulation has been moved into a separate
function: internal_JSHistogram_CoerceValue. This function can also be used for
internal_JSKeyedHistogram_* methods in the future. This patch includes logic for clamping
values greater than UINT32_MAX to UINT32_MAX.
Added xpcshell tests in telemetry/tests/unit/test_TelemetryHistograms.js to check functionality.
bug 1397293 introduced a mechanism by which we would bail out early in trying
to send a ping if we were trying to send it after the network had been torn
down.
Unfortunately, it did so indistinguishably from the case where we weren't
allowed to send pings, so we neglected to save the ping (as "pending") and
just archived it.
This change cleanly rejects the ping, and correctly tests that the rejected
ping is persisted, not just ephemerally hanging in memory for but a few moments
longer.
MozReview-Commit-ID: 2g8cpeBEzSE
This patch was autogenerated by my decomponents.py
It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.
It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.
It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)
MozReview-Commit-ID: DeSHcClQ7cG
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
The properties limit was being exceeded because the telemetry code itself
added a num_slices property. The GC already adds a slices property
(containing the number of slices) so I've fixed the issue by removing the
creation of the num_slices property, which will stop this limit from being
exceeded.
I thought that I fixed an off-by-one error in part 1 of this patch series,
but I didn't, I introduced one. I'm not sure why the original code didn't
work.
This patch also adds more testing (to avoid off-by-ones) and better logging
that may help if the original problem comes back.
+ Log limitProperties failures.
+ Don't remove all the properties from the main GC object, some are needed
later, just reduce it to the 7 necessary properties.
toolkit/components/telemetry/tests/unit/test_TelemetryGC.js:
toolkit/components/telemetry/tests/unit/xpcshell.ini:
Add new unit test.
toolkit/components/telemetry/GCTelemetry.jsm:
Add an extra method to make testing easier.
js/src/gc/Statistics.cpp:
Add a reference to the unit test for anyone modifying this code.