Commit Graph

144 Commits

Author SHA1 Message Date
Alessio Placitelli
75704c0bb9 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
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
b6f04194a9 bug 1218576 - Move aggregated child telemetry to processes.content r=gfritzsche
Take the opportunity presented through changing child telemetry accumulation
to bring the ping form closer to the ideas expressed in bug 1281795.

childPayloads still exists, but without histograms or keyedHistograms which are
now at root.processes.content.{keyedH|h}istograms. This will require coordinated
changes in the aggregator and moztelemetry libraries.

MozReview-Commit-ID: AqG2jmBBC2W
2016-09-19 13:30:25 -04:00
Chris H-C
1820cbf157 bug 1218576 - Remove requestChildPayloads r=gfritzsche
To simplify using child telemetry from the parent process, only allow child
telemetry payloads to be generated once per child process, on shut down.

This will allow us to use the child telemetry's subsession information to leave
childPayloads the way it currently is.

Will need to update test_ChildHistograms.js as it is the only consumer.

MozReview-Commit-ID: 2qSztg0QHV5
2016-09-19 13:30:25 -04:00
Jared Wein
4518d81cb5 Bug 1292042 - Enable the keyword-spacing rule for eslint. Most of this patch was autogenerated by 'eslint --fix'. Files with .xml extension needed to be changed by hand due to limitations of custom plugin. r=markh
MozReview-Commit-ID: EMjJ3yWt9Wt
2016-08-04 03:28:58 -04:00
Jared Wein
e8b20b6db5 Bug 1292035 - Enable the space-before-blocks rule for eslint. This patch was generated using 'eslint --fix'. r=markh
MozReview-Commit-ID: 2XVoU05YvES
2016-08-04 03:20:25 -04:00
Alessio Placitelli
0ceb2b70ea Bug 1271304 - Measure the tabs/window open events and max number of tab/window per subsession. r=Gijs, r=gfritzsche, data-review=bsmedberg
MozReview-Commit-ID: 6vYfoEb8VvB
2016-05-12 09:30:00 +02:00
Alessio Placitelli
c0e285b879 Bug 1282091 - Adjust the "scalars" format in the main ping. r=gfritzsche 2016-07-05 02:35:00 +02:00
Alessio Placitelli
d53e2e503a Bug 1276196 - Add scalars to the main ping payload. r=gfritzsche 2016-06-24 08:58:00 +02:00
Alessio Placitelli
381601829e Bug 1156361 - Telemetry redesign: Consolidate date & string utility functions in TelemetryUtils.jsm. r=gfritzsche 2016-05-06 09:36:00 +02:00
Iaroslav Sheptykin
17b9d2f2b5 Bug 1145188: Shifting TelemetrySession init control to TelemetryController (core). r=Dexter 2016-05-16 06:57:00 +02:00
Sebastian Hengst
9c6add3610 Backed out changeset 9e90db2262ac (bug 1145188) for frequent Android 4.2 x86 opt Sets(S4) failure in test_TelemetrySession.js. r=backout 2016-04-29 21:30:50 +02:00
Georg Fritzsche
d31a33ba75 Bug 1262386 - Trigger Telemetry scheduler tick after waking up from sleep. r=dexter 2016-04-29 15:16:22 +02:00
Georg Fritzsche
8cc8fd4960 Bug 1262386 - Move Scheduler shutdown() next to init(). r=dexter 2016-04-29 15:16:22 +02:00
Georg Fritzsche
e37d614132 Bug 1268581 - Reduce Telemetry initialization delay in tests. r=dexter 2016-04-29 15:16:22 +02:00
Iaroslav Sheptykin
87be9cbb55 Bug 1145188: Shifting TelemetrySession init control to TelemetryController (core). r=Dexter 2016-04-17 11:57:00 +02:00
Claas Augner
6d5c467dfd Bug 1231812 - Don't send empty keyed histograms in Telemetry pings. r=gfritzsche
MozReview-Commit-ID: 2Vl3IjjeaHj
2016-04-14 15:57:10 -07:00
Georg Fritzsche
e60cfe2f11 Bug 1250640 - Part 3 - Add diagnostics for suspected scheduler scenarios. r=dexter, f=bsmedberg 2016-04-13 12:55:31 +02:00
Georg Fritzsche
d111064dfe Bug 1250640 - Part 2 - Start new subsessions even when payload assembly fails. r=dexter 2016-04-13 12:55:31 +02:00
Georg Fritzsche
d21d4588ec Bug 1250640 - Part 1 - Avoid potential timer races in the TelemetrySession scheduler. r=dexter 2016-04-13 12:55:31 +02:00
Nicholas Nethercote
ae26e5712f Bug 1263484 - Remove the JS_MAIN_RUNTIME_TEMPORARY_PEAK telemetry measurement. r=chutten.
It's no longer useful.
2016-04-11 09:33:35 +10:00
Wes Kocher
d34e61e3ec Merge m-c to inbound, a=merge
MozReview-Commit-ID: 9YZdlIARozU
2016-04-08 16:47:03 -07:00
Dave Townsend
769fc8f245 Bug 1257246: Update toolkit for eslint 2. r=Gijs
Most of this is fixing functions that in some cases return a value but then
can also run to completion without returning anything. ESLint 2 catches this
where previous versions didn't. Unless there was an obvious other choice I just
made these functions return undefined at the end which is effectively what
already happens.

