Commit Graph

3174 Commits

Author SHA1 Message Date
Mark Banner
ec76a72706 Bug 1799314 - Convert consumers of testing modules to import ES modules direct (miscellaneous). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D161917
2022-11-17 12:00:32 +00:00
alwu
cb93cefdcc Bug 1800547 - add some profiler markers for media engine playback. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D162055
2022-11-15 18:45:56 +00:00
Cristian Tuns
4d37cf70f1 Backed out 19 changesets (bug 1541508) for causing xpcshell failures on test_notHeadlessByDefault.js CLOSED TREE
Backed out changeset 08476fa2bc27 (bug 1541508)
Backed out changeset 0bf7514845db (bug 1541508)
Backed out changeset aa612a5e9ef7 (bug 1541508)
Backed out changeset 6bb9360473f7 (bug 1541508)
Backed out changeset b3d8e92f50c2 (bug 1541508)
Backed out changeset fa40dded133e (bug 1541508)
Backed out changeset 2e7db4aa8d4f (bug 1541508)
Backed out changeset 6098e2eb62ea (bug 1541508)
Backed out changeset 2c599ee639c4 (bug 1541508)
Backed out changeset 7d44f6e2644c (bug 1541508)
Backed out changeset c1279c3d674c (bug 1541508)
Backed out changeset 8bd08a62a590 (bug 1541508)
Backed out changeset 740010cb005c (bug 1541508)
Backed out changeset 0bfc7dd85c62 (bug 1541508)
Backed out changeset c4374a351356 (bug 1541508)
Backed out changeset 44ccfeca7364 (bug 1541508)
Backed out changeset e944e706a523 (bug 1541508)
Backed out changeset 2c59d66f43e4 (bug 1541508)
Backed out changeset a1896eacb6f1 (bug 1541508)
2022-11-01 22:38:52 -04:00
Barret Rennie
bff6b9dd65 Bug 1541508 - Use Services.env in tools/ r=marco
Differential Revision: https://phabricator.services.mozilla.com/D160150
2022-11-02 02:08:59 +00:00
Florian Quèze
4bba6dade3 Bug 1528859 - Replace %p with the process id in the MOZ_PROFILER_SHUTDOWN environment variable, r=canaltinova.
(Original patch by Gerald Squelart <gsquelart@mozilla.com>)

Differential Revision: https://phabricator.services.mozilla.com/D157193
2022-11-01 20:25:23 +00:00
Florian Quèze
6a265545a8 Bug 1797734 - Include the CPU name in the meta data of profiles, r=canaltinova.
Differential Revision: https://phabricator.services.mozilla.com/D160500
2022-11-01 20:22:24 +00:00
Eden Chuang
66c572f595 Bug 1793940 - Disconnect StreamFilters on HttpChannelChild before relink ServiceWorker fallback channel. r=necko-reviewers,valentin
Since in D159582, the original HttpChannelChild/HttpChannelParent is reused instead of creating a new one. We need to clean up the StreamFilters which are already attached.

In original logic, this would be handled when StreamFilterParent::OnStartRequest is called(). By comparing the stored StreamFilterParent::mChannel and nsIRequest passed into StreamFilterParent::OnStartRequest, StreamFilterParent can know if the redirection happens or not, such that StreamFilterParent can decide should disconnect or not in OnStartRequest(). However, after D159582, since HttpChannelChild is reused, the logic would not work for ServiceWorker fallback redirection.

Opening the new nsHttpChannel in the parent process makes StreamFilters be attached to the original HttpChannelChild again, and it would send duplicate messages (OnStartRequest, OnDataAvailable, OnStopRequest) to the extension. So we need to remove the previous attached StreamFilters before opening the new channel.

In this patch, we introduce a new IPC method PHttpBackgroundChannel::DetachStreamFilters to inform the corresponding HttpChannelChild to disconnect StreamFilters. Unfortunately this introduces that HttpChannelChild needs to keep weak references of StreamFilters since we have no way to traverse the HttpChannelChild's listener chain and do special handling in StreamFilterParent only.

Depends on D159582

