Граф коммитов

9261 Коммитов

Автор SHA1 Сообщение Дата
Andrew Halberstadt 3c893cc4cb Bug 1730626 - [lint] Print proper error message when clippy is not installed, r=linter-reviewers,marco
Differential Revision: https://phabricator.services.mozilla.com/D125544
2021-09-14 20:01:34 +00:00
Sylvestre Ledru f1425a24ac Bug 1730407 - Update dependency Sphinx to v4.2.0 r=firefox-source-docs-reviewers,ahal DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D125339
2021-09-14 06:57:30 +00:00
Renovate Bot 1d32c67cb9 Bug 1729224 - Update dependency sphinxcontrib-mermaid to v0.7.1 r=firefox-source-docs-reviewers,ahal DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D124578
2021-09-12 14:54:41 +00:00
Sylvestre Ledru bb56269cf2 no bug - fx doc: update to python-dateutil 2.8.2 r=firefox-source-docs-reviewers,ahal DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D124573
2021-09-12 14:54:30 +00:00
Renovate Bot fbde220fd9 Bug 1729224 - Update dependency Markdown to v3.3.4 r=firefox-source-docs-reviewers,ahal DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D124583
2021-09-12 14:54:02 +00:00
Gabriele Svelto ef5658276d Bug 1710097 - Use the memmap2 crate in place of the unmaintained memmap crate r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D124653
2021-09-10 19:46:14 +00:00
Mark Banner bd9ada1626 Bug 1729460 - Extend ESLint rule mozilla/use-services to cover defineLazyServiceGetter(s). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D124839
2021-09-10 12:09:49 +00:00
Gerald Squelart c4a6f1bac7 Bug 1663382 - Remove dangerous ProfilerStringView::Data() - r=florian
`ProfilerStringView::Data()` would return a pointer to the start of the string, but there may not be a null terminator at the end!
To reduce the likelihood of misuses, that function has now been removed.
Instead, callers must now access the data through `AsSpan` or the `Span` conversion operator (which makes it easy to use with `NS_ConvertUTF16toUTF8` for example).

It was not an issue until now, because deserialized string would always be terminated when copied out of the profile buffer, but a following patch will add optimized code where the non-terminated string inside the buffer will be directly pointed at.

Differential Revision: https://phabricator.services.mozilla.com/D125027
2021-09-10 11:43:47 +00:00
Noemi Erli e0f4b9b5fe Backed out 2 changesets (bug 1729460) for causing newtab failures CLOSED TREE
Backed out changeset 5617839462be (bug 1729460)
Backed out changeset 6d52fde3ee0e (bug 1729460)
2021-09-10 13:14:12 +03:00
Mark Banner 7aa765d262 Bug 1729460 - Extend ESLint rule mozilla/use-services to cover defineLazyServiceGetter(s). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D124839
2021-09-10 09:38:43 +00:00
Mike Hommey 9c0f04e547 Bug 1730030 - Replace some assembly with corresponding compiler builtins. r=gerald
This has the side-effect of adding the missing arm64 mac support for PHC.

Differential Revision: https://phabricator.services.mozilla.com/D125139
2021-09-10 00:58:34 +00:00
Andrew Halberstadt ce075afd70 No Bug - Update documentation for generating ccov reports locally, r=marco
Differential Revision: https://phabricator.services.mozilla.com/D124954
2021-09-09 14:49:27 +00:00
Gerald Squelart 8197b9611b Bug 1728993 - Test basic health of every combination of the most important features - r=florian
This adds a test that goes through all combinations of a number of important features, and verifies that the JSON output looks valid.

Differential Revision: https://phabricator.services.mozilla.com/D124739
2021-09-09 09:37:29 +00:00
Gerald Squelart 0c9b125fe5 Bug 1728993 - Added JSON profile check that samples all look valid - r=florian
All profiles submitted to `JSONOutputCheck` are now checked for valid-looking samples, as in:
- Samples should point into the stackTable.
- stackTable entries should point to the caller in the same stackTable (or null for the root frame).
- stackTable entries should also point into the frameTable.
- frameTable entries should point into the stringTable for the "location".

Differential Revision: https://phabricator.services.mozilla.com/D124738
2021-09-09 09:37:29 +00:00
Gerald Squelart d926fdb586 Bug 1728993 - Handle same-sample case when there are no stacks - r=florian
A scenario for a thread may be that the first entry has an empty sample (usually if stack-sampling is turned off) and no running times (first-ever sample, or "cpu" is off), so it's not output, and there is no corresponding stack table entry.
Then there may be a "same sample" entry.
- If there are no running times, nothing should be output.
- If there are running times, an empty stack should be output, but for that we need to ensure that the root frame is present in the stack table entry, because that represents an empty stack.