MozReview-Commit-ID: KHYdAkRvhVr
2016-04-05 11:33:48 -07:00
Jonathan Watt
dd031ae560 Bug 1263042 - When the crash reporter is disabled, avoid JavaScript strict warnings in Telemetry code during startup. r=gfritzsche 2016-03-23 10:24:41 +00:00
Benjamin Smedberg
8bdab4404f Bug 1187270 - Add Telemetry session ID to crash annotations, r=gfritzsche
MozReview-Commit-ID: GwVI0dfsT4H
2016-03-14 09:31:19 -04:00
Rob Wood
46057b021b Bug 1253633 - Don't put the TELEMETRY_TEST_* histograms into the Telemetry payload outside of tests; r=gfritzsche
MozReview-Commit-ID: FX5BsR2cUBh
2016-03-14 14:45:33 -04:00
malayaleecoder
90b08f4703 Bug 1252481 - Remove sum_squares_lo and sum_squares_hi from Histogram serialization. r=gfritzsche 2016-03-12 01:34:59 +05:30
Nicholas Nethercote
9a10481c08 Bug 1252375 - Fix up jemalloc stats reporting. r=erahm.
We have some oddities in our jemalloc stats reporting.

- "heap-overhead-ratio" is a strange measurement: overhead / non-overhead,
  expressed as a percentage. And it omits "bin_unused", which appears to be an
  oversight.

- "heap-committed" also omits "bin_unused".

- There are some minor errors in memory report descriptions.

This patch fixes these and improves the heap reporting. It makes the following
reporting changes:

- "heap-allocated": Duplicated as "heap-committed/allocated". (We keep
  "heap-allocated" because that's a special value used in the computation of
  "heap-unclassified".)

- "heap-committed/overhead": Added; it's the same as the sum of the
  "explicit/heap-overhead/*" values. Together with "heap-committed/allocated"
  it shows clearly what fraction of the heap is overhead and what fraction is
  useful.

- "heap-committed": Removed; now implicit as the "heap-committed/" node.

- "heap-overhead-ratio":
  - Removed from memory reports; now shown as the percentage of the new
    "heap-committed/overhead" node.
  - Still available as a distinguished amount (because it's useful in
    isolation) but renamed to heapOverheadFraction, and the telemetry ID is
    renamed as MEMORY_HEAP_OVERHEAD_FRACTION.

- "heap-chunks": Removed; it's not that interesting, and can be manually
  computed as "heap-mapped" / "heap-chunksize" if necessary.