Differential Revision: https://phabricator.services.mozilla.com/D160203
2022-10-28 00:33:47 +00:00
Florian Queze
b5546684d4 Bug 1797697 - Make names of power tracks for AMD CPUs on Windows 11 more user friendly, r=smaug.
Differential Revision: https://phabricator.services.mozilla.com/D160548
2022-10-27 22:08:11 +00:00
Florian Quèze
baad7da439 Bug 1795047 - Power use feature string should clarify what's available on each platform, r=canaltinova,dlrobertson.
Differential Revision: https://phabricator.services.mozilla.com/D159685
2022-10-20 16:01:51 +00:00
Cristian Tuns
68f6550eb9 Backed out changeset 94963e082433 (bug 1795047) for causing mochitest failures on performance-new/utils.js CLOSED TREE 2022-10-20 10:40:59 -04:00
Florian Quèze
d167696f69 Bug 1795047 - Power use feature string should clarify what's available on each platform, r=canaltinova,dlrobertson.
Differential Revision: https://phabricator.services.mozilla.com/D159685
2022-10-20 13:40:33 +00:00
Paul Adenot
6cd95831a0 Bug 1795840 - Add various markers around video frame scheduling. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D159580
2022-10-20 07:37:54 +00:00
Butkovits Atila
fea1444858 Backed out changeset d7d5dd2cdd78 (bug 1795840) for causing cppunit failures. CLOSED TREE 2022-10-19 21:28:11 +03:00
Paul Adenot
deeed27a1f Bug 1795840 - Add various markers around video frame scheduling. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D159580
2022-10-19 13:35:57 +00:00
Marian Laza
ee334b4183 Backed out changeset 0a01bc98928c (bug 1795840) for causing GTest failures on GeckoProfiler.cpp. CLOSED TREE 2022-10-19 13:55:58 +03:00
Paul Adenot
3e51c5282b Bug 1795840 - Add various markers around video frame scheduling. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D159580
2022-10-19 09:38:16 +00:00
Mark Banner
2ffde1e92f Bug 1792341 - Migrate more toolkit/modules consumers to use direct ES module import. r=Gijs,webdriver-reviewers,perftest-reviewers,necko-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,sgalich,owlish,bytesized,AlexandruIonescu,whimboo,mconley,mixedpuppy
Mainly automated changes. Some manual ESLint fixes and whitespace cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D158452
2022-10-18 11:21:26 +00:00
Florian Quèze
67e89c8064 Bug 1795171 - Add support for power profiling on Intel Macs, r=canaltinova.
Differential Revision: https://phabricator.services.mozilla.com/D159338
2022-10-14 12:31:06 +00:00
Dan Robertson
72a89cb2db Bug 1794327 - Record RAPL perf events as a profile counter. r=florian
Poll the RAPL perf events on linux to provide useful power data as a profile
counter.

Differential Revision: https://phabricator.services.mozilla.com/D158919
2022-10-12 23:24:38 +00:00
Florian Queze
f5868e76cd Bug 1725076 - Make profile.meta.oscpu show when we are running on Windows 11, r=canaltinova.
Differential Revision: https://phabricator.services.mozilla.com/D158421
2022-10-11 19:34:48 +00:00
Paul Adenot
48e7b9e399 Bug 1793392 - MicroGeckoProfiler declaraction should be extern C. r=heftig
Differential Revision: https://phabricator.services.mozilla.com/D158660
2022-10-05 14:08:13 +00:00
Mike Hommey
cbd2293129 Bug 1791481 - Avoid tail-call optimization of call to GetAndCheckStackTrace. r=mstange
While here, change the gtest to display how many tests passed.

