9740 Commits

Author SHA1 Message Date
Mike Hommey
548aade9e4 Bug 1758780 - Update builders to clang 14. r=firefox-build-system-reviewers,mhentges,andi
Differential Revision: https://phabricator.services.mozilla.com/D143175
2022-04-21 04:36:24 +00:00
Gerald Squelart
c1b8cfb651 Bug 1765226 - Make ProfilerIOInterposeObserver a static object - r=florian
This removes some memory operations, and extends the observer's life.

Differential Revision: https://phabricator.services.mozilla.com/D144176
2022-04-20 23:39:21 +00:00
Barret Rennie
2e264dae56 Bug 1762493 - Remove Ajv r=ckerschb,ahal
Differential Revision: https://phabricator.services.mozilla.com/D142881
2022-04-20 15:23:28 +00:00
Nika Layzell
5e08e6891a Bug 1757802 - Don't keep alive Shmem shared memory regions on IProtocol, r=ipc-reviewers,jld
With this new approach, Shmem instances will now have their handles
transferred inline within messages as attachments, rather than being
associated with their actors and sent in separate messages.

This has a few advantages:

* The implementation is much simpler
* Releasing all references to a Shmem will automatically destroy it by
  RAII, rather than leaking the shared memory region until the toplevel
  actor is destroyed, removing the need for types like RaiiShmem.
* This allows re-transmitting Shmem instances to another process, as we
  don't close the shared memory region handle upon receiving it.

But also has a disadvantage that because we keep alive the shared memory
region's handle until the shmem is destroyed, so that it can be
re-transmitted, we may end up using more FDs or HANDLEs while running.

This patch intentionally doesn't change or simplify callsites, removing
APIs like RaiiShmem, in order to make it easier to revert if this causes
issues on platforms like Linux due to FD exhaustion. If we don't run
into increased resource exhaustion problems, we can make these changes
in a follow-up.

Differential Revision: https://phabricator.services.mozilla.com/D140211
2022-04-18 19:26:15 +00:00
Narcis Beleuzu
c5c85a1120 Backed out 1 changesets (bug 1763474) for assertion failures. CLOSED TREE
Backed out changeset 576565c650a1 (bug 1763474)
2022-04-15 02:26:13 +03:00
Florian Quèze
8f5736dae0 Bug 1763474 - Report thread wake-ups and CPU time per thread through glean, r=gerald,chutten
Differential Revision: https://phabricator.services.mozilla.com/D141147
2022-04-14 22:08:53 +00:00
Alexandre Lissy
cd822fce9c Bug 1761054 - Add Utility Processes with proper classification in about:processes r=nika,fluent-reviewers,flod,florian
Differential Revision: https://phabricator.services.mozilla.com/D141881
2022-04-14 16:22:21 +00:00
Florian Quèze
a62a18fff6 Bug 1764113 - avoid incrementing thread wakeup glean counters by 0, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D143580
2022-04-14 16:01:15 +00:00
Andrew Halberstadt
4e7c111145 Bug 1761502 - Make l10n linter error less scary when Mercurial doesn't exist, r=linter-reviewers,sylvestre
This case can happen for Git users.

Differential Revision: https://phabricator.services.mozilla.com/D143601
2022-04-14 13:02:50 +00:00
Christian Holler
8e5b003502 Bug 1764259 - [Fuzzing] Nyx replay mode. r=truber
Differential Revision: https://phabricator.services.mozilla.com/D143458
2022-04-14 12:10:14 +00:00
Christian Holler
cde0054620 Bug 1764258 - [Fuzzing] Nyx API enhancements. r=truber
Differential Revision: https://phabricator.services.mozilla.com/D143457
2022-04-14 12:10:13 +00:00
mleclair
8bec7c2846 Bug 1763269 - changed append method to make sure it appends to vector. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D143001
2022-04-13 23:26:45 +00:00
Gijs Kruitbosch
06c50f2feb Bug 1754299 - remove os.unlink call from mach doc that fails on Windows, r=ahal,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D143239
2022-04-13 09:51:24 +00:00
Mitchell Hentges
15510f9f26 Bug 1761150: Mach should use fresh system python, don't inherit sys.path r=ahal
Previously, when using the system Python packages, Mach would reuse the
values already existing in the `sys.path`. This had two benefits:
1. We didn't have to do work to calculate which paths the "system
   Python" specifically referred to.
2. This allowed us to support nested Mach calls
   (such as `./mach --virtualenv psutil ./mach build`).

However, it came with its own headaches, specifically around "consistent
imports" and Python subprocesses, such as in the following example
1. Mach runs "using system Python"
2. The "build" site (for example) would be activated. The current
   `sys.path` is included in the virtualenv's `mach.pth` file so that
   subprocesses will have access to the same packages as the primary
   Mach process