2016-03-03 12:49:27 +11:00
Anthony Zhang
7c77d084d9 Bug 1250224 - Add a comment to clarify the purpose of TelemetrySession._childThreadHangs, etc. r=gfritzsche 2016-02-23 11:00:45 -05:00
Mark Finkle
d9b1c1a77d Bug 1246973 - Support clearing UI Telemetry when creating pings r=gfritzsche 2016-02-12 18:02:03 -05:00
Georg Fritzsche
126faa6bd3 Bug 1247258 - Use Array.prototype.includes in Telemetry code. r=dexter 2016-02-10 15:19:37 +01:00
Dave Townsend
a215a4a95a Bug 1245649: Turn on no-extra-semi. r=markh 2016-02-03 17:27:36 -08:00
Anthony Zhang
e2b001cb13 Bug 1242777 - Expose child process hang stats to Javascript. r=chutten
What it does:

Adds a new function, TelemetrySession.getChildThreadHangs(), which returns a promise resolving to an array of threadHangStats [1], one per process.

Note that processes that spawn or die while the function's promise is created but not resolved may be excluded from the final result.

How we do this:

1. Parent sends a MESSAGE_TELEMETRY_GET_CHILD_PAYLOAD message to each child, promising the results of these messages.
2. Child processes respond to parent with a MESSAGE_TELEMETRY_THREAD_HANGS, which contains BHR stats in the payload.
3. Parent combines all the child responses together and resolves the promise.

Plus a bunch of synchronization stuff and handling of edge cases since the number of child processes can change at any time.

Also, there is a 200ms timeout since we can't handle all of these cases. Specifically, when a child dies without responding, after all other child processes have responded.

Why we do this:

* We can technically get thread hang stats by retrieving Telemetry pings (see requestChildPayloads() in TelemetrySession for details), but this is very slow and can only be done for one process at a time.
* TelemetrySession is responsible for various Telemetry IPC-related tasks, and so is a natural place to expose this function (i.e., the function blends in well with the rest of the API).
* Statuser [2] uses this for quickly obtaining child process BHR stats. This allows us to get realtime hang monitoring for child processes.

[1]: https://dxr.mozilla.org/mozilla-central/source/toolkit/components/telemetry/nsITelemetry.idl#146
[2]: https://github.com/chutten/statuser
2016-01-28 13:52:07 -05:00
Wes Kocher
c9cf74f1d6 Backed out changeset 8ee5a700e4a2 (bug 1242777) to hopefully fix the intermittent hazard failures 2016-01-29 10:14:44 -08:00
Anthony Zhang
440b9297f0 Bug 1242777 - Expose child process hang stats to Javascript. r=chutten
What it does:

Adds a new function, TelemetrySession.getChildThreadHangs(), which returns a promise resolving to an array of threadHangStats [1], one per process.

Note that processes that spawn or die while the function's promise is created but not resolved may be excluded from the final result.

How we do this:

1. Parent sends a MESSAGE_TELEMETRY_GET_CHILD_PAYLOAD message to each child, promising the results of these messages.
2. Child processes respond to parent with a MESSAGE_TELEMETRY_THREAD_HANGS, which contains BHR stats in the payload.
3. Parent combines all the child responses together and resolves the promise.

Plus a bunch of synchronization stuff and handling of edge cases since the number of child processes can change at any time.

Also, there is a 200ms timeout since we can't handle all of these cases. Specifically, when a child dies without responding, after all other child processes have responded.

Why we do this:

* We can technically get thread hang stats by retrieving Telemetry pings (see requestChildPayloads() in TelemetrySession for details), but this is very slow and can only be done for one process at a time.
* TelemetrySession is responsible for various Telemetry IPC-related tasks, and so is a natural place to expose this function (i.e., the function blends in well with the rest of the API).
* Statuser [2] uses this for quickly obtaining child process BHR stats. This allows us to get realtime hang monitoring for child processes.

