2537 Commits

Author SHA1 Message Date
Mike Hommey
1654ae7332 Bug 1751331 - Use the mozbuild crate in moz_asserts. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D136560
2022-01-25 21:29:50 +00:00
Mike Hommey
b049d1d9cf Bug 1751331 - Use the mozbuild crate in mozglue-static. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D136559
2022-01-25 21:29:50 +00:00
Mike Hommey
e7c54fc571 Bug 1751331 - Remove MOZ_DIST. r=firefox-build-system-reviewers,mhentges
As mentioned in bug 1747354, the location of the dist directory is
relied to be $topobjdir/dist, so just use that consistently rather
than getting it from a separate variable for rust build scripts.

Differential Revision: https://phabricator.services.mozilla.com/D136556
2022-01-25 21:29:49 +00:00
Noemi Erli
f471472a6b Backed out 2 changesets (bug 1678152, bug 1751041) for causing failures in test_missing_intermediate.js CLOSED TREE
Backed out changeset 034ae0e4c467 (bug 1751041)
Backed out changeset 46640f068ae4 (bug 1678152)
2022-01-25 20:09:51 +02:00
Gabriele Svelto
6ef49e257c Bug 1751041 - Compute the process startup timestamp early during startup r=glandium
Previously the process startup timestamp was computed lazily but this caused
some issues with some of our static analysis infra (see bug 1678152). This
moves computing the timestamp early during process startup and makes it happen
unconditionally.

Differential Revision: https://phabricator.services.mozilla.com/D136406
2022-01-25 16:41:21 +00:00
criss
592389ca2d Backed out 10 changesets (bug 1751331) for causing bustages. CLOSED TREE
Backed out changeset 5ce212465a26 (bug 1751331)
Backed out changeset 14d62b8ffa5a (bug 1751331)
Backed out changeset 76f46bd9afa1 (bug 1751331)
Backed out changeset 147faaad046f (bug 1751331)
Backed out changeset f85b049d12f9 (bug 1751331)
Backed out changeset 16d8d3f8378b (bug 1751331)
Backed out changeset 1cd9386a3927 (bug 1751331)
Backed out changeset 20faacba6db6 (bug 1751331)
Backed out changeset 7d17f75bcb38 (bug 1751331)
Backed out changeset 28b9aab1f174 (bug 1751331)
2022-01-25 13:00:25 +02:00
Mike Hommey
47b241bdee Bug 1751331 - Use the mozbuild crate in moz_asserts. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D136560
2022-01-25 09:03:02 +00:00
Mike Hommey
f81fea13ae Bug 1751331 - Use the mozbuild crate in mozglue-static. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D136559
2022-01-25 09:03:02 +00:00
Mike Hommey
5999e70213 Bug 1751331 - Remove MOZ_DIST. r=firefox-build-system-reviewers,mhentges
As mentioned in bug 1747354, the location of the dist directory is
relied to be $topobjdir/dist, so just use that consistently rather
than getting it from a separate variable for rust build scripts.

Differential Revision: https://phabricator.services.mozilla.com/D136556
2022-01-25 09:03:01 +00:00
Jon Coppeard
9463e6b80e Bug 1664535 - Remove TSAN suppression now write barriers are not triggered on background threads r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D100139
2022-01-24 16:32:57 +00:00
Sam Foster
d60fc9a269 Bug 1747429 - Replace preprocessor urlbar* variables with CSS vars. r=dao
* Define urlbarMarginInline and urlbarSearchButtonWidth as CSS rather than preprocessor variables
* Replace the urlbarViewPadding, urlbarViewFaviconWidth and urlbarViewIconMarginEnd preprocessor variables with CSS vars.
* Remove %ifdefs around the license comment in these 2 files
* Update ambiguous/out-of-date comment in the skeleton UI code

Differential Revision: https://phabricator.services.mozilla.com/D135962
2022-01-20 22:46:29 +00:00
Alexandru Michis
c5d4f89a03 Backed out changeset 338f8b736b41 (bug 1747429) as requested by sfoster. 2022-01-20 20:58:34 +02:00
Sam Foster
d292d48758 Bug 1747429 - Replace preprocessor urlbar* variables with CSS vars. r=dao
* Define urlbarMarginInline and urlbarSearchButtonWidth as CSS rather than preprocessor variables
* Replace the urlbarViewPadding, urlbarViewFaviconWidth and urlbarViewIconMarginEnd preprocessor variables with CSS vars.
* Remove %ifdefs around the license comment in these 2 files
* Update ambiguous/out-of-date comment in the skeleton UI code

Differential Revision: https://phabricator.services.mozilla.com/D135962
2022-01-20 00:48:42 +00:00
Gerald Squelart
6ad9abfa16 Bug 1750452 - Replace mutex-locked sampling pause during exec() with atomic variable - r=emilio,mstange
Note: The atomic variable is named `gSkipSampling`, not mentioning forks because it could later be used in other situations, so it's best to describe it by the effect it has.