3. //Something// adds something to the `sys.path`
4. The build virtualenv is redundantly re-activated (such as due to
   generic setup code for some module). Though we don't physically
   re-activate the virtualenv, we //do// check that it's up-to-date to
   validate assumptions - **and it's not!** It's missing the
   //something// that was added to the `sys.path`.
5. We can't re-create the build virtualenv because it's already active,
   so:
6. An error is raised so that unexpected out-of-date-ness doesn't fly
   under the radar.

-----

This patch solves this by calculating the "system Python" paths in a
deterministic way. Then, even when using the system Python, the Mach and
command sites use define themselves in a consistent way.

This means that we can't do `./mach --virtualenv <venv> ./mach ...` to
shares `venv`'s packages with the whole new Mach process. Fortunately,
this has been replaced with  moving such packages into the nested Mach
command's requirements  definition instead.

TL;DR: more consistent, less failures. 👍

-----

One more detail, this time around the `sys_path()` function:
Ideally, we could calculate the standard library paths *and* the
"system" paths with only one Python subprocess. Unfortunately,
that's not the case:
* If `-S` isn't provided, then it's tricky to separate the standard
  library paths from the system paths
* If `-S` is provided, then doing `site.getsitepackages()` in a
  virtualenv returns the *system* site packages, not the virtualenv's.

To work around this, we call the external python twice, and in
parallel. This allows resolving the information we need while avoiding
performance costs.

Differential Revision: https://phabricator.services.mozilla.com/D143200
2022-04-12 18:40:14 +00:00
Shazib Summar
20cb0cdcb7 Bug 1617283 - Shifted AudioSession to MTA and removed COM violations r=handyman
Cleans up the interface to AudioSession and brings in line with COM best practices.  Uses background threads that are implicitly MTA and asserts proper thread behavior.  This also removes AudioSession's Co[Un]Initialize static analysis violations.

Differential Revision: https://phabricator.services.mozilla.com/D140741
2022-04-07 18:39:49 +00:00
Julien Cristau
e347e84e53 Bug 1763314 - don't hardcode the build_number in mach try scriptworker test. r=releng-reviewers,gbrown
Differential Revision: https://phabricator.services.mozilla.com/D143024
2022-04-06 15:06:56 +00:00
Kagami Sascha Rosylight
7f736cdebf Bug 1703953 - Part 1: Implement mozilla/use-isinstance rule r=Gijs,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D111354
2022-04-06 11:57:56 +00:00
Joel Maher
25803a0047 Bug 1751492 - run xpcshell tests in fission mode. r=mccr8,necko-reviewers,application-update-reviewers,bytesized,dragana,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D141912
2022-04-05 15:19:46 +00:00
Mark Banner
aa2d0d6c32 Bug 1761274 - Tell ESlint about the sjs environment to avoid unnecessary no-undef warnings. r=Gijs,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D142844
2022-04-05 09:20:01 +00:00
Mark Banner
f3012297a4 Bug 1762601 - Migrate all of devtools from Cu.import to ChromeUtils.import. r=jdescottes,perftest-reviewers,sparky
Differential Revision: https://phabricator.services.mozilla.com/D142693
2022-04-04 13:41:02 +00:00
Sylvestre Ledru
6c8d8bbeab no bug - Doc: explicit that reviews aren't required for doc changes r=overholt DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D140630
2022-03-31 12:17:59 +00:00
Mark Banner
3b202e1781 Bug 1760286 - Fix issue in eslint-plugin-mozilla where it fails with ESLint v8.11.0 due to the processing of XPCOMUtils.* import functions. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D142156
2022-03-30 17:40:16 +00:00
Mark Banner
287b405c93 Bug 1760286 - Add metadata for all eslint-plugin-mozilla rules. r=Gijs
This metadata is based on what I thik we should include. We don't need most
of the documentation section (category, description) since they are specific
to ESLint. The url is useful, as it will show up in VSCode and other editors
for developers wanting more information.

The type of rule probably isn't important, but is kept as a general guide.

Differential Revision: https://phabricator.services.mozilla.com/D142286
2022-03-30 17:40:15 +00:00
Mark Banner
b2b7195bc5 Bug 1760286 - Rework ESLint rules for eslint-plugin-mozilla to use the newer more descriptive rule format. r=Gijs
ESLint is only documenting the new module style of meta data and returning a create function.
Using this format allows us to easily specify extra meta data, e.g. documentation urls.
Hence, lets move all our rules across to the newer style so that any copy and paste will use
the new style, and we'll also be set up if ESLint requires it in the future.