Differential Revision: https://phabricator.services.mozilla.com/D124612
2021-09-09 09:37:29 +00:00
Cristian Tuns fac798de59 Backed out 3 changesets (bug 1728993) for causing Hazard bustages on GeckoProfiler.cpp. CLOSED TREE
Backed out changeset a3f6c7094ec4 (bug 1728993)
Backed out changeset c8800504488b (bug 1728993)
Backed out changeset c045e3ee9650 (bug 1728993)
2021-09-09 02:54:24 -04:00
Gerald Squelart 6c527a2ac7 Bug 1728993 - Test basic health of every combination of the most important features - r=florian
This adds a test that goes through all combinations of a number of important features, and verifies that the JSON output looks valid.

Differential Revision: https://phabricator.services.mozilla.com/D124739
2021-09-09 02:12:08 +00:00
Gerald Squelart b15864b540 Bug 1728993 - Added JSON profile check that samples all look valid - r=florian
All profiles submitted to `JSONOutputCheck` are now checked for valid-looking samples, as in:
- Samples should point into the stackTable.
- stackTable entries should point to the caller in the same stackTable (or null for the root frame).
- stackTable entries should also point into the frameTable.
- frameTable entries should point into the stringTable for the "location".

Differential Revision: https://phabricator.services.mozilla.com/D124738
2021-09-09 02:12:07 +00:00
Gerald Squelart a74229be91 Bug 1728993 - Handle same-sample case when there are no stacks - r=florian
A scenario for a thread may be that the first entry has an empty sample (usually if stack-sampling is turned off) and no running times (first-ever sample, or "cpu" is off), so it's not output, and there is no corresponding stack table entry.
Then there may be a "same sample" entry.
- If there are no running times, nothing should be output.
- If there are running times, an empty stack should be output, but for that we need to ensure that the root frame is present in the stack table entry, because that represents an empty stack.

Differential Revision: https://phabricator.services.mozilla.com/D124612
2021-09-09 02:12:07 +00:00
Mike Hommey 4e47a99c0d Bug 1729383 - Advertize MOZ_PARALLEL_BUILD=n rather than MOZ_MAKE_FLAGS=-jn in docs. r=firefox-build-system-reviewers,mhentges
Both work, but the former is preferred. Also remove MOZ_MAKE_FLAGS
in the mozconfig example for msan, because it's irrelevant.

Differential Revision: https://phabricator.services.mozilla.com/D124726
2021-09-08 00:10:21 +00:00
Sylvestre Ledru 9d070b0060 Bug 1729222 - Update dependency pylint to v2.10.2 r=linter-reviewers,marco DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D124577
2021-09-06 13:14:41 +00:00
Renovate Bot 1113c30475 Bug 1729222 - move pylint req to .in r=linter-reviewers,marco DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D124576
2021-09-06 13:14:41 +00:00
Mark Banner 01a583ac70 Bug 1602940 - Add nsIUUIDGenerator to the Javascript Services object. r=Gijs
This also adds a commented out option for automatically fixing use-services in the ESLint rule. This cannot be enabled at the moment as it needs special treatment for chrome tests.

Differential Revision: https://phabricator.services.mozilla.com/D124391
2021-09-06 09:53:51 +00:00
Sylvestre Ledru 3cb3d2ac04 Bug 1729222 - pylint - ride along - remove items from the exclude + fix a warning r=linter-reviewers,marco DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D124581
2021-09-06 08:05:39 +00:00
Renovate Bot 8fe3ab6fd8 Bug 1729222 - Update dependency flake8 to 3.9.2 and autopep8 to v1.5.7 r=linter-reviewers,marco DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D124575
2021-09-06 07:52:57 +00:00
Mitchell Hentges f5b0cb5bc1 Bug 1717051: Rename "mach_bootstrap.py" to "mach_initialize.py" r=firefox-build-system-reviewers,glandium
We've overloaded "bootstrap" to mean three different things:
* The "standalone bootstrap script": `python/mozboot/bin/bootstrap.py`.
  This is to freshly clone a new repo, then run `./mach bootstrap`.
* `./mach bootstrap`: Install necessary dependencies and set up the
  system for development.
* "Mach bootstrap": do the in-process initialization work Mach needs
  before it can run commands.

By using the term "initialize" instead, perhaps we can remove
ambiguity when discussing Mach.

I'm not attached to the name (or this change at all), but I'm interested
in reviewer thoughts :)

Differential Revision: https://phabricator.services.mozilla.com/D120410
2021-09-03 20:46:22 +00:00
Dzmitry Malyshau 5695f517a5 Bug 1726626 - Move gfx/wgpu into a 3rd party dependency r=jgilbert,bholley
This update makes wgpu a vendored dependency instead of having it in gfx/wgpu.