Differential Revision: https://phabricator.services.mozilla.com/D157888
2022-10-04 05:16:06 +00:00
Paul Adenot
e497d5abef Bug 1791900 - Change cubeb vendoring manifest, swapping out cubeb_tracing.h with something that uses MicroGeckoProfiler.h. r=cubeb-reviewers,kinetik
Differential Revision: https://phabricator.services.mozilla.com/D157879
2022-10-01 07:59:44 +00:00
Butkovits Atila
0f722acbe5 Backed out 3 changesets (bug 1791896, bug 1791900) for causing build bustages. CLOSED TREE
Backed out changeset baaa1b7a2fd2 (bug 1791900)
Backed out changeset 0685eba4e0d6 (bug 1791900)
Backed out changeset 51fdfb5f4d52 (bug 1791896)
2022-09-30 03:59:10 +03:00
Paul Adenot
0c5ec11141 Bug 1791900 - Change cubeb vendoring manifest, swapping out cubeb_tracing.h with something that uses MicroGeckoProfiler.h. r=cubeb-reviewers,kinetik
Differential Revision: https://phabricator.services.mozilla.com/D157879
2022-09-30 00:23:13 +00:00
Mark Banner
8d1ebcb9d6 Bug 1792365 - Convert toolkit/modules consumers to use ES module imports directly. r=webdriver-reviewers,perftest-reviewers,geckoview-reviewers,extension-reviewers,preferences-reviewers,desktop-theme-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,robwu,Gijs,sgalich,bytesized,AlexandruIonescu,dao,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D158094
2022-09-29 06:52:34 +00:00
Andrew McCreight
2da84b8ac4 Bug 1792574, part 3 - Don't include nsMemory where it isn't needed. r=xpcom-reviewers,necko-reviewers,valentin,nika
There are only 3 places where nsMemory.h is still needed (image/RasterImage.cpp,
gfx/thebes/gfxFT2FontList.cpp, and nsMemory.cpp). Remove the rest.

Differential Revision: https://phabricator.services.mozilla.com/D158213
2022-09-28 15:17:46 +00:00
Joel Maher
4c4438b4f7 Bug 1536208 - removing old aarch64 manifest annotations. r=aryx,application-update-reviewers,bytesized
Differential Revision: https://phabricator.services.mozilla.com/D157677
2022-09-21 15:35:02 +00:00
Nika Layzell
0316dc51b9 Bug 1790614 - Part 2: Use {ASSERT,ENSURE}_NS_{SUCCEEEDED,FAILED} in gtests, r=ahal,necko-reviewers
These macros will produce better outputs when they fail than these existing
patterns using `ENSURE_TRUE(NS_SUCCEEDED(...))` or similar, so this is a bulk
rewrite of existing tests to use them.

It should also help with discoverability when people base their tests off of
other existing tests.

Differential Revision: https://phabricator.services.mozilla.com/D157214
2022-09-15 14:51:50 +00:00
Gerald Squelart
92a9be7744 Bug 1774773 - Added atomic locking around marker schema functions - r=florian
To avoid real or apparent races to the list of marker schema functions, some
bits of the atomic count are used to effectively implement a RWLock, so that
any number of threads can add their own new marker schema concurrently, while
the profile-capture reading of the whole list can only be done on its own.

Differential Revision: https://phabricator.services.mozilla.com/D157310
2022-09-15 03:39:00 +00:00
Gerald Squelart
3ff540628c Bug 1789333 - Profiler back-end overview doc - r=canaltinova
Images were generated from UMLet document, program available at: https://www.umlet.com/

Differential Revision: https://phabricator.services.mozilla.com/D156522
2022-09-14 04:32:16 +00:00
Gerald Squelart
372749cf93 Bug 1612799 - Add gtest to test failure injected by marker - r=canaltinova
There is no easy way to inject failures like OOM during the JSON generation
process, except from markers, which have direct access to the
SpliceableJSONWriter that may now use a fallible FailureLatchSource.

Differential Revision: https://phabricator.services.mozilla.com/D155664
2022-09-05 01:19:34 +00:00
Gerald Squelart
dba16709d9 Bug 1612799 - Handle failures when generating child profile - r=canaltinova
Use a fallible FailureLatchSource, and record the failure message (if any).

Differential Revision: https://phabricator.services.mozilla.com/D155663
2022-09-05 01:19:33 +00:00
Gerald Squelart
59d14ed295 Bug 1612799 - Handle failures when generating shutdown profile - r=canaltinova
Use a fallible FailureLatchSource, and record the failure message (if any).