Differential Revision: https://phabricator.services.mozilla.com/D142284
2022-03-30 17:40:15 +00:00
Gijs Kruitbosch
4d3b6146b8 Bug 1753696 - use an eslint rule to switch to add_setup(), r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D139542
2022-03-30 16:16:42 +00:00
Florian Quèze
df3309e9a4 Bug 1761957 - Declare profiler_record_wakeup_count when MOZ_GECKO_PROFILER is not defined to avoid tier3 build failures, r=gerald. DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D142354
2022-03-30 09:02:39 +00:00
Norisz Fay
acdd6851cd Backed out 2 changesets (bug 1753696) for causing multiple dt and bc failures CLOSED TREE
Backed out changeset 67fd9edfbcea (bug 1753696)
Backed out changeset a9d957ea887b (bug 1753696)
2022-03-30 12:17:55 +03:00
Gijs Kruitbosch
35d2a4ca12 Bug 1753696 - use an eslint rule to switch to add_setup(), r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D139542
2022-03-30 08:18:51 +00:00
Meg Viar
ee2f957e6d Bug 1754247 - Add marketplace image icons inside spotlight modal for list of supported locales r=Mardak,Gijs
Depends on D141965

Differential Revision: https://phabricator.services.mozilla.com/D141022
2022-03-29 22:46:59 +00:00
Mitchell Hentges
65ffc413f9 Bug 1761507: Bump typed-ast version r=ahal
This should resolve a `./mach lint` incompatibility with
Python 3.10.

Differential Revision: https://phabricator.services.mozilla.com/D142337
2022-03-29 19:14:08 +00:00
criss
4eec7e25a3 Backed out 3 changesets (bug 1703953) for causing multiple failures. CLOSED TREE
Backed out changeset 871a1fac289e (bug 1703953)
Backed out changeset 8151244bda18 (bug 1703953)
Backed out changeset eaf6d4c353be (bug 1703953)
2022-03-29 17:01:58 +03:00
Kagami Sascha Rosylight
cbfca993e7 Bug 1703953 - Part 1: Implement mozilla/use-isinstance rule r=Gijs,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D111354
2022-03-29 13:10:59 +00:00
Florian Quèze
394a5bf056 Bug 1759535 - Report thread wake-ups through glean, r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D141050
2022-03-28 22:13:09 +00:00
Dan Minor
d710062933 Bug 1757407 - Exclude l10registry-rs from license lint; r=platform-i18n-reviewers,gregtatum,sylvestre
This is code written by Mozilla employees but licensed under dual Apache2 / MIT
license and originally hosted on GitHub. Rather than try to create a text that
will pass the license lint, just exclude it from linting.