## Notes


It relies on https://phabricator.services.mozilla.com/D123157

It has a quirk related to OpenGL ES backend. Previousy, we manually had to disable GL backend
in order to avoid vendoring WASM dependencies in. This time, manual editing is more complicated,
so instead this change adds a few cargo patch lines to point WASM dependencies to dummy projects.

The update also totally removes SPIRV-Cross, since the latest `wgpu` doesn't depend on it any more.
The compiled binary size for Gecko should improve with this.

Differential Revision: https://phabricator.services.mozilla.com/D123153
2021-09-03 16:52:08 +00:00
Nazım Can Altınova 0f657df07f Bug 1728544 - Make the MarkerSchema::Searchable enum class values CamelCased r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D124242
2021-09-03 14:30:10 +00:00
Nazım Can Altınova a38b25b295 Bug 1728544 - Make the MarkerSchema::Format enum class values CamelCased r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D124241
2021-09-03 14:30:10 +00:00
Nazım Can Altınova ddae0f7cd6 Bug 1728544 - Make the MarkerSchema::Location enum class values CamelCased r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D124240
2021-09-03 14:30:09 +00:00
Benjamin Peterson 2807b904c1 Bug 1728504 - Fix typo in tools/profiler/docs/index.rst. r=gerald DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D124157
2021-09-02 05:04:13 +00:00
Belén Albeza 6f33f27701 Bug 1715579 - [devtools] Add architecture documentation for the storage panel r=jdescottes
This documents the new architecture of the storage panel.

Differential Revision: https://phabricator.services.mozilla.com/D117334
2021-09-01 16:52:08 +00:00
Gerald Squelart c3a89a135f Bug 1728056 - Remove lock when profiling current thread in profiler_suspend_and_sample_thread - r=canaltinova
The lock in the inner `profiler_suspend_and_sample_thread` function was only needed on the `!aIsSynchronous` code path.
So instead, the pointer to the lock is passed in this case, otherwise `nullptr` indicates a synchronous (same-thread) sampling.

Differential Revision: https://phabricator.services.mozilla.com/D123915
2021-09-01 01:00:38 +00:00
Gerald Squelart 45335d1da4 Bug 1728058 - Remove incorrect MOZ_RELEASE_ASSERT(CorePS::Exists()) on profiler_register_thread - r=canaltinova
Since bug 1722261, thread registrations are not tied to CorePS anymore, ThreadRegistry stores them in a static list.
Also, profiler_register_thread immediately calls ThreadRegistration::RegisterThread -> ThreadRegistration constructor -> ThreadRegistry::Register, which checks if there is a CorePS before working with it.
So this assertion can safely be removed now.

In rare instances, `CorePS` may not actually exist (profiler not initialized yet, or already shutdown), and this assertion could trigger and report an unimportant crash.

Differential Revision: https://phabricator.services.mozilla.com/D123912
2021-09-01 00:48:37 +00:00
Gerald Squelart fc29f171a6 Bug 1727877 - Only allocate JS frame buffer when thread is being profiled - r=canaltinova
The buffer was previously allocated as soon as a JSContext was present, meaning that some memory was used even when the profiler was not running, which is the case most of the time for most users.
This saves some memory, at the cost of having to lock the per-thread ThreadRegistration data when sampling a thread with a JSContext. This should have low contention risk, because it's mostly used when sampling on the thread, while the periodic sampler uses its own buffer so it doesn't need to lock the per-thread data.