Differential Revision: https://phabricator.services.mozilla.com/D136205
2022-01-19 03:05:44 +00:00
Gerald Squelart
18d4946ed0 Bug 1744670 - New feature: "Process CPU Utilization" aka "processcpu" - r=florian,canaltinova
The actual implementation is in the following patch.

Differential Revision: https://phabricator.services.mozilla.com/D133599
2022-01-17 23:01:29 +00:00
Mike Hommey
baf00f49c1 Bug 1750084 - Update builders to rustc 1.58. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D135933
2022-01-14 00:37:03 +00:00
Emilio Cobos Álvarez
b09928db79 Bug 1685752 - Add crossbeam_deque's steal to the tsan suppressions. r=Gankra,decoder
Differential Revision: https://phabricator.services.mozilla.com/D135910
2022-01-13 23:42:28 +00:00
Csoregi Natalia
4bb70cbbbc Backed out changeset b745ade60c2c (bug 1750084) for causing gecko decision failure. CLOSED TREE 2022-01-14 01:14:19 +02:00
Mike Hommey
b617ba4e96 Bug 1750084 - Update builders to rustc 1.58. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D135933
2022-01-13 22:18:26 +00:00
Gerald Squelart
67edebb322 Bug 1749498 - PrintUsage doesn't exit anymore, exits are done explicitly - r=canaltinova
`PrintUsageThenExit(code)` was supposed to exit when `code` was not zero, but:
- The name didn't reflect that, so it was confusing that `PrintUsageThenExit(0)` would *not* exit.
- The implementation in the Base Profiler exited anyway! This caused issues with some legacy code that still used the now-removed "threads" feature.

This patch renames the function to just `PrintUsage()` and never exits, leaving the caller to invoke `exit(code)` as needed -- with the added benefit that it's possible to exit with a zero code, useful in cases where an exit is not actually an error.

Differential Revision: https://phabricator.services.mozilla.com/D135666
2022-01-12 12:16:59 +00:00
Cristian Tuns
dea3b789a7 Backed out 2 changesets (bug 1617369, bug 1519636) for causing lint failures on multiple files. CLOSED TREE
Backed out changeset 6726892a0012 (bug 1617369)
Backed out changeset c08caa5f8504 (bug 1519636)
2022-01-11 04:38:34 -05:00
Andi-Bogdan Postelnicu
91c41ec2e4 Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio
Updated with rustfmt 1.4.37-stable (f1edd04 2021-11-29)

Differential Revision: https://phabricator.services.mozilla.com/D135527
2022-01-11 09:16:57 +00:00
Mike Hommey
cca868ba68 Bug 1730004 - Add a crate with diagnostic / nightly asserts. r=nika,emilio
Original patch by emilio.

Differential Revision: https://phabricator.services.mozilla.com/D125190
2022-01-07 21:24:45 +00:00
Andreas Pehrson
2ff8332d74 Bug 1748280 - Gecko Profiler: Fix std::tuple deserialization. r=gerald
I'm gonna guess there was no existing use of the tuple
serialization/deserialization code, because `Bytes` doesn't exist in the
deserializer, and cannot possibly function properly on tuple members that
serialize to a non-constant size, since it's called on a default-constructed
tuple.

This patch took inspiration in the deserializer for Variant and seems to work
fine.

Differential Revision: https://phabricator.services.mozilla.com/D135028
2022-01-05 15:26:24 +00:00
Butkovits Atila
64c8533f75 Backed out 7 changesets (bug 1746361, bug 1748280, bug 1746347) for causing failures at browser_interaction-between-interfaces.js. CLOSED TREE
Backed out changeset eccba94506f0 (bug 1748280)
Backed out changeset baf39ae53772 (bug 1748280)
Backed out changeset 775843562f7e (bug 1748280)
Backed out changeset 0987c68e9683 (bug 1748280)
Backed out changeset 58dd008520da (bug 1746361)
Backed out changeset 6f9e800877a6 (bug 1746347)
Backed out changeset f78e794a9c2f (bug 1746347)
2022-01-05 13:53:57 +02:00
Andreas Pehrson
48daffe4ff Bug 1748280 - Gecko Profiler: Fix std::tuple deserialization. r=gerald
I'm gonna guess there was no existing use of the tuple
serialization/deserialization code, because `Bytes` doesn't exist in the
deserializer, and cannot possibly function properly on tuple members that
serialize to a non-constant size, since it's called on a default-constructed
tuple.

This patch took inspiration in the deserializer for Variant and seems to work
fine.