[1]: https://dxr.mozilla.org/mozilla-central/source/toolkit/components/telemetry/nsITelemetry.idl#146
[2]: https://github.com/chutten/statuser
2016-01-28 13:52:07 -05:00
Alessio Placitelli
2719074e9a Bug 1237700 - JavaScript warning: resource://gre/modules/TelemetrySession.jsm, line 1783: unreachable code after return statement. r=gfritzsche 2016-01-08 01:02:00 +01:00
Georg Fritzsche
f7cf0e8613 Bug 1200164 - Only do isOfficialTelemetry checks for Telemetry uploads. r=dexter 2015-12-18 19:35:05 +07:00
Chris H-C
77122e1c8b Bug 1198209 - Add a "Total Memory" Histogram. r=vladan
We now have all the necessary measurement APIs to get a full memory picture for
a running multi-process instance. However, there's no way to correlate one
particular RSS measurement on chrome with its USS measurements on content
processes.

So do that in TelemetrySession and report it.
2015-12-21 13:57:00 +01:00
Anup Kumar
af825059ba Bug 1201492 - Remove extended_statistics_ok from Telemetry histograms. r=dexter 2015-12-21 08:31:00 +01:00
Carsten "Tomcat" Book
9159668909 Backed out changeset d19ad724c64c (bug 1198209) for test failures in browser_aboutHealthReport.js 2015-12-21 14:28:43 +01:00
Chris H-C
563e0e33c5 Bug 1198209 - Add a "Total Memory" Histogram. r=vladan
We now have all the necessary measurement APIs to get a full memory picture for
a running multi-process instance. However, there's no way to correlate one
particular RSS measurement on chrome with its USS measurements on content
processes.

So do that in TelemetrySession and report it.
2015-12-18 07:48:00 +01:00
Patrick Nwoko
b32d51e2ec Bug 1217458 - change TelemetrySession comments to point to the correct bug number. r=dexter 2015-12-08 04:38:00 +01:00
Dave Townsend
66459b47af Bug 1229519: Fix toolkit/components/telemetry to pass eslint checks. r=gfritzsche 2015-12-03 10:02:02 -08:00
Tyler Steiman
b763693520 Bug 1226196 Lowers MEMORY_RESIDENT's buckets from 200 to 100. When building, MEMORY_RESIDENT_FAST correctly shows in the HISTOGRAMs in about:telemetry r=chutten 2015-11-23 11:19:04 -08:00
Chris H-C
ff72f599a0 Bug 1198209 - Add a histogram for USS r=Yoric
Unique Set Size (USS) could be described as "the amount of memory you could
expect to reclaim if you killed this process"

Resident Set Size (RSS) is USS with the addition of memory allocated by
shared memory.

To get a full picture of the memory use of a multi-process application is
impossible. A better guess than most is

Parent Process' RSS + sum(Child Processes' USS)

Or, from Telemetry:

Parent MEMORY_RESIDENT + sum(Children's MEMORY_UNIQUE)
2015-11-19 08:18:00 +01:00
Alessio Placitelli
6c90173d20 Bug 1222054 - Route shutdown/saved-session pings through TelemetrySend. r=gfritzsche 2015-11-10 07:34:00 +01:00
Carsten "Tomcat" Book
ea81f2050d merge mozilla-inbound to mozilla-central a=merge 2015-11-19 14:44:11 +01:00
simplyblue
2001f58122 Bug 1221505 - Remove osfile.jsm dependency from TelemetrySession.jsm. r=dexter 2015-11-17 16:55:47 +05:30
Birunthan Mohanathas
e1eeed0e68 Bug 1225861 - Fix collection of LOW_MEMORY_EVENTS_{PHYSICAL,VIRTUAL} histograms. r=njn 2015-11-19 09:13:50 +02:00
rthyberg
219aab6101 Bug 1190801 - Moved loadSessionData and split saveSessionData from TelemetrySession to TelemetryStorage. r=gfritzsche 2015-11-06 03:54:00 +01:00