Differential Revision: https://phabricator.services.mozilla.com/D139865
2022-03-25 20:39:42 +00:00
Ed Lee
70b90fb7c5 Bug 1553931 - Add eslint-plugin-react-hooks and enable for paths using React r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D140876
2022-03-25 18:01:21 +00:00
Kelsey Gilbert
eac712f538 Bug 1449575 - Update fuzzing build docs. - r=jkratzer
* Remove mention of --enable-address-sanitizer, since it's not at all sufficient on its own. (Leave link to asan docs though)
* Clarify that ./mach gtest dontruntests is only needed for gtests. (I didn't need it for grizzly replays)

Differential Revision: https://phabricator.services.mozilla.com/D141542
2022-03-24 19:39:06 +00:00
Kash Shampur
1e5d8be145 Bug 1748821 - Support running visual metrics on Apple Silicon r=perftest-reviewers,Eng_Esther
Differential Revision: https://phabricator.services.mozilla.com/D141149
2022-03-24 15:05:05 +00:00
Gerald Squelart
9967775631 Bug 1757528 - Don't run nativeallocations TV test on Android - r=canaltinova
The regular xpcshell test don't appear to fail, so this additional patch ensures that only the TV (test verify) runs of test_feature_nativeallocations.js are skipped.

Differential Revision: https://phabricator.services.mozilla.com/D141814
2022-03-23 22:41:07 +00:00
mleclair
cb0a86aae4 Bug 1666226 - Add GeckoView APIs for starting and stopping the Gecko profiler r=geckoview-reviewers,mstange,agi
***

Differential Revision: https://phabricator.services.mozilla.com/D133404
2022-03-23 20:05:07 +00:00
Butkovits Atila
2c7e868cb3 Backed out changeset bec32662266a (bug 1666226) for causing Android bustages. CLOSED TREE 2022-03-23 21:14:51 +02:00
mleclair
90e32d0fb4 Bug 1666226 - Add GeckoView APIs for starting and stopping the Gecko profiler r=geckoview-reviewers,mstange,agi
***

Differential Revision: https://phabricator.services.mozilla.com/D133404
2022-03-23 18:53:32 +00:00
Mitchell Hentges
14386d0c7e Bug 1717104: Activate virtualenv before running command r=perftest-reviewers,ahal,AlexandruIonescu
All commands declaring a virtualenv will have them activated before the
command executes. Removes all now-redundant manual activations of
declared virtualenvs.

Commands that don't declare a virtualenv will still implicitly be
associated with the "common" virtualenv, but unlike explicit
virtualenv declarations it'll have to be activated manually, just
like it was before this patch.

To smooth the migration with existing usages, virtualenv activation
behaviour was changed slightly: if attempting to activate a new
virtualenv, but the source venv is already command venv, then raise an
exception. (In the future, we should improve testability of
virtualenv scaffolding logic so that tests can be added for this
sort of thing.) This did cause some issues with some tests, which
will be solved more cleanly with bug 1724273. In the meantime,
minimal modifications were made to failing tests to keep them green:
* `test_command_line.py` was activating the `common` virtualenv so
  that it could install `mozproxy`, and use its CLI. Instead, I
  modified the test to use `mozproxy` using the "module" interface
  (`python -m mozproxy ...`). At that point, `MozbuildObject` was
  unnecessary and usages were replaced with simpler variants.
* `test_vendor.py` needed its explicit `activate_virtualenv()` call
  patched out. It still needs to use a virtualenv's Python
  executable, but due to `sys.executable` now being kept up-to-date
  as of bug 1717051, it could be used directly.

Differential Revision: https://phabricator.services.mozilla.com/D122892
2022-03-23 14:50:45 +00:00
Mitchell Hentges
83f95f6c5d Bug 1723237: Move low-hanging fruit commands to centralized Python dep system r=ahal
Creates/updates virtualenvs for some mach commands, replacing
their ad-hoc usage of `install_pip_package()`, `pip install`,
and `sys.path` modifications.

Note: The `docs` virtualenv has `Sphinx==1.1.3` installed, even
though a more modern version of `Sphinx` is used when
`./mach doc` is run. This is ok for now, since `./mach doc` will
just install the newer `Sphinx` over top of the old one. Secondarily,
when we port `./mach doc` to use the centralized system, we'll
be incentivized to make the different `doc` commands use synchonized
versions of the same packages. Success!

Also, note that manual installation of `html5lib` and `requests`
isn't ported to the `wpt` site: this is because they're already
provided by the inherited Mach site.

Differential Revision: https://phabricator.services.mozilla.com/D122902
2022-03-22 20:49:42 +00:00
Michael Comella
d4867d4ecf Bug 1618560 - support markers from multiple JVM threads in profiler. r=canaltinova,geckoview-reviewers,agi
Here is a sample profile taken with the combined patches:
  https://share.firefox.dev/3pEcSi0

I added a "sample marker" in the `dispatchToThreads` method called from the
Gecko thread to demonstrate markers taken off the main thread.

Differential Revision: https://phabricator.services.mozilla.com/D140435
2022-03-22 18:50:49 +00:00
Michael Comella
e07a09ab87 Bug 1618560 - support samples from multiple JVM threads in profiler. r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D140434
2022-03-22 18:50:48 +00:00
Gerald Squelart
b7e1985cd5 Bug 1757528 - Don't run nativeallocations tests on Android - r=canaltinova
The native allocations feature is crashing tests on Android in the watchdog thread, possibly due to its CPU overhead.
This feature is rarely used, and mostly by Firefox developers, so it's okay to keep it available without tests.

Differential Revision: https://phabricator.services.mozilla.com/D141568
2022-03-22 12:52:15 +00:00
Ray Kraesig
a46bd6599e Bug 1760391 - call mach directly with Python 3 on Windows r=mhentges
Differential Revision: https://phabricator.services.mozilla.com/D141548
2022-03-21 17:39:27 +00:00
Luca Greco
d9c980ced7 Bug 1754441 - Explicit set prefs to enable InstallTrigger on all tests that depend on its availability. r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D138793
2022-03-18 20:02:54 +00:00
Eemeli Aro
c3af76718f Bug 1745905 - Drop extraneous convert_xul_to_fluent script. r=jaws
The in-tree copy of the XUL+DTD -> Fluent migration script was added in bug 1517528.
The original [0] has been refactored and updated since then, while the copy
here has not been maintained. It should be removed to clarify the situation.

Firefox source docs [1] were updated for Bug 1596726 to include a link to the
original script.

[0]: https://github.com/zbraniecki/convert_xul_to_fluent
[1]: https://firefox-source-docs.mozilla.org/l10n/migrations/legacy.html

Differential Revision: https://phabricator.services.mozilla.com/D133886
2022-03-18 14:36:54 +00:00
Sylvestre Ledru
519a2c6f51 Bug 1755750 - mozlint/rst: don't report the warning 'is not referenced' r=mhentges DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D141261
2022-03-17 14:37:17 +00:00