Differential Revision: https://phabricator.services.mozilla.com/D135028
2022-01-05 10:54:21 +00:00
Jonathan Watt
20736c98d6 Bug 1747952 - Include discovered/network printers in the CUPS list, with a timeout. r=emilio,decoder
The timeout is configurable via the pref print.cups.enum_dests_timeout_ms.

Differential Revision: https://phabricator.services.mozilla.com/D134844
2022-01-03 17:20:03 +00:00
Mike Hommey
1acc37c7a6 Bug 1747756 - Move Windows system libraries from LIBS to moz.build. r=firefox-build-system-reviewers,mhentges
While mingw builds don't require user32 and advapi32 explicitly, it doesn't
hurt for them to be there (and they're required for clang-cl build).
Likewise, while clang-builds don't require uuid and userenv explicitly
because they're pulled in via #pragmas in the source code, mingw doesn't
support those #pragmas and needs them explicitly, which doesn't hurt the
clang-cl builds.

Differential Revision: https://phabricator.services.mozilla.com/D134737
2021-12-30 20:56:43 +00:00
Iulian Moraru
b469802d84 Backed out changeset 7f9b4b6191ad (bug 1747756) for causing multiple failures. CLOSED TREE 2021-12-30 01:59:26 +02:00
Mike Hommey
cb50a5444f Bug 1747756 - Move Windows system libraries from LIBS to moz.build. r=firefox-build-system-reviewers,mhentges
While mingw builds don't require user32 and advapi32 explicitly, it doesn't
hurt for them to be there (and they're required for clang-cl build).
Likewise, while clang-builds don't require uuid and userenv explicitly
because they're pulled in via #pragmas in the source code, mingw doesn't
support those #pragmas and needs them explicitly, which doesn't hurt the
clang-cl builds.

Differential Revision: https://phabricator.services.mozilla.com/D134737
2021-12-29 22:18:52 +00:00
Gerald Squelart
1144535227 Bug 1729815 - Remove unnecessary profiler feature "threads" - r=julienw,perftest-reviewers,AlexandruIonescu
This feature doesn't have any effect anymore.

Differential Revision: https://phabricator.services.mozilla.com/D133860
2021-12-20 21:03:09 +00:00
Gerald Squelart
7b40fa572e Bug 1729815 - Allow empty feature list, or bitset=0 - r=julienw
This is necessary, because the next patch will remove the "threads" feature, and some tests only add that one feature so now they will have an empty feature list, equivalent to a feature bitset of 0 (zero).

Differential Revision: https://phabricator.services.mozilla.com/D134136
2021-12-20 21:03:09 +00:00
Markus Stange
875a34857d Bug 1362277 - Add an entry for dyld to the shared library list on macOS. r=gerald
This patch was r+ed before by Ted, but it never landed because I initially intended
to address Ted's review comment (about making it work on 10.11 and below), and
because it needed to be rebased around bug 1374888.
The rebase turned out to be really simple, and Ted's review comment no longer applies
because Firefox no longer runs on 10.11 and below.

Profile with fix: https://share.firefox.dev/3oYzvO6

Differential Revision: https://phabricator.services.mozilla.com/D134008
2021-12-17 11:54:28 +00:00
Gerald Squelart
4199f5065e Bug 1734867 - Use single static buffer when capturing stacks for main-thread markers - r=florian
The main thread is the busiest, so it benefits the most from having its own chunked buffer. This removes one allocation when capturing a marker stack on the main thread of each process.
That buffer is allocated when the first profiler starts, and is destroyed when the last profiler stops.

Note: Further improvements are possible (e.g.: Pool of pre-allocated buffers, attempting to use a stack-based buffer, etc.), but they are more complex and will require more work in future bugs.

Differential Revision: https://phabricator.services.mozilla.com/D133725
2021-12-17 05:27:06 +00:00
Gerald Squelart
0b5f1f299e Bug 1734867 - Refactor stack-capturing path in AddMarkerToBuffer - r=florian
The resulting code should be the same. The factored lambda will be called in the next patch with a different chunked buffer.

Differential Revision: https://phabricator.services.mozilla.com/D133724
2021-12-17 05:27:06 +00:00
Gerald Squelart
212a940977 Bug 1734867 - Allocate ProfilerBuffer's worker ChunkManager only when first needed - r=florian
Some ProfileBuffers are temporary and don't actually need this allocation.

Differential Revision: https://phabricator.services.mozilla.com/D133723
2021-12-17 05:27:05 +00:00
Cristian Tuns
348796281f Backed out changeset f90cb649f371 (bug 1729815) for causing mochitest failures on Mutex_posix.cpp CLOSED TREE 2021-12-16 19:45:55 -05:00
Gerald Squelart
c40dcd12b5 Bug 1729815 - Remove unnecessary profiler feature "threads" - r=julienw,perftest-reviewers,AlexandruIonescu
This feature doesn't have any effect anymore.

Differential Revision: https://phabricator.services.mozilla.com/D133860
2021-12-16 23:46:18 +00:00
Butkovits Atila
dc70e7f9d2 Backed out 3 changesets (bug 1734867) for causing assertion failures at ProfilerMarkers.cpp. CLOSED TREE
Backed out changeset bcddb167725c (bug 1734867)
Backed out changeset 7e01973ce58a (bug 1734867)
Backed out changeset 8b3b1ab8d743 (bug 1734867)
2021-12-16 18:02:35 +02:00
Gerald Squelart
1b1645bfdb Bug 1734867 - Use single static buffer when capturing stacks for main-thread markers - r=florian
The main thread is the busiest, so it benefits the most from having its own chunked buffer. This removes one allocation when capturing a marker stack on the main thread of each process.
That buffer is allocated when the first profiler starts, and is destroyed when the last profiler stops.

Note: Further improvements are possible (e.g.: Pool of pre-allocated buffers, attempting to use a stack-based buffer, etc.), but they are more complex and will require more work in future bugs.

Differential Revision: https://phabricator.services.mozilla.com/D133725
2021-12-16 11:06:29 +00:00
Gerald Squelart
754ed07803 Bug 1734867 - Refactor stack-capturing path in AddMarkerToBuffer - r=florian
The resulting code should be the same. The factored lambda will be called in the next patch with a different chunked buffer.

Differential Revision: https://phabricator.services.mozilla.com/D133724
2021-12-16 11:06:29 +00:00
Gerald Squelart
2b3ce6d818 Bug 1734867 - Allocate ProfilerBuffer's worker ChunkManager only when first needed - r=florian
Some ProfileBuffers are temporary and don't actually need this allocation.

Differential Revision: https://phabricator.services.mozilla.com/D133723
2021-12-16 11:06:28 +00:00
Mike Hommey
20bcb3ecfe Bug 1745344 - Unconditionally use va_copy. r=nika
Historically, va_copy was not supported everywhere (notably, MSVC didn't
have it). That's not true anymore. We already have code such as
xpcom/base/Logging.cpp that uses it unconditionally.

Differential Revision: https://phabricator.services.mozilla.com/D133458
2021-12-16 06:26:42 +00:00
Mike Hommey
57566b8ca4 Bug 1415595 - Remove unnecessary mode when opening ASHMEM_NAME_DEF. r=jld
Differential Revision: https://phabricator.services.mozilla.com/D133857
2021-12-15 23:56:33 +00:00
Cristian Tuns
b046625e06 Backed out 3 changesets (bug 1734867) for causing xpcshell failures on ProfileBufferChunkManager.h
Backed out changeset 63b2fd522aa8 (bug 1734867)
Backed out changeset 17219f7b60f5 (bug 1734867)
Backed out changeset 46bfc82686ac (bug 1734867)
2021-12-15 05:27:31 -05:00
Gerald Squelart
87084a5f4b Bug 1734867 - Use single static buffer when capturing stacks for main-thread markers - r=florian
The main thread is the busiest, so it benefits the most from having its own chunked buffer. This removes all but one allocation when capturing a marker stack on the main thread of each process.

Note: Further improvements are possible (e.g.: Pool of pre-allocated buffers, attempting to use a stack-based buffer, etc.), but they are more complex and will require more work in future bugs.

Depends on D133724

Differential Revision: https://phabricator.services.mozilla.com/D133725
2021-12-15 09:37:17 +00:00
Gerald Squelart
484d533cbc Bug 1734867 - Refactor stack-capturing path in AddMarkerToBuffer - r=florian
The resulting code should be the same. The factored lambda will be called in the next patch with a different chunked buffer.

Depends on D133723

Differential Revision: https://phabricator.services.mozilla.com/D133724
2021-12-15 09:37:17 +00:00
Gerald Squelart
060f1bb331 Bug 1734867 - Allocate ProfilerBuffer's worker ChunkManager only when first needed - r=florian
Some ProfileBuffers are temporary and don't actually need this allocation.

Differential Revision: https://phabricator.services.mozilla.com/D133723
2021-12-15 09:37:17 +00:00
Gerald Squelart
0aab2ce513 Bug 1745071 - Add IPCMessages to StartupExtraDefaultFeatures() - r=florian
Depends on D133301

Differential Revision: https://phabricator.services.mozilla.com/D133302
2021-12-09 11:48:22 +00:00
Gerald Squelart
9fef9b8f00 Bug 1745071 - Make DefaultFeatures() and StartupExtraDefaultFeatures() constexpr - r=florian
Small optimization.

Note that unfortunately AvailableFeatures() cannot be made constexpr because it uses getenv().

Differential Revision: https://phabricator.services.mozilla.com/D133301
2021-12-09 11:48:22 +00:00