Differential Revision: https://phabricator.services.mozilla.com/D123910
2021-09-01 00:38:10 +00:00
Julian Descottes fc4ab5d493 Bug 1728280 - [devtools] try preset is no longer running windows jobs r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D124030
2021-08-31 15:22:54 +00:00
Joel Maher 537a941e7d Bug 1727780 - bump version of browsertime and imagemagick. r=perftest-reviewers,AlexandruIonescu
Differential Revision: https://phabricator.services.mozilla.com/D123779
2021-08-31 13:36:27 +00:00
Marco Castelluccio 529e388d33 Bug 1723161 - Update expected try auto test output. r=fix
Differential Revision: https://phabricator.services.mozilla.com/D124048
2021-08-31 10:33:27 +00:00
Marco Castelluccio f68e106e52 Bug 1723161 - Switch from 'bugbug_reduced_manifests_config_selection_low' to 'bugbug_reduced_manifests_config_selection_medium' as default for mach try auto. r=jmaher DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D121385
2021-08-31 08:51:45 +00:00
Marian-Vasile Laza ac5730a6de Backed out changeset 2c24c285ed0a (bug 1727780) for breaking browsertime tasks (new yargs version requires node 12 but version 10 is used). CLOSED TREE 2021-08-28 16:38:45 +03:00
Sylvestre Ledru e234d447b0 Bug 1727824 - Update to Sphinx 4.1.2 & copybutton 0.4.0 r=firefox-source-docs-reviewers,championshuttler
Differential Revision: https://phabricator.services.mozilla.com/D123817
2021-08-28 04:10:22 +00:00
Joel Maher a9fbfa4c29 Bug 1727780 - bump version of browsertime and imagemagick. r=perftest-reviewers,AlexandruIonescu
Differential Revision: https://phabricator.services.mozilla.com/D123779
2021-08-27 13:04:36 +00:00
Sylvestre Ledru d8d7e42730 Bug 1460678 - doc: ride along bump sentry r=mhentges
Differential Revision: https://phabricator.services.mozilla.com/D123796
2021-08-26 20:33:33 +00:00
Sylvestre Ledru 1219c444a7 Bug 1460678 - doc: Disable sentry as it adds significant overhead r=mhentges
Differential Revision: https://phabricator.services.mozilla.com/D123795
2021-08-26 20:33:33 +00:00
Gerald Squelart dc9ead3c7b Bug 1726125 - On Linux, detect if SP is likely to be outside the known stack area - r=mstange
Running the profiler while Firefox runs in rr sometimes crashes, and it seems the SP register is far from the known stack area (ending at StackTop), which then proceeds to copy some protected memory.

Note that there was already a `start < end` test, this patch adds an equivalent test on the other side, allowing for a 1MB stack size. Observed stacks during quick testing were up to around 520KB, and the crashing rr case was in the trillions(!), so 1MB should be an appropriate number that should catch "wrong" SPs while allowing real stacks.

Differential Revision: https://phabricator.services.mozilla.com/D123605
2021-08-26 14:38:55 +00:00
Christopher Winter 7acf6d224b Bug 1604914 - Make ShouldProfileThread more efficient r=gerald
When starting the profiler, also make a copy of the filter strings
converted to lower-case. This allows caseless comparisons to be made
against thread names without repeatedly converting the filters to
lower-case for each thread.

Differential Revision: https://phabricator.services.mozilla.com/D123302
2021-08-26 01:31:25 +00:00
Andi-Bogdan Postelnicu 2fc4f70e9b Bug 1725145 - Preparation for the hybrid build env. r=necko-reviewers,firefox-build-system-reviewers,valentin,glandium
Automatically generated path that adds flag `REQUIRES_UNIFIED_BUILD = True` to `moz.build`
when the module governed by the build config file is not buildable outside on the unified environment.

This needs to be done in order to have a hybrid build system that adds the possibility of combing
unified build components with ones that are built outside of the unified eco system.

Differential Revision: https://phabricator.services.mozilla.com/D122345
2021-08-25 10:46:17 +00:00
Gerald Squelart 90bd552555 Bug 1716959 - Don't use lock from profiler_capture_backtrace_into - r=canaltinova
`profiler_capture_backtrace_into` now only uses thread-safe functions: ThreadRegistration::WithOnThreadRefOf, Register::SyncPopulate, DoSyncSample.
So we don't need to lock the main profiler mutex anymore.

This means that on-thread sampling (typically used in markers) can happen at the same time the periodic sampler has locked the profiler mutex and is sampling this and other threads.

Differential Revision: https://phabricator.services.mozilla.com/D122089
2021-08-25 00:56:01 +00:00
Gerald Squelart ca8279e285 Bug 1716959 - Remove compulsory proof-of-lock in DoNativeBacktrace and DoSyncSample - r=canaltinova
Since these functions don't need to access profiler functions requiring a lock, they themselves don't need that lock anymore.

Differential Revision: https://phabricator.services.mozilla.com/D122088
2021-08-25 00:56:00 +00:00
Gerald Squelart e8f70d8971 Bug 1716959 - On-thread sampling uses a per-thread JS frame buffer that's only allocated when there's also a JSContext - r=canaltinova
MergeStack requires a fairly large buffer to store JS frames, too big to be allocated on the stack without risking a stack overflow.
Until now, there was only one buffer, stored in CorePS, and only accessible while holding the Profiler gPSMutex.

Now each thread that has a JSContext, also has its own JS frame buffer, which is accessible on the thread without needing any lock.
The Profiler's Sampler still uses the CorePS buffer for its periodic sampling, but it won't prevent parallel on-thread sampling anymore.

The appropriate buffer is passed to ExtractJsFrames and then MergeStacks.
MergeStacks accepts a null pointer, which happens on threads where there is no JSContext, and therefore no JS to sample.

Differential Revision: https://phabricator.services.mozilla.com/D122087
2021-08-25 00:55:59 +00:00