Commit Graph

424 Commits

Author SHA1 Message Date
Nicholas Nethercote
a35e82f193 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
fdceb69955 Bug 1395835 - Rename "group" to "category" in the scalar code and docs. r=chutten
MozReview-Commit-ID: HQ3I2cfEaa
2017-09-27 10:12:13 +02:00
Alessio Placitelli
e24412e896 Bug 1393801 - Enable dynamic scalar registration. f=gfritzsche,r=billm,chutten
MozReview-Commit-ID: JlRk7hLV5QD
2017-08-29 13:05:40 +02:00
Chris H-C
eabcba7afb 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
2017-08-22 09:42:09 -04:00
Michael Layzell
429b4e3eb7 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
f2fe978e6f 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
c115daf948 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
983d3050d2 Backed out changeset bd63a8fecf00 (bug 1380081) 2017-08-11 09:28:47 +02:00
Sebastian Hengst
e67b0c168b Backed out changeset 6bc453505dc3 (bug 1380081) 2017-08-11 09:28:27 +02:00
Sebastian Hengst
403fe2bb62 Backed out changeset 9158ca4292bb (bug 1380081) 2017-08-11 09:28:06 +02:00
Michael Layzell
11a5364fae 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
ed445e5753 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
33751c95e2 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
9385f14125 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.
2017-08-03 07:03:00 -04:00
Avikalpa Kundu
1b356cea57 Bug 1370489 - Factor out TelemetryIOInterposeObserver from Telemetry.cpp. r=gfritzsche 2017-06-15 17:42:00 -04:00
Chris H-C
43ee3b33fc 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
bccaccd801 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
372571d466 merge mozilla-inbound to mozilla-central a=merge 2017-06-27 10:56:41 +02:00
Bill McCloskey
ce42826bdf Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Iaroslav (yarik) Sheptykin
5b0d858815 Bug 1373900: Factor ThreadHangStats implementation out of Telemetry.cpp. r=chutten
MozReview-Commit-ID: C106sVX04s
2017-06-22 09:54:05 +02:00
Nicholas Nethercote
55c693e8f9 Bug 1375299 (part 1) - Reduce usage of MOZ_GECKO_PROFILER. r=mstange.
This patch reduces the differences between builds where the profiler is enabled
and those where the profiler is disabled. It does this by removing numerous
MOZ_GECKO_PROFILER checks.

These changes have the following consequences.

- Various functions and classes are now defined in all builds, and so can be
  used unconditionally: profiler_add_marker(), profiler_set_js_context(),
  profiler_clear_js_context(), profiler_get_pseudo_stack(), AutoProfilerLabel.
  (They are effectively no-ops in non-profiler builds, of course.)

- The no-op versions of PROFILER_* are now gone. The remaining versions are
  almost no-ops when the profiler isn't built.
2017-06-22 06:26:16 +10:00
Iaroslav (yarik) Sheptykin
04e8b98ba9 Bug 1371900: Factored ProcessedStack out of Telemetry.cpp. r=gfritzsche
MozReview-Commit-ID: IKe8btKJ028
2017-06-10 19:34:44 +02:00
Carsten "Tomcat" Book
bbe9441993 Backed out changeset 9846de3bd954 (bug 1372405) 2017-06-20 08:27:02 +02:00
Bill McCloskey
f69608368b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-19 22:25:47 -07:00
Bevis Tseng
e6dc9e02bc Bug 1372453 - Part 2: Name the caller of ProxyReleaseEvent. r=billm
MozReview-Commit-ID: LYhSWnZkq0i
2017-06-14 09:27:17 +08:00
Michael Layzell
956290a1de Bug 1369594 - Get module information for BHR off main thread, r=froydnj
MozReview-Commit-ID: L0ANHNKKAkY
2017-06-16 14:55:15 -04:00
Iaroslav (yarik) Sheptykin
6f8ac1bdef Bug 1371927: Build KeyedStackCapture only if profiler enabled. r=gfritzsche
MozReview-Commit-ID: 9IoVY2K5hXc
2017-06-10 19:59:16 +02:00
Carsten "Tomcat" Book
f255f33b09 Backed out changeset 86bec347e28b (bug 1371927) on request from gfritsche 2017-06-13 11:11:14 +02:00
Iaroslav (yarik) Sheptykin
2383299032 Bug 1371927: Build KeyedStackCapture only if profiler enabled. r=gfritzsche
MozReview-Commit-ID: 9IoVY2K5hXc
2017-06-10 19:59:16 +02:00
Iaroslav (yarik) Sheptykin
d0c385e8c6 Bug 1335461: Pulling out stack capturing into standalone files. r=gfritzsche
MozReview-Commit-ID: APuclfFyJri
2017-06-01 09:36:51 +02:00
Georg Fritzsche
d6aa4893d1 Bug 1367281 - Wait on member Mutexes in TelemetryImpl destructor. r=chutten 2017-05-24 16:53:01 +07:00
Michael Layzell
b9d964735a Bug 1363883 - Share memory maps between BHR native stacks, dr=bsmedberg, r=froydnj
MozReview-Commit-ID: IQ1fMXUD0ch
2017-05-23 13:41:52 -04:00
Paolo Amadini
9887430efa Bug 1362384 - Remove code to import data from "downloads.sqlite". r=mak
When upgrading an old profile that still uses "downloads.sqlite", information about in-progress and paused downloads will be lost. The history of completed downloads will be preserved because it is stored in the Places database, although it may be affected by history expiration.