Differential Revision: https://phabricator.services.mozilla.com/D155662
2022-09-05 01:19:33 +00:00
Gerald Squelart
bcccce43c1 Bug 1612799 - Handle failures in nsProfiler - r=canaltinova
Switch from the FailureLatchInfallibleSource singleton to a local fallible FailureLatchSource.

Differential Revision: https://phabricator.services.mozilla.com/D155661
2022-09-05 01:19:32 +00:00
Gerald Squelart
7a6721a5c5 Bug 1612799 - Pass a FailureLatch to EntryGetter, to potentially exit early on failure - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D155660
2022-09-05 01:19:32 +00:00
Gerald Squelart
aaa6b9c690 Bug 1612799 - Handle failures and exit early in main JSON-generation function - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D155659
2022-09-05 01:19:32 +00:00
Gerald Squelart
9225e9b0f1 Bug 1612799 - Make JITFrameInfo operations fallible - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D155658
2022-09-05 01:19:31 +00:00
Gerald Squelart
e41fd56546 Bug 1612799 - Make UniqueStacks operations fallible - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D155657
2022-09-05 01:19:31 +00:00
Gerald Squelart
474f0cf9c9 Bug 1612799 - Make UniqueStacks a FailureLatch - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D155656
2022-09-05 01:19:30 +00:00
Gerald Squelart
001b0d4ec0 Bug 1612799 - JITFrameInfo carries its own FailureLatchSource - r=canaltinova
Because JITFrameInfo objects are creating *during* profiling, they need to have
their own fallible FailureLatchSource, so that any error can be safely handled
even before we know which FailureLatch will be used in the final JSON
generation work.

Differential Revision: https://phabricator.services.mozilla.com/D155655
2022-09-05 01:19:30 +00:00
Gerald Squelart
892f66577e Bug 1612799 - Make ProcessStreamingContext a FailureLatch - r=canaltinova
This will help with forwarding the chosen FailureLatch to the code and
structures gathering per-thread samples and markers.

Differential Revision: https://phabricator.services.mozilla.com/D155654
2022-09-05 01:19:30 +00:00
Gerald Squelart
7dc3f8d14e Bug 1612799 - Make UniqueJSONStrings a FailureLatch - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D155652
2022-09-05 01:19:29 +00:00
Gerald Squelart
1339f652fd Bug 1612799 - Make Spliceable{,Chunked}JSONWriter a FailureLatch - r=canaltinova
For now, all users specify an infallible latch.

Differential Revision: https://phabricator.services.mozilla.com/D155651
2022-09-05 01:19:28 +00:00
Gerald Squelart
cc671ebfb1 Bug 1612799 - Make ChunkedJSONWriteFunc a FailureLatch, with optionally-fallible operations - r=canaltinova
Note that at this point, it's using the FailureLatchInfallibleSource singleton,
so operations are still effectively infallible, i.e. they will terminate the
program.
But users already handle future fallible outcomes.

Differential Revision: https://phabricator.services.mozilla.com/D155649
2022-09-05 01:19:28 +00:00
Michael Froman
576ec4496f Bug 1766646 (MOZ) - mirror changes from upstream's rtc_base/trace_event.h 2022-08-30 10:30:42 -04:00
Mark Banner
65b92de13b Bug 1786197 - Turn on ESLint rule for prefer-boolean-length-check for tools. r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D155176
2022-08-26 13:39:38 +00:00
Gerald Squelart
90b45a2617 Bug 1785745 - Make UniqueStack::mUniqueStrings and mCodeAddressService private - r=canaltinova
This makes it easier to understand how these are actually used, and constrain
these uses as intended.

Differential Revision: https://phabricator.services.mozilla.com/D154960
2022-08-22 21:31:48 +00:00
Gerald Squelart
f4a903ae13 Bug 1785745 - Convert struct JITFrameInfo into a proper class - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D154958
2022-08-22 21:31:47 +00:00
Gerald Squelart
bb96954e6d Bug 1785741 - Remove unused profiler_get_profile_json_into_lazily_allocated_buffer - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D154954
2022-08-18 22:26:09 +00:00