MozReview-Commit-ID: GFqvACKC4E1
2017-05-15 10:48:04 +01:00
Michael Layzell
7d3fc6981d Bug 1358619 - Fetch the stack and native stack within the same pause of the target thread, r=froydnj 2017-05-01 13:40:37 -04:00
Gabriele Svelto
b9cab3fec0 Bug 1356673 - Run the pingsender executable in a way that avoids shutdown races with mozalloc; r=Dexter
When sending the shutdown ping we launched the pingsender executable via
PR_CreateProcessDetached() which on both Linux and MacOS X would fork()
gecko's main process and then exec() the pingsender executable. On MacOS X
this seemed to trigger a race with the mozalloc shutdown procedure within the
forked process. This patch changes the telemetry logic to use nsIProcess
instead which relies on posix_spawnp() to launch the new executable making it
immune to issues related to mozalloc's shutdown.

Since we don't need C++ code anymore to run the pingsender the runPingSender()
method is also moved to TelemtrySend.

MozReview-Commit-ID: C7fZw1ZpVBO
2017-04-25 01:07:36 +02:00
Gabor Krizsanits
bb288d9a9c Bug 1352961 - P1: Exposing a timer to JS that can be used across the process boundaries. r=chutten 2017-04-25 17:11:05 +02:00
Chris H-C
a2a550854b bug 1353295 - Remove addonHistograms from Telemetry r=Dexter
addonHistograms isn't being used and has started getting in the way.
So it goes.

Leave the "Addon Histograms" section in about:telemetry for 60 days.
Remove it in bug 1355882

MozReview-Commit-ID: 4lm7ONirofl
2017-04-06 15:31:58 -04:00
Carsten "Tomcat" Book
6d5a053fe2 Backed out changeset cfe47bace342 (bug 1353295) for assertion failures 2017-04-13 09:39:17 +02:00
Chris H-C
79504a7b9d bug 1353295 - Remove addonHistograms from Telemetry r=Dexter
addonHistograms isn't being used and has started getting in the way.
So it goes.

Leave the "Addon Histograms" section in about:telemetry for 60 days.
Remove it in bug 1355882

MozReview-Commit-ID: 4lm7ONirofl
2017-04-06 15:31:58 -04:00
Marco Bonardo
aea9513618 Bug 977177 - Add favicons.sqlite to profile related lists. r=adw,jmaher
MozReview-Commit-ID: HkYpXQ0UFmd
2017-03-30 13:08:05 +02:00
Gregory Moore
7ef3821068 Bug 1271991 - Store recording state locally in Telemetry.cpp to avoid excessive locking in CanRecord{Base, Extended}().
MozReview-Commit-ID: FHin1oKEmCn
2017-04-11 10:52:54 -04:00
Gabriele Svelto
ad6e2212ea Bug 1345153 - When the pingsender fails to send a ping, persist it to disk so that it can be sent later via regular telemetry; r=chutten,ted
Currently we hand over a crash ping to the pingsender via a pipe; if the
pingsender fails to send the ping we rely on the CrashManager assembling and
sending one instead. Since the crashmanager is not aware of whether the ping
was sent or not this causes duplication on the server side. To solve this
problem we save the ping to disk instead, read it from the pingsender and
delete the file only if the ping was sent. In this scenario the CrashManager
will know that a ping was already sent and will not send a new one.

This patch removes all the code used to deal with pipes between the telemetry,
crashreporter and pingsender code and also tries to cut down the amount of
platform-specific code we have in this machinery.

MozReview-Commit-ID: ASm2jnDagCK
2017-03-27 12:38:39 +02:00
Jan Beich
9e07c8157e Bug 1347661 - Unbreak --enable-warnings-as-errors on platforms without Gecko Profiler. r=gfritzsche
MozReview-Commit-ID: Jp2HsYItboc
2017-03-15 19:05:33 +00:00
Markus Stange
17d77cd42e Bug 1329111 - Rename SharedLibraryInfo::mName to mModuleName, and consistently cut off the path on all platforms. r=marco
MozReview-Commit-ID: 8gqqVjTjy1Z
2017-03-14 17:07:43 -04:00
Sebastian Hengst
cbd672f1b0 Backed out changeset ff2306d8e07f (bug 1329111) for lacking a semicolon in devtools/server/performance/profiler.js. r=backout 2017-03-16 20:00:34 +01:00
Markus Stange
e4e7fce9d5 Bug 1329111 - Rename SharedLibraryInfo::mName to mModuleName, and consistently cut off the path on all platforms. r=marco
MozReview-Commit-ID: 8gqqVjTjy1Z
2017-03-14 17:07:43 -04:00
clinton
4213fb3b39 Bug 1346208 - Remove B2G-specific code from Telemetry C++ modules r=gfritzsche
MozReview-Commit-ID: 3iU7OcHePno
2017-03-12 10:38:22 +11:00
Marco Castelluccio
7a13c2898d Bug 1342034 - Fix documentation of getLoadedModules in nsITelemetry.idl. r=Dexter 2017-03-07 07:08:00 -05:00
Mike Conley
6b1b0329c3 Bug 1312883 - Use MozStackWalk to gather native stacks on Windows. r=gfritzsche,jchen,liuche
MozReview-Commit-ID: A2aZAL03FG2
2017-02-16 12:05:46 -05:00
Sebastian Hengst
08f2233e92 Backed out changeset fddfc0739043 (bug 1312883) 2017-02-24 14:25:15 +01:00