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

9442 Коммитов

Автор SHA1 Сообщение Дата
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
Gerald Squelart 911112cf23 Bug 1716959 - Pass features to DoSharedSamples to remove lock-dependent feature requests - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D122086
2021-08-25 00:55:59 +00:00
Gerald Squelart e2e7d28006 Bug 1716959 - Lock is not needed anymore in DoNativeBacktrace - r=canaltinova
All implementations of DoNativeBacktrace are now thread-safe, so it's not necessary to make their use dependent on the Profiler's gPSMutex being locked.

Differential Revision: https://phabricator.services.mozilla.com/D122085
2021-08-25 00:55:59 +00:00
Gerald Squelart dae03065c6 Bug 1716959 - Make CorePS::mLul atomic, to avoid using the profiler lock to access it - r=canaltinova
Also added extra nullptr checks to avoid surprises if calling code ever tries to use lul before it's first set.

Differential Revision: https://phabricator.services.mozilla.com/D122084
2021-08-25 00:55:58 +00:00
Gerald Squelart 98cd735985 Bug 1716959 - Make Registers::SyncPopulate() re-entrant on Linux, for safe use in parallel stack unwinding calls - r=canaltinova
`Registers::SyncPopulate()` now uses a ucontext_t that's stored with the `Registers` object, so it can safely be called from parallel threads.

Differential Revision: https://phabricator.services.mozilla.com/D122083
2021-08-25 00:55:58 +00:00
criss ba3d35886e Backed out 7 changesets (bug 1716959) for causing Android build bustages. CLOSED TREE
Backed out changeset e6a849ee0e31 (bug 1716959)
Backed out changeset eb105787f5bd (bug 1716959)
Backed out changeset c39b9c1696aa (bug 1716959)
Backed out changeset ef79ed5f95c1 (bug 1716959)
Backed out changeset 7c84ffb63567 (bug 1716959)
Backed out changeset 2f97ef8a91de (bug 1716959)
Backed out changeset d5607038a5d6 (bug 1716959)
2021-08-25 02:16:26 +03:00
Gerald Squelart a2f14f5c02 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-24 21:58:44 +00:00
Gerald Squelart a6575f5d1c 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-24 21:58:44 +00:00
Gerald Squelart 2ab9046c97 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-24 21:58:43 +00:00
Gerald Squelart f82b0d2ff3 Bug 1716959 - Pass features to DoSharedSamples to remove lock-dependent feature requests - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D122086
2021-08-24 21:58:43 +00:00
Gerald Squelart b654d8d392 Bug 1716959 - Lock is not needed anymore in DoNativeBacktrace - r=canaltinova
All implementations of DoNativeBacktrace are now thread-safe, so it's not necessary to make their use dependent on the Profiler's gPSMutex being locked.

Differential Revision: https://phabricator.services.mozilla.com/D122085
2021-08-24 21:58:42 +00:00
Gerald Squelart 9964959d01 Bug 1716959 - Make CorePS::mLul atomic, to avoid using the profiler lock to access it - r=canaltinova
Also added extra nullptr checks to avoid surprises if calling code ever tries to use lul before it's first set.

Differential Revision: https://phabricator.services.mozilla.com/D122084
2021-08-24 21:58:42 +00:00
Gerald Squelart 0e09b66701 Bug 1716959 - Make Registers::SyncPopulate() re-entrant on Linux, for safe use in parallel stack unwinding calls - r=canaltinova
`Registers::SyncPopulate()` now uses a ucontext_t that's stored with the `Registers` object, so it can safely be called from parallel threads.

Differential Revision: https://phabricator.services.mozilla.com/D122083
2021-08-24 21:58:42 +00:00
Gerald Squelart 7f3c9eb118 Bug 1727036 - SpliceableJSONWriter::Time... functions output milliseconds with nanosecond precision - r=mstange
Instead of blindly outputting floating-point numbers of milliseconds, which leads to things like 363.03499999999997, times in ms are now converted to integer number of nanoseconds, stringified, and then manually adjusted to milliseconds again, so we get smaller and friendlier outputs like 363.035.

Eventually, bug 1726675 may change all times to integer number of nanoseconds anyway, but this patch is already helpful in reducing the output, and paves the way by separating the time-output functions from other number outputs.

Differential Revision: https://phabricator.services.mozilla.com/D123329
2021-08-24 21:33:05 +00:00
Alex Lopez 4ae24b1f1b Bug 1696251: Refactor docstrings in mach commands. r=mhentges,webdriver-reviewers,geckoview-reviewers,agi
The purpose of this is to remove as many docstrings from CommandProvider
classes to make the step of moving commands out of classes simpler.
Where possible, the docstring has been moved to or merged with the function.

Differential Revision: https://phabricator.services.mozilla.com/D123288
2021-08-24 20:16:05 +00:00
Nazım Can Altınova 1b232babba Bug 1727039 - Add two marker schema structs for Java markers to make them visible in the timeline r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D123435
2021-08-24 13:24:06 +00:00
Gerald Squelart 9dabb52dbd Bug 1722261 - RegisteredThread is now effectively unused, remove all remaining traces - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D121978
2021-08-24 04:47:24 +00:00
Gerald Squelart 973ab36893 Bug 1722261 - Remove RegisteredThread from LiveProfiledThreadData - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D121977
2021-08-24 04:47:23 +00:00
Gerald Squelart cb43159ccf Bug 1722261 - SizeOf{Ex,In}cludingThis for ProfilerRegist* classes, used in CorePS - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D121976
2021-08-24 04:47:23 +00:00
Gerald Squelart ffaa46b8c5 Bug 1722261 - Stop using RegisteredThread::Info() in profiler_unregister_thread - r=canaltinova
And now in locked_unregister_thread, use the aOnThreadRef directly instead of the TLSRegisteredThread.

Differential Revision: https://phabricator.services.mozilla.com/D121975
2021-08-24 04:47:23 +00:00
Gerald Squelart e458356239 Bug 1722261 - Convert locked_profiler_stream_json_for_this_process and ActivePS::ProfiledThreads to stop using RegisteredThread - r=canaltinova
Remove now-unused RegisteredThread::GetJSContext().

Differential Revision: https://phabricator.services.mozilla.com/D121974
2021-08-24 04:47:22 +00:00
Gerald Squelart 7d5bfedffa Bug 1722261 - Convert remaining use of RegisteredThread's ProfilingStack that was in locked_register_thread - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D121973
2021-08-24 04:47:22 +00:00
Gerald Squelart 74c2f32d66 Bug 1722261 - Convert remaining uses of RegisteredThread's GetEventTarget and ResetMainThread - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D121971
2021-08-24 04:47:22 +00:00
Gerald Squelart a46f61bcac Bug 1722261 - In locked_profiler_start, find registered threads from ThreadRegistry and stop using RegisteredThread - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D121970
2021-08-24 04:47:21 +00:00
Gerald Squelart c5c886aafb Bug 1722261 - Remove final uses of {,Racy}RegisteredThread's ReinitializeOnResume, and all ...JSSampling's - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D121969
2021-08-24 04:47:21 +00:00
Gerald Squelart 5ffd2b28fc Bug 1722261 - Rework profiler_set/clear_js_context to use ThreadRegistration - r=canaltinova
Remove some now-unused functions.

Differential Revision: https://phabricator.services.mozilla.com/D121968
2021-08-24 04:47:20 +00:00
Gerald Squelart 9b7f9f3415 Bug 1722261 - In locked_profiler_stop, find live threads from ThreadRegistry and stop using RegisteredThread - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D121967
2021-08-24 04:47:20 +00:00
Gerald Squelart 0599f5dbbe Bug 1722261 - During sampling, go through the ThreadRegistry to find ThreadRegistrations with ProfiledThreadData - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D121966
2021-08-24 04:47:20 +00:00
Gerald Squelart 0a913f148b Bug 1722261 - Remove the old PlatformData, which is now unused - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D121965
2021-08-24 04:47:19 +00:00
Gerald Squelart aaf7249946 Bug 1722261 - Move mPreviousThreadRunningTimes from old PlatformData to ProfiledThreadData - r=canaltinova
It's more appropriate because the running times are only relevant to a profiling session.
And PreviousThreadRunningTimes can now be accessed through the ThreadRegistration (thanks to the ProfiledThreadData pointer added in the previous patch).

Since the threads' RunningTimes don't live in `PlatformData`, and because they are now implicitly cleared between profiling sessions (because `ProfiledThreadData`s get destroyed/recreated when stopping/starting the profiler), there is no need for an explicit `ClearRunningTimes()` anymore.

Differential Revision: https://phabricator.services.mozilla.com/D121964
2021-08-24 04:47:19 +00:00
Gerald Squelart dbec8fac3f Bug 1722261 - Store ProfiledThreadData pointer in ThreadRegistrationData - r=canaltinova
Because ProfiledThreadData is always related to IsBeingProfiled, they are set and cleared together.
In particular, this is used to quickly guess that the thread is being profiled by reading the non-atomic mProfiledThreadData, rather than reading the slightly slower atomic mIsBeingProfiled.

Differential Revision: https://phabricator.services.mozilla.com/D121963
2021-08-24 04:47:18 +00:00
Gerald Squelart 838c078dd5 Bug 1722261 - GetRunningEventDelay through ThreadRegistration - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D121962
2021-08-24 04:47:18 +00:00
Gerald Squelart 664a64ed66 Bug 1722261 - Use IsSleeping and SetSleeping/Awake in ThreadRegistration - r=canaltinova
Also moved profiler_thread_is_sleeping to ProfilerThreadState.h.

Differential Revision: https://phabricator.services.mozilla.com/D121961
2021-08-24 04:47:18 +00:00
Gerald Squelart 18dc921f8e Bug 1722261 - Use ThreadRegistration classes during sampling - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D121960
2021-08-24 04:47:17 +00:00
Gerald Squelart 3114b39b02 Bug 1722261 - ProfilerThreadPlatformData platform-specific implementation - r=canaltinova
This is mostly a copy of the old PlatformData. That old PlatformData will be removed in a later patch, once it's not used anymore.

Differential Revision: https://phabricator.services.mozilla.com/D121959
2021-08-24 04:47:17 +00:00
Gerald Squelart bbe9d3dc72 Bug 1722261 - Remove ThreadInfo.h, use ProfilerRegistrationInfo instead - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D121850
2021-08-24 04:47:16 +00:00
Gerald Squelart 661ef3e99d Bug 1722261 - Store {,Racy}RegisteredThread pointer in ThreadRegistrationData - r=canaltinova
This will help with replacing the old {,Racy}RegisteredThread with the new ThreadRegistration classes, while still being able to access the old classes (until they are not needed anymore).

Differential Revision: https://phabricator.services.mozilla.com/D121849
2021-08-24 04:47:16 +00:00
Gerald Squelart dec6c72992 Bug 1722261 - Move profiler_thread_is_being_profiled to ProfilerThreadState.h and use ThreadRegistration - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D121848
2021-08-24 04:47:16 +00:00
Gerald Squelart 27339446a1 Bug 1722261 - Remove data from RegisteredThread, only keep pass-through methods to the ThreadRegistrationData - r=canaltinova
Now {,Racy}RegisteredThread don't contain any data, but provide the same API that goes through ThreadRegistration.
Until they are removed, {,Racy}RegisteredThread are given private access to ThreadRegistration{,Data} for easier access.

This means that we can now change uses of RegisteredThread to use ThreadRegistration directly instead, and the data will be the same through either APIs.

Also, RacyRegisteredThread::ThreadId() was unused so it can be removed.

Differential Revision: https://phabricator.services.mozilla.com/D121847
2021-08-24 04:47:15 +00:00
Gerald Squelart 17c3deae20 Bug 1722261 - Use ProfilingStack inside ThreadRegistrationData - r=canaltinova
The ProfilingStack object inside ThreadRegistrationData is guaranteed to live while the thread is registered (and alive), and all accesses are guaranteed to be done either:
- On-thread, so during that time ThreadRegistrationData and its ProfilingStack cannot be destroyed.
- From another thread, but with the Profiler lock and/or per-thread lock, which also guarantees that ThreadRegistrationData and its ProfilingStack cannot be destroyed.

RacyRegisteredThread brought some doubts about end-of-thread accesses, that why there's was an intermediate ref-counted ProfilingStackOwner to keep ProfilingStack alive where needed. Now we can remove it.

Also the separate TLS (Thread Local Storage) for ProfilingStackOwner can be removed, since we can reach the ProfilingStack through the ThreadRegistration TLS for the same cost.

Differential Revision: https://phabricator.services.mozilla.com/D121846
2021-08-24 04:47:15 +00:00
Gerald Squelart 46ef60886c Bug 1722261 - Move profiler_is_active_and_thread_is_registered to ProfilerThreadState.h and use ThreadRegistration - r=canaltinova
ThreadRegistration already knows if it's registered, so profiler_is_active_and_thread_is_registered can use that now.

Differential Revision: https://phabricator.services.mozilla.com/D121845
2021-08-24 04:47:14 +00:00
Gerald Squelart 73145d4991 Bug 1722261 - Remove handling of nested RegisteredThreads - r=canaltinova
Since ThreadRegistration already handles nested registrations, the legacy profiler_{,un}register_thread() functions don't need to care about that anymore (and the RegisteredThread TLS will be removed in a later patch anyway).
The informational markers have been moved to ProfilerThreadRegistration.cpp.

Differential Revision: https://phabricator.services.mozilla.com/D122315
2021-08-24 04:47:13 +00:00
Gerald Squelart d4467b9f08 Bug 1722261 - Insert new ThreadRegistration (un)registering functions in the middle of profiler_{,un}register_thread - r=canaltinova
ProfilerThreadRegistry (un)register functions have been moved to platform.cpp because they need to interact closely with functions and classes in that file.

profiler_{,un}register_thread are now simple calls to ThreadRegistration::{R,Unr}egisterThread, which call ThreadRegistry::{R,Unr}egister, which now integrate that old bodies of profiler_{,un}register_thread.
So from this point, threads may use either profiler_{,un}register_thread or ThreadRegistration equivalents, and this will (un)register with both the new ThreadRegistration classes and the legacy RegisteredThread class into CorePS. (Later patches will remove RegisteredThread completely.)

Bonus: Since the stack top is now adjusted when constructing ThreadRegistrationInfo (before giving it to the legacy ThreadInfo), there is no more need for `GetStackTop()`.

Differential Revision: https://phabricator.services.mozilla.com/D121844
2021-08-24 04:47:13 +00:00
Gerald Squelart 72795c1eff Bug 1722261 - New header ProfilerThreadState.h will contain thread-related profiler APIs - r=canaltinova
Thread-related APIs that are currently in ProfilerState.h will move here, and will use the new ThreadRegistration classes introduced in bug 1721939.

In this patch the header is empty apart from a few #includes, and users of "ProfilerState.h"'s thread functions now #include "ProfilerThreadState.h" instead. So there are no actual code changes yet.

Differential Revision: https://phabricator.services.mozilla.com/D121843
2021-08-24 04:47:13 +00:00
Gerald Squelart 40c35fd0e2 Bug 1722261 - Keep track of whether a ThreadRegistration is on the heap - r=canaltinova
When a `ThreadRegistration` object is created through `ThreadRegistration::RegisterThread` (instead of directly on the stack), this is recorded in `mIsOnHeap`.
This helps better handle incorrectly-nested registration/unregistration pairs, or excess unregistrations.

Also, markers are now generated to highlight extra (un)registrations, with added backtrace for those surprising cases of excess unregistrations that should probably be reworked.

And `ThreadRegistration::GetTLS()` was simplified, so it auto-initializes when first used, instead of relying on the main thread registration.

Differential Revision: https://phabricator.services.mozilla.com/D123229
2021-08-24 04:47:12 +00:00
Gerald Squelart 1cf3bc392a Bug 1726657 - Only record sampling overheads if MOZ_PROFILER_RECORD_OVERHEADS is set - r=florian
Sampling overheads are very rarely useful, but they occupy some space during profiling, but also a lot of space in the final JSON profile.
So now they will only be recorded if the environment variable "MOZ_PROFILER_RECORD_OVERHEADS" is set to any non-empty value.

Differential Revision: https://phabricator.services.mozilla.com/D123303
2021-08-23 22:23:34 +00:00
Julien Wajsberg 2a42e8a50e Bug 1697901 - [network markers] Bump the profile version to 24 r=gerald
This ensures our users will use the latest version of the frontend when
capturing 'cancel' network markers.

Depends on D123254

Differential Revision: https://phabricator.services.mozilla.com/D123255
2021-08-23 08:56:53 +00:00
Julien Wajsberg 4bc6caa649 Bug 1697901 - [network markers] Support channel cancelation r=valentin,gerald,necko-reviewers
This patch supports channel cancelations with network markers.

Because of all the possible ways to stop a channel and hence all
possible end markers, it also introduces a new boolean to reduce the
complexity. Indeed it happens that 2 "end functions" are called, but we
need to insert only 1 end marker to have a well-formed result in the
Profiler frontend.

Differential Revision: https://phabricator.services.mozilla.com/D122111
2021-08-23 08:56:52 +00:00
Mark Banner 285d9816ed Bug 1726413 - Use mach npm install rather than plain npm when updating node_modules. r=Mardak
Differential Revision: https://phabricator.services.mozilla.com/D122981
2021-08-20 07:33:33 +00:00
Brindusan Cristian a1ab92e0b1 Backed out 28 changesets (bug 1722261) for causing linux asan failures.
CLOSED TREE

Backed out changeset f6008261478f (bug 1722261)
Backed out changeset e0acdc278398 (bug 1722261)
Backed out changeset c382b83927b1 (bug 1722261)
Backed out changeset 3ca4e85a2f0c (bug 1722261)
Backed out changeset 0f79b507f7fa (bug 1722261)
Backed out changeset 54f922f8d85c (bug 1722261)
Backed out changeset 01f52fd9d41b (bug 1722261)
Backed out changeset 641b915a5877 (bug 1722261)
Backed out changeset d88b53a4c4ac (bug 1722261)
Backed out changeset e5cc8b60c7f4 (bug 1722261)
Backed out changeset cf05e4baf78f (bug 1722261)
Backed out changeset 7574972ea660 (bug 1722261)
Backed out changeset cca5ffa19387 (bug 1722261)
Backed out changeset 0c05174fc2c1 (bug 1722261)
Backed out changeset d1cf4d7f6796 (bug 1722261)
Backed out changeset 015fe6840a85 (bug 1722261)
Backed out changeset 5798abd2f42a (bug 1722261)
Backed out changeset 5e0cf65719d3 (bug 1722261)
Backed out changeset eb61f791b99b (bug 1722261)
Backed out changeset 2f6b4f80db1f (bug 1722261)
Backed out changeset 842b895b7ac1 (bug 1722261)
Backed out changeset aa80d9331b8c (bug 1722261)
Backed out changeset 0ad4e47ff813 (bug 1722261)
Backed out changeset 21f448ea0744 (bug 1722261)
Backed out changeset de6aa81e9ccf (bug 1722261)
Backed out changeset 3b06f1822f48 (bug 1722261)
Backed out changeset 955f1c1c9f1a (bug 1722261)
Backed out changeset b7e53f12dc99 (bug 1722261)
2021-08-19 08:56:02 +03:00
Gerald Squelart 72ac283ea7 Bug 1722261 - RegisteredThread is now effectively unused, remove all remaining traces - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D121978
2021-08-19 02:45:09 +00:00
Gerald Squelart ab09f981a0 Bug 1722261 - Remove RegisteredThread from LiveProfiledThreadData - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D121977
2021-08-19 02:45:09 +00:00
Gerald Squelart 7eaf962383 Bug 1722261 - SizeOf{Ex,In}cludingThis for ProfilerRegist* classes, used in CorePS - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D121976
2021-08-19 02:45:08 +00:00
Gerald Squelart acf95ad0cf Bug 1722261 - Stop using RegisteredThread::Info() in profiler_unregister_thread - r=canaltinova
And now in locked_unregister_thread, use the aOnThreadRef directly instead of the TLSRegisteredThread.

Differential Revision: https://phabricator.services.mozilla.com/D121975
2021-08-19 02:45:08 +00:00
Gerald Squelart cdc784b447 Bug 1722261 - Convert locked_profiler_stream_json_for_this_process and ActivePS::ProfiledThreads to stop using RegisteredThread - r=canaltinova
Remove now-unused RegisteredThread::GetJSContext().

Differential Revision: https://phabricator.services.mozilla.com/D121974
2021-08-19 02:45:07 +00:00
Gerald Squelart 588cefd035 Bug 1722261 - Convert remaining use of RegisteredThread's ProfilingStack that was in locked_register_thread - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D121973
2021-08-19 02:45:07 +00:00
Gerald Squelart 34aa8cf6dd Bug 1722261 - Convert remaining uses of RegisteredThread's GetEventTarget and ResetMainThread - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D121971
2021-08-19 02:45:07 +00:00
Gerald Squelart 22cb733cca Bug 1722261 - In locked_profiler_start, find registered threads from ThreadRegistry and stop using RegisteredThread - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D121970
2021-08-19 02:45:06 +00:00
Gerald Squelart f442a5e4ef Bug 1722261 - Remove final uses of {,Racy}RegisteredThread's ReinitializeOnResume, and all ...JSSampling's - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D121969
2021-08-19 02:45:06 +00:00
Gerald Squelart 97e3890b81 Bug 1722261 - Rework profiler_set/clear_js_context to use ThreadRegistration - r=canaltinova
Remove some now-unused functions.

Differential Revision: https://phabricator.services.mozilla.com/D121968
2021-08-19 02:45:06 +00:00
Gerald Squelart 63419ce641 Bug 1722261 - In locked_profiler_stop, find live threads from ThreadRegistry and stop using RegisteredThread - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D121967
2021-08-19 02:45:05 +00:00
Gerald Squelart d1dc23d278 Bug 1722261 - During sampling, go through the ThreadRegistry to find ThreadRegistrations with ProfiledThreadData - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D121966
2021-08-19 02:45:05 +00:00
Gerald Squelart f76e1393d4 Bug 1722261 - Remove the old PlatformData, which is now unused - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D121965
2021-08-19 02:45:04 +00:00
Gerald Squelart 1ddcd6f2cd Bug 1722261 - Move mPreviousThreadRunningTimes from old PlatformData to ProfiledThreadData - r=canaltinova
It's more appropriate because the running times are only relevant to a profiling session.
And PreviousThreadRunningTimes can now be accessed through the ThreadRegistration (thanks to the ProfiledThreadData pointer added in the previous patch).

Since the threads' RunningTimes don't live in `PlatformData`, and because they are now implicitly cleared between profiling sessions (because `ProfiledThreadData`s get destroyed/recreated when stopping/starting the profiler), there is no need for an explicit `ClearRunningTimes()` anymore.

Differential Revision: https://phabricator.services.mozilla.com/D121964
2021-08-19 02:45:04 +00:00
Gerald Squelart f1efb88cf5 Bug 1722261 - Store ProfiledThreadData pointer in ThreadRegistrationData - r=canaltinova
Because ProfiledThreadData is always related to IsBeingProfiled, they are set and cleared together.
In particular, this is used to quickly guess that the thread is being profiled by reading the non-atomic mProfiledThreadData, rather than reading the slightly slower atomic mIsBeingProfiled.

Differential Revision: https://phabricator.services.mozilla.com/D121963
2021-08-19 02:45:04 +00:00
Gerald Squelart a6bac5bf4f Bug 1722261 - GetRunningEventDelay through ThreadRegistration - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D121962
2021-08-19 02:45:03 +00:00
Gerald Squelart 1103846a4e Bug 1722261 - Use IsSleeping and SetSleeping/Awake in ThreadRegistration - r=canaltinova
Also moved profiler_thread_is_sleeping to ProfilerThreadState.h.

Differential Revision: https://phabricator.services.mozilla.com/D121961
2021-08-19 02:45:03 +00:00
Gerald Squelart 90391ed0e9 Bug 1722261 - Use ThreadRegistration classes during sampling - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D121960
2021-08-19 02:45:03 +00:00
Gerald Squelart ba1812f66e Bug 1722261 - ProfilerThreadPlatformData platform-specific implementation - r=canaltinova
This is mostly a copy of the old PlatformData. That old PlatformData will be removed in a later patch, once it's not used anymore.

Differential Revision: https://phabricator.services.mozilla.com/D121959
2021-08-19 02:45:02 +00:00
Gerald Squelart 2c70228702 Bug 1722261 - Remove ThreadInfo.h, use ProfilerRegistrationInfo instead - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D121850
2021-08-19 02:45:02 +00:00
Gerald Squelart e5b83da81d Bug 1722261 - Store {,Racy}RegisteredThread pointer in ThreadRegistrationData - r=canaltinova
This will help with replacing the old {,Racy}RegisteredThread with the new ThreadRegistration classes, while still being able to access the old classes (until they are not needed anymore).

Differential Revision: https://phabricator.services.mozilla.com/D121849
2021-08-19 02:45:01 +00:00
Gerald Squelart ccc6f787bb Bug 1722261 - Move profiler_thread_is_being_profiled to ProfilerThreadState.h and use ThreadRegistration - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D121848
2021-08-19 02:45:01 +00:00
Gerald Squelart a544395950 Bug 1722261 - Remove data from RegisteredThread, only keep pass-through methods to the ThreadRegistrationData - r=canaltinova
Now {,Racy}RegisteredThread don't contain any data, but provide the same API that goes through ThreadRegistration.
Until they are removed, {,Racy}RegisteredThread are given private access to ThreadRegistration{,Data} for easier access.

This means that we can now change uses of RegisteredThread to use ThreadRegistration directly instead, and the data will be the same through either APIs.

Also, RacyRegisteredThread::ThreadId() was unused so it can be removed.

Differential Revision: https://phabricator.services.mozilla.com/D121847
2021-08-19 02:45:00 +00:00
Gerald Squelart ec135fdda7 Bug 1722261 - Use ProfilingStack inside ThreadRegistrationData - r=canaltinova
The ProfilingStack object inside ThreadRegistrationData is guaranteed to live while the thread is registered (and alive), and all accesses are guaranteed to be done either:
- On-thread, so during that time ThreadRegistrationData and its ProfilingStack cannot be destroyed.
- From another thread, but with the Profiler lock and/or per-thread lock, which also guarantees that ThreadRegistrationData and its ProfilingStack cannot be destroyed.

RacyRegisteredThread brought some doubts about end-of-thread accesses, that why there's was an intermediate ref-counted ProfilingStackOwner to keep ProfilingStack alive where needed. Now we can remove it.

Also the separate TLS (Thread Local Storage) for ProfilingStackOwner can be removed, since we can reach the ProfilingStack through the ThreadRegistration TLS for the same cost.

Differential Revision: https://phabricator.services.mozilla.com/D121846
2021-08-19 02:45:00 +00:00
Gerald Squelart e93ee41920 Bug 1722261 - Move profiler_is_active_and_thread_is_registered to ProfilerThreadState.h and use ThreadRegistration - r=canaltinova
ThreadRegistration already knows if it's registered, so profiler_is_active_and_thread_is_registered can use that now.

Differential Revision: https://phabricator.services.mozilla.com/D121845
2021-08-19 02:45:00 +00:00
Gerald Squelart a86300f990 Bug 1722261 - Remove handling of nested RegisteredThreads - r=canaltinova
Since ThreadRegistration already handles nested registrations, the legacy profiler_{,un}register_thread() functions don't need to care about that anymore (and the RegisteredThread TLS will be removed in a later patch anyway).
The informational markers have been moved to ProfilerThreadRegistration.cpp.

Differential Revision: https://phabricator.services.mozilla.com/D122315
2021-08-19 02:44:59 +00:00
Gerald Squelart 671cc2ba44 Bug 1722261 - Insert new ThreadRegistration (un)registering functions in the middle of profiler_{,un}register_thread - r=canaltinova
ProfilerThreadRegistry (un)register functions have been moved to platform.cpp because they need to interact closely with functions and classes in that file.

profiler_{,un}register_thread are now simple calls to ThreadRegistration::{R,Unr}egisterThread, which call ThreadRegistry::{R,Unr}egister, which now integrate that old bodies of profiler_{,un}register_thread.
So from this point, threads may use either profiler_{,un}register_thread or ThreadRegistration equivalents, and this will (un)register with both the new ThreadRegistration classes and the legacy RegisteredThread class into CorePS. (Later patches will remove RegisteredThread completely.)

Bonus: Since the stack top is now adjusted when constructing ThreadRegistrationInfo (before giving it to the legacy ThreadInfo), there is no more need for `GetStackTop()`.

Differential Revision: https://phabricator.services.mozilla.com/D121844
2021-08-19 02:44:59 +00:00
Gerald Squelart b64fd5a92c Bug 1722261 - New header ProfilerThreadState.h will contain thread-related profiler APIs - r=canaltinova
Thread-related APIs that are currently in ProfilerState.h will move here, and will use the new ThreadRegistration classes introduced in bug 1721939.

In this patch the header is empty apart from a few #includes, and users of "ProfilerState.h"'s thread functions now #include "ProfilerThreadState.h" instead. So there are no actual code changes yet.

Differential Revision: https://phabricator.services.mozilla.com/D121843
2021-08-19 02:44:58 +00:00
Mark Banner 9383f3e40e Bug 1725934 - Remove unnecessary babel plugin, and update node modules to the latest versions. r=Mardak
plugin-syntax-class-properties was supported by default in Babel 7.14.0.
This also adds top level await support in modules with the upgrade to Babel 7.15.0.

Differential Revision: https://phabricator.services.mozilla.com/D122865
2021-08-18 07:44:47 +00:00
Gerald Squelart 28b899faee Bug 1633572 - Serialize RunningTimes into fewer bytes - r=canaltinova
The majority of RunningTimes objects would contain zero or near-zero values (no/low activity), so it makes sense to serialize them using ULEB128, which only takes 1 bytes for values under 128, instead of the full 8 bytes.
And high values in the millions would still serialize in 4 bytes or less, half of the 8-byte type size.

This patch is particularly useful now, because `SampleSample` entries are much smaller than `CompactStack` entries, so the size taken by RunningTimes is much more significant now, and saving up to 7 bytes means we could record up to 24% more of these entries in the same buffer space.

Differential Revision: https://phabricator.services.mozilla.com/D122680
2021-08-18 01:47:41 +00:00
Gerald Squelart 9c1ed025c1 Bug 1633572 - New small buffer entry to indicate an indentical sample instead of a copy - r=canaltinova
Instead of copying the full stack from the previous sample when identical, the new ProfileBufferEntryKind::TimeBeforeSameSample + SameSample entry pair indicates that this is an identical sample. Later when producing the final JSON profile, we can just re-use the same sample identifier as before.

This effectively lowers the size of this kind of entry from hundreds of bytes, down to 20-30 bytes, which should help with capturing more samples in the same buffer size. And it also uses less CPU resources, since we don't need to find the previous stack and copy it.

We still need to perform a full copy at the start of a buffer chunk, to make sure there is always a full stack available in case older previous chunks have been destroyed.

Differential Revision: https://phabricator.services.mozilla.com/D122679
2021-08-18 01:47:41 +00:00
Mike Hommey a0196647e2 Bug 1726100 - Move wasm-sandboxing defaults to configure. r=firefox-build-system-reviewers,andi
This has the side-effect of enabling it on plain builds, which thus now
require the wasi sysroot.

Differential Revision: https://phabricator.services.mozilla.com/D122826
2021-08-18 01:09:58 +00:00
André Bargull d2bbf86876 Bug 1726123 - Part 5: Add missing "js/" includes outside of SM. r=arai
In preparation for the next part, add missing includes to "js/" public headers.

Differential Revision: https://phabricator.services.mozilla.com/D122843
2021-08-17 15:45:39 +00:00
Toshihito Kikuchi 8ab01354ad Bug 1724770 - Fix a format string for AppendPrintf in SharedLibraryInfo::GetInfoForSelf()". r=gerald
We passed 64-bit integer arguments, but `AppendPrintf` took them
as 32-bit parameters.  This generated a wrong version string in
32bit build.

Differential Revision: https://phabricator.services.mozilla.com/D122623
2021-08-14 06:27:38 +00:00
Gerald Squelart a878407bf3 Bug 1721939 - ProfilerThreadRegistry - r=canaltinova
`mozilla::profiler::ThreadRegistry` keeps a list of all `ThreadRegistration`s, and makes it safely accessible from any thread.

While a thread is accessing the list, that list cannot be changed (a thread (un)registering itself needs to acquire the associated mutex). In particular, a thread will not disappear during that time, so it's safe to access the `ThreadRegistration` data that is owned by these threads.

The subset of `ThreadRegistrationData` accessor sub-classes available through `ThreadRegistry` is different from direct on-thread access, to guarantee safe access in different circumstances.
For example, `JSContext` may be read through a `LockedRWFromAnyThread`, which requires the per-thread lock, thereby preventing any simultaneous `JSContext` change from the owning thread. And because the `LockedRWOnThread` accessor is not reachable through the registry, it's not allowed, or even possible, to change `JSContext` from other threads.

Differential Revision: https://phabricator.services.mozilla.com/D120818
2021-08-12 01:12:31 +00:00
Gerald Squelart 7e4af9828d Bug 1721939 - ProfilerThreadRegistration - r=canaltinova
This class is how a thread will register itself, and contains the thread's relevant data.
A registration-accessor object can be accessed on the thread with `GetOnThreadPtr()` or `WithOnThreadRef{,Or}()`, and from there some of the data accessor may be obtained, with per-thread lock where necessary.

(The next patch will introduce ThreadRegistry to access registrations from other threads.)

Differential Revision: https://phabricator.services.mozilla.com/D120817
2021-08-12 01:12:31 +00:00
Gerald Squelart 837c1d6209 Bug 1721939 - ProfilerThreadRegistrationData accessor sub-classes - r=canaltinova
Non-virtual sub-classes of `ProfilerThreadRegistrationData` provide layers of public accessors to subsets of the data.
Each level builds on the previous one and adds further access to more data, but always with the appropriate guards where necessary.
These classes have protected constructors, so only some trusted classes (in later patches) will be able to construct them, and then give limited access depending on who asks (the owning thread or another one), and how much data they actually need.

The hierarchy is, from base to most derived:
- `ThreadRegistrationData` (previous patch)
- `ThreadRegistrationUnlockedConstReader`
- `ThreadRegistrationUnlockedConstReaderAndAtomicRW`
- `ThreadRegistrationUnlockedRWForLockedProfiler`
- `ThreadRegistrationUnlockedReaderAndAtomicRWOnThread`
- `ThreadRegistrationLockedRWFromAnyThread`
- `ThreadRegistrationLockedRWOnThread`
- `ThreadRegistration::EmbeddedData` (next patch, as data member of `ThreadRegistration`)

Tech detail: These classes need to be a single hierarchy so that the upcoming `ThreadRegistration` class can contain the most-derived class, and from there can publish references to base classes without relying on Undefined Behavior. (It's not allowed to have some object and give a reference to a sub-class, unless that object was *really* constructed as that sub-class at least, even if that sub-class only adds member functions!)
And where appropriate, these references will come along with the required lock.

For example:
JSContext can only be written on the owning thread, through `ThreadRegistrationLockedRWOnThread` (which will be accessed through TLS = Thread Local Storage), which requires a per-thread lock.
Thanks to that, JSContext can be read using `ThreadRegistrationUnlockedReaderAndAtomicRWOnThread`, without lock because we're on the owning thread, so there cannot be any write at the same time.
Other threads will be able to read it as well, but they will only see it through `ThreadRegistrationLockedRWFromAnyThread`, which will require the per-thread lock, thereby preventing simultaneous writes.

Differential Revision: https://phabricator.services.mozilla.com/D120816
2021-08-12 01:12:30 +00:00
Gerald Squelart ee9cb7e050 Bug 1721939 - ProfilerThreadRegistrationData - r=canaltinova
This class contains the same data as was in `RacyRegisteredThread` and `RegisteredThread`, but this data is kept `protected`, accessors will be added through sub-classes in the next patch, and tests in a later patch once publicly accessible.

Note that `ThreadRegistrationInfo`, `ProfilingStack`, and `PlatformData` are now directly included as values.

The stack top platform-specific code was taken from `GetStackTop()` in platform-win32.cpp and platform-macos.cpp.

Differential Revision: https://phabricator.services.mozilla.com/D120815
2021-08-12 01:12:30 +00:00
Gerald Squelart 67fa028f4d Bug 1721939 - ProfilerThreadPlatformData - r=canaltinova
This class will contain platform-specific data about threads.
It needs to be public because it will be included as value into the thread registration data (to avoid a separate allocation).

Tests will be added when platform-specific code is implemented in bug 1722261.

Differential Revision: https://phabricator.services.mozilla.com/D120814
2021-08-12 01:12:30 +00:00
Gerald Squelart 779c0c93b1 Bug 1721939 - ProfilerThreadRegistrationInfo - r=canaltinova
`ProfilerThreadRegistrationInfo` will replace `ThreadInfo`, and contains thread-specific information that may be kept after that thread has ended, to identify recorded profiling data about that thread.
It is public and not ref-counted because it will be included as value into the thread registration data (to avoid a separate allocation).

Differential Revision: https://phabricator.services.mozilla.com/D120813
2021-08-12 01:12:29 +00:00
Gerald Squelart 056d185383 Bug 1721569 - Use std::this_thread::get_id() on other platforms - r=florian
Now `profiler_current_thread_id()` is available on all platforms, at all tier levels.

Differential Revision: https://phabricator.services.mozilla.com/D121053
2021-08-11 03:27:52 +00:00
Gerald Squelart 032f23b189 Bug 1721569 - Change id native types to reflect what each platform really provides - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D121052
2021-08-11 03:27:51 +00:00
Gerald Squelart 1f76b47543 Bug 1721569 - Move main-thread id functions to cpp files - r=florian
This hides the scProfilerMainThreadId detail, and makes for a safer API.
Also, ::profiler_init_main_thread_id() calls ::mozilla::baseprofiler::profiler_init_main_thread_id().
And in non-MOZ_GECKO_PROFILER builds, AUTO_PROFILER_INIT calls profiler_init_main_thread_id(), which makes other main-thread functions usable there (assuming profiler_current_thread_id works).

Differential Revision: https://phabricator.services.mozilla.com/D121695
2021-08-11 03:27:51 +00:00
Gerald Squelart 84d1ba4229 Bug 1721569 - Moved implementations of {,Base}ProfilerUtils.h declarations to ProfilerUtils.cpp - r=florian
This patch only shuffles source code around, so that all declarations in {,Base}ProfilerUtils.h are now implemented only in ProfilerUtils.cpp (instead of the different platform-*.cpp), the final generated code should be the same in MOZ_GECKO_PROFILER builds (the default on all our supported platforms).
This simplifies the headers and makes further changes easier.

In non-MOZ_GECKO_PROFILER builds: On supported platforms these functions are now fully defined; Unsupported platforms should all had `getpid()`, but thread ids are null.
So now `profiler_current_process_id()` is available on all platforms, at all tier levels.

Differential Revision: https://phabricator.services.mozilla.com/D121051
2021-08-11 03:27:50 +00:00
Gerald Squelart 5d1937d55a Bug 1721569 - Handle different sizes of Profiler{Process,Thread}Id - r=florian
Since ProfilerProcessId and ProfilerThreadId (and their NumberTypes) will potentially grow to 64 bits on some platforms (in a later patch), all code that uses them must be able to handle bigger types.

Differential Revision: https://phabricator.services.mozilla.com/D121049
2021-08-11 03:27:50 +00:00
Gerald Squelart c469a8f0be Bug 1721569 - Add gtest checks comparing Base and Gecko profiler process/thread APIs - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D121048
2021-08-11 03:27:49 +00:00
Gerald Squelart e5740a518f Bug 1721569 - Also compile Gecko Profiler gtest files in non-MOZ_GECKO_PROFILER builds - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D121046
2021-08-11 03:27:49 +00:00
Gerald Squelart 2e518a7873 Bug 1721569 - Fix gtest assertions and remove redundant Utils test - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D121044
2021-08-11 03:27:48 +00:00
Kimberly Sereduck cc8b5f4f49 Bug 1716825: Navigate to a sub-page rather than about:blank for warm pageloads;r=perftest-reviewers,Bebe,davehunt
Differential Revision: https://phabricator.services.mozilla.com/D120718
2021-08-10 16:18:54 +00:00
Gerald Squelart 3095d71dc7 Bug 1716785 - Report the uncapped macOS version in profile.meta.oscpu - r=canaltinova
We are using the OS version as reported in the user agent string, but on macOS the version is capped at 10.15. This patch now reports the real and full OS version.

Differential Revision: https://phabricator.services.mozilla.com/D122063
2021-08-10 09:50:44 +00:00
Mike Hommey 84b57c8377 Bug 1724278 - Fix --with-system-nspr build after bug 1722652 r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D121940
2021-08-09 21:12:04 +00:00
Alex Lopez cf03d5329e Bug 1696251: Replace usages of self with command_context in compare-locales mach commands. r=mhentges
The patch that made the replacement across all commands
missed this particular file.

Differential Revision: https://phabricator.services.mozilla.com/D121917
2021-08-09 19:29:08 +00:00
Butkovits Atila 1147123b55 Backed out changeset c5618823c6b5 (bug 1716825) for causing Btime failures. CLOSED TREE 2021-08-07 12:08:15 +03:00
Kimberly Sereduck c4fd908d12 Bug 1716825: Navigate to a sub-page rather than about:blank for warm pageloads;r=perftest-reviewers,Bebe
Differential Revision: https://phabricator.services.mozilla.com/D120718
2021-08-07 01:42:16 +00:00
Markus Stange 06efd253f5 Bug 1642516 - In the Lul stack walker, don't subtract 1 byte from the return address, for consistency with other stackwalkers. r=gerald
This makes all our stackwalkers in Firefox consistent with respect to return addresses:
For non-leaf frames in stacks, the code address now always points to the instruction
*after* the call instruction, i.e. to the instruction that will be executed once the
function returns.
For symbolication purposes, 1 byte will need to be subtracted in order to obtain correct
line number + inline stack information for  the call instruction. This subtraction will
be the responsibility of the Firefox profiler front-end, not of the stackwalkers.

Depends on D121930

Differential Revision: https://phabricator.services.mozilla.com/D121931
2021-08-07 00:34:41 +00:00
Markus Stange 3077dbd403 Bug 1642516 - In the EHABI stack unwinder, make sure to report proper instruction addresses by masking of the bit that indicates ARM or Thumb mode. r=jld
This will make it so that, for return addresses, symbolication can look up
the address "returnAddress - 1" and get the correct line number (and inline
stack) for the call instruction.
Without the masking, returnAddress - 1 might still fall into the instruction
*after* the call instruction, giving wrong line numbers / inline stacks.

Differential Revision: https://phabricator.services.mozilla.com/D121930
2021-08-07 00:34:41 +00:00
Florian Quèze 5400d8a1ee Bug 1724187 - Make the test_addProfilerMarker.js test check the content of marker stacks, r=julienw
Differential Revision: https://phabricator.services.mozilla.com/D121979
2021-08-06 20:24:43 +00:00
Butkovits Atila 74a8d8dd6b Backed out changeset e0eb8376a840 (bug 1716825) for causing Btime failures. CLOSED TREE 2021-08-05 23:58:46 +03:00
Kimberly Sereduck 62fe64a298 Bug 1716825: Navigate to a sub-page rather than about:blank for warm pageloads;r=perftest-reviewers,Bebe
Differential Revision: https://phabricator.services.mozilla.com/D120718
2021-08-05 17:21:18 +00:00
Toshihito Kikuchi 07dfbc6b36 Bug 1723868 - Skip msvp9dec_store.dll in GetInfoForSelf(). r=gerald
When mfplat.dll loads msvp9dec_store.dll, it posts a task
to unload the module to the work queue even if msvp9dec_store.dll
is already loaded and mfplat.dll skips LoadLibrary.  Therefore,
we cannot safely lock msvp9dec_store.dll by loading it as data.

The proposed fix is to skip processing the module.

Differential Revision: https://phabricator.services.mozilla.com/D121777
2021-08-05 02:36:27 +00:00
Nazım Can Altınova b5188bfd15 Bug 1723537 - Mention the MOZ_GECKO_PROFILER for macros/function that are no-op when it's not defined r=gerald
Depends on D121535

Differential Revision: https://phabricator.services.mozilla.com/D121623
2021-08-04 09:37:32 +00:00
Nazım Can Altınova 4088fb0eff Bug 1723537 - Add can_accept_markers profiler API for Rust r=emilio,gerald
This is a prerequisite for adding a marker API. There is the same API for C++
as `profiler_can_accept_markers`. This API can both be used as an external API
before adding an expensive payload to the profile marker, and it can be used as
an internal function to check it inside the new `add_marker` API that will be
introduced soon.

Differential Revision: https://phabricator.services.mozilla.com/D121535
2021-08-04 09:37:32 +00:00
Emilio Cobos Álvarez e55ff0d94b Bug 1652560 - Also remove some unused imports.
Differential Revision: https://phabricator.services.mozilla.com/D121487
2021-08-01 19:00:44 +00:00
Emilio Cobos Álvarez f884b5bff7 Bug 1652560 - Remove unused function. r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D121454
2021-07-31 22:55:38 +00:00
Nazım Can Altınova 10d6a9aa68 Bug 1652560 - Add the gecko-profiler crate to rust clippy lint task r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D120797
2021-07-30 21:49:23 +00:00
Nazım Can Altınova 5e38857971 Bug 1652560 - Add gecko_profiler_fn_label proc-macro API as an alternative r=emilio
This is a syntactic sugar for `gecko_profiler_label` API. When you use this
macro on top of a function, it will automatically expand the function content
with `gecko_profiler_label` macro call.

Differential Revision: https://phabricator.services.mozilla.com/D120794
2021-07-30 21:49:22 +00:00
Nazım Can Altınova 64f3601755 Bug 1652560 - Add gecko_profiler_label API for adding label frames from Rust code r=emilio,gerald
Differential Revision: https://phabricator.services.mozilla.com/D120793
2021-07-30 21:49:22 +00:00
Nazım Can Altınova 4302cd6058 Bug 1652560 - Autogenerate profiling_categories.rs with profiling_categories.yaml r=gerald,emilio
Generate the user friendly Rust enums and their impls for profiling categories.

Differential Revision: https://phabricator.services.mozilla.com/D120792
2021-07-30 21:49:21 +00:00
Nazım Can Altınova 55d1549114 Bug 1652560 - Add gecko_profiler::is_active API for Rust r=emilio,gerald
This is both an API on its own and a prerequisite for profiling label frame
API.

Differential Revision: https://phabricator.services.mozilla.com/D120790
2021-07-30 21:49:20 +00:00
Nazım Can Altınova 424eaf980b Bug 1652560 - Add bindgen build step to gecko-profiler API crate r=emilio
Bindgen will be needed for gecko_profiler::is_active gecko_profiler_label API
in this patch, as well as the marker API that will land after this.

Differential Revision: https://phabricator.services.mozilla.com/D120789
2021-07-30 21:49:20 +00:00
Barret Rennie e2aeb76b58 Bug 1715643 - Add PerfDocs for fxrecord r=sparky,perftest-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D118565
2021-07-30 17:28:58 +00:00
Barret Rennie 89a018e023 Bug 1717744 - Do not require a custom FrameworkGatherer for static-only PerfDocs r=sparky
Differential Revision: https://phabricator.services.mozilla.com/D118564
2021-07-30 17:28:58 +00:00
Zibi Braniecki 56659da030 Bug 1660392 - [l10nregistry] part8: Remove L10nRegistry.jsm. r=platform-i18n-reviewers,gregtatum
Depends on D105584

Differential Revision: https://phabricator.services.mozilla.com/D105585
2021-07-30 16:47:49 +00:00
Zibi Braniecki ded73fe965 Bug 1660392 - [l10nregistry] part5: Move tests to use Rust L10nRegistry. r=platform-i18n-reviewers,gregtatum
Depends on D105583

Differential Revision: https://phabricator.services.mozilla.com/D102372
2021-07-30 16:47:48 +00:00
Andrew Osmond ad79e705fd Bug 1722913 - Port remaining tests on Linux to WebRender. r=jmaher,perftest-reviewers,AlexandruIonescu
This corrects a number of tests that got disabled in the transition, and
a few that we never moved over. It also disables the non-WebRender
versions of many tests.

autoland

--- target_task_set@6d262ed
+++ target_task_set@ao_ci_linux_tsan
+test-linux1804-64-asan-qr/opt-marionette-fis-e10s
+test-linux1804-64-asan-qr/opt-mochitest-plain-e10s
+test-linux1804-64-asan-qr/opt-mochitest-plain-fis-e10s
+test-linux1804-64-asan-qr/opt-mochitest-plain-gpu-e10s
+test-linux1804-64-asan-qr/opt-reftest-fis-e10s
+test-linux1804-64-asan-qr/opt-test-verify-gpu-e10s
-test-linux1804-64-asan/opt-cppunit-1proc
-test-linux1804-64-asan/opt-firefox-ui-functional-local-e10s
-test-linux1804-64-asan/opt-firefox-ui-functional-remote-e10s
-test-linux1804-64-asan/opt-gtest-1proc
-test-linux1804-64-asan/opt-jsreftest-e10s
-test-linux1804-64-asan/opt-marionette-e10s
-test-linux1804-64-asan/opt-marionette-fis-e10s
-test-linux1804-64-asan/opt-mochitest-a11y-1proc
-test-linux1804-64-asan/opt-mochitest-chrome-1proc
-test-linux1804-64-asan/opt-mochitest-chrome-gpu-e10s
-test-linux1804-64-asan/opt-mochitest-plain-e10s
-test-linux1804-64-asan/opt-mochitest-plain-fis-e10s
-test-linux1804-64-asan/opt-mochitest-plain-gpu-e10s
-test-linux1804-64-asan/opt-mochitest-remote-e10s
-test-linux1804-64-asan/opt-mochitest-webgl1-core-e10s
-test-linux1804-64-asan/opt-mochitest-webgl1-core-gli-e10s
-test-linux1804-64-asan/opt-mochitest-webgl1-ext-e10s
-test-linux1804-64-asan/opt-mochitest-webgl1-ext-fis-gli-e10s
-test-linux1804-64-asan/opt-mochitest-webgl1-ext-gli-e10s
-test-linux1804-64-asan/opt-mochitest-webgl2-core-e10s
-test-linux1804-64-asan/opt-mochitest-webgl2-core-gli-e10s
-test-linux1804-64-asan/opt-mochitest-webgl2-ext-e10s
-test-linux1804-64-asan/opt-mochitest-webgl2-ext-fis-e10s
-test-linux1804-64-asan/opt-mochitest-webgl2-ext-fis-gli-e10s
-test-linux1804-64-asan/opt-mochitest-webgl2-ext-gli-e10s
-test-linux1804-64-asan/opt-reftest-fis-e10s
-test-linux1804-64-asan/opt-xpcshell-e10s
+test-linux1804-64-qr/debug-test-verify-gpu-e10s
+test-linux1804-64-qr/debug-test-verify-wpt-e10s
+test-linux1804-64-qr/debug-xpcshell-spi-nw-e10s
+test-linux1804-64-qr/opt-browser-screenshots-e10s
+test-linux1804-64-qr/opt-marionette-headless-e10s
+test-linux1804-64-qr/opt-marionette-headless-fis-e10s
+test-linux1804-64-qr/opt-test-verify-gpu-e10s
+test-linux1804-64-qr/opt-test-verify-wpt-e10s
-test-linux1804-64/debug-cppunit-1proc
-test-linux1804-64/debug-firefox-ui-functional-local-e10s
-test-linux1804-64/debug-firefox-ui-functional-remote-e10s
-test-linux1804-64/debug-gtest-1proc
-test-linux1804-64/debug-jsreftest-e10s
-test-linux1804-64/debug-marionette-e10s
-test-linux1804-64/debug-marionette-fis-e10s
-test-linux1804-64/debug-mochitest-a11y-1proc
-test-linux1804-64/debug-mochitest-chrome-1proc
-test-linux1804-64/debug-mochitest-chrome-gpu-e10s
-test-linux1804-64/debug-mochitest-plain-e10s
-test-linux1804-64/debug-mochitest-plain-gpu-e10s
-test-linux1804-64/debug-mochitest-remote-e10s
-test-linux1804-64/debug-mochitest-webgl1-core-e10s
-test-linux1804-64/debug-mochitest-webgl1-core-gli-e10s
-test-linux1804-64/debug-mochitest-webgl1-ext-e10s
-test-linux1804-64/debug-mochitest-webgl1-ext-gli-e10s
-test-linux1804-64/debug-mochitest-webgl2-core-e10s
-test-linux1804-64/debug-mochitest-webgl2-core-gli-e10s
-test-linux1804-64/debug-mochitest-webgl2-ext-e10s
-test-linux1804-64/debug-mochitest-webgl2-ext-gli-e10s
-test-linux1804-64/debug-test-verify-e10s
-test-linux1804-64/debug-test-verify-gpu-e10s
-test-linux1804-64/debug-test-verify-wpt-e10s
-test-linux1804-64/debug-xpcshell-e10s
-test-linux1804-64/debug-xpcshell-spi-nw-e10s
-test-linux1804-64/opt-browser-screenshots-e10s
-test-linux1804-64/opt-cppunit-1proc
-test-linux1804-64/opt-firefox-ui-functional-local-e10s
-test-linux1804-64/opt-firefox-ui-functional-remote-e10s
-test-linux1804-64/opt-gtest-1proc
-test-linux1804-64/opt-jsreftest-e10s
-test-linux1804-64/opt-marionette-e10s
-test-linux1804-64/opt-marionette-fis-e10s
-test-linux1804-64/opt-marionette-headless-e10s
-test-linux1804-64/opt-marionette-headless-fis-e10s
-test-linux1804-64/opt-mochitest-a11y-1proc
-test-linux1804-64/opt-mochitest-chrome-1proc
-test-linux1804-64/opt-mochitest-chrome-gpu-e10s
-test-linux1804-64/opt-mochitest-plain-e10s
-test-linux1804-64/opt-mochitest-plain-gpu-e10s
-test-linux1804-64/opt-mochitest-remote-e10s
-test-linux1804-64/opt-mochitest-webgl1-core-e10s
-test-linux1804-64/opt-mochitest-webgl1-core-gli-e10s
-test-linux1804-64/opt-mochitest-webgl1-ext-e10s
-test-linux1804-64/opt-mochitest-webgl1-ext-gli-e10s
-test-linux1804-64/opt-mochitest-webgl2-core-e10s
-test-linux1804-64/opt-mochitest-webgl2-core-gli-e10s
-test-linux1804-64/opt-mochitest-webgl2-ext-e10s
-test-linux1804-64/opt-mochitest-webgl2-ext-gli-e10s
-test-linux1804-64/opt-test-verify-e10s
-test-linux1804-64/opt-test-verify-gpu-e10s
-test-linux1804-64/opt-test-verify-wpt-e10s
-test-linux1804-64/opt-xpcshell-e10s

mozilla-central

--- target_task_set@6d262ed
+++ target_task_set@ao_ci_linux_tsan
+test-linux1804-64-asan-qr/opt-marionette-fis-e10s
+test-linux1804-64-asan-qr/opt-mochitest-plain-e10s
+test-linux1804-64-asan-qr/opt-mochitest-plain-fis-e10s
+test-linux1804-64-asan-qr/opt-mochitest-plain-gpu-e10s
+test-linux1804-64-asan-qr/opt-reftest-fis-e10s
-test-linux1804-64-asan/opt-cppunit-1proc
-test-linux1804-64-asan/opt-firefox-ui-functional-local-e10s
-test-linux1804-64-asan/opt-firefox-ui-functional-remote-e10s
-test-linux1804-64-asan/opt-gtest-1proc
-test-linux1804-64-asan/opt-jsreftest-e10s
-test-linux1804-64-asan/opt-marionette-e10s
-test-linux1804-64-asan/opt-marionette-fis-e10s
-test-linux1804-64-asan/opt-mochitest-a11y-1proc
-test-linux1804-64-asan/opt-mochitest-chrome-1proc
-test-linux1804-64-asan/opt-mochitest-chrome-gpu-e10s
-test-linux1804-64-asan/opt-mochitest-plain-e10s
-test-linux1804-64-asan/opt-mochitest-plain-fis-e10s
-test-linux1804-64-asan/opt-mochitest-plain-gpu-e10s
-test-linux1804-64-asan/opt-mochitest-remote-e10s
-test-linux1804-64-asan/opt-mochitest-webgl1-core-e10s
-test-linux1804-64-asan/opt-mochitest-webgl1-core-gli-e10s
-test-linux1804-64-asan/opt-mochitest-webgl1-ext-e10s
-test-linux1804-64-asan/opt-mochitest-webgl1-ext-fis-gli-e10s
-test-linux1804-64-asan/opt-mochitest-webgl1-ext-gli-e10s
-test-linux1804-64-asan/opt-mochitest-webgl2-core-e10s
-test-linux1804-64-asan/opt-mochitest-webgl2-core-gli-e10s
-test-linux1804-64-asan/opt-mochitest-webgl2-ext-e10s
-test-linux1804-64-asan/opt-mochitest-webgl2-ext-fis-e10s
-test-linux1804-64-asan/opt-mochitest-webgl2-ext-fis-gli-e10s
-test-linux1804-64-asan/opt-mochitest-webgl2-ext-gli-e10s
-test-linux1804-64-asan/opt-reftest-fis-e10s
-test-linux1804-64-asan/opt-xpcshell-e10s
+test-linux1804-64-ccov-qr/opt-cppunit-1proc
+test-linux1804-64-ccov-qr/opt-firefox-ui-functional-local-e10s
+test-linux1804-64-ccov-qr/opt-firefox-ui-functional-remote-e10s
+test-linux1804-64-ccov-qr/opt-gtest-1proc
+test-linux1804-64-ccov-qr/opt-jittest-1proc
+test-linux1804-64-ccov-qr/opt-jsreftest-e10s
+test-linux1804-64-ccov-qr/opt-marionette-e10s
+test-linux1804-64-ccov-qr/opt-mochitest-a11y-1proc
+test-linux1804-64-ccov-qr/opt-mochitest-chrome-1proc
+test-linux1804-64-ccov-qr/opt-mochitest-chrome-gpu-e10s
+test-linux1804-64-ccov-qr/opt-mochitest-plain-e10s
+test-linux1804-64-ccov-qr/opt-mochitest-plain-gpu-e10s
+test-linux1804-64-ccov-qr/opt-mochitest-remote-e10s
+test-linux1804-64-ccov-qr/opt-mochitest-webgl1-core-e10s
+test-linux1804-64-ccov-qr/opt-mochitest-webgl1-ext-e10s
+test-linux1804-64-ccov-qr/opt-mochitest-webgl2-core-e10s
+test-linux1804-64-ccov-qr/opt-mochitest-webgl2-ext-e10s
+test-linux1804-64-ccov-qr/opt-test-coverage-e10s
+test-linux1804-64-ccov-qr/opt-test-coverage-wpt-e10s
-test-linux1804-64-ccov/opt-cppunit-1proc
-test-linux1804-64-ccov/opt-firefox-ui-functional-local-e10s
-test-linux1804-64-ccov/opt-firefox-ui-functional-remote-e10s
-test-linux1804-64-ccov/opt-gtest-1proc
-test-linux1804-64-ccov/opt-jittest-1proc
-test-linux1804-64-ccov/opt-jsreftest-e10s
-test-linux1804-64-ccov/opt-marionette-e10s
-test-linux1804-64-ccov/opt-mochitest-a11y-1proc
-test-linux1804-64-ccov/opt-mochitest-chrome-1proc
-test-linux1804-64-ccov/opt-mochitest-chrome-gpu-e10s
-test-linux1804-64-ccov/opt-mochitest-plain-e10s
-test-linux1804-64-ccov/opt-mochitest-plain-gpu-e10s
-test-linux1804-64-ccov/opt-mochitest-remote-e10s
-test-linux1804-64-ccov/opt-mochitest-webgl1-core-e10s
-test-linux1804-64-ccov/opt-mochitest-webgl1-ext-e10s
-test-linux1804-64-ccov/opt-mochitest-webgl2-core-e10s
-test-linux1804-64-ccov/opt-mochitest-webgl2-ext-e10s
-test-linux1804-64-ccov/opt-test-coverage-e10s
-test-linux1804-64-ccov/opt-test-coverage-wpt-e10s
-test-linux1804-64-ccov/opt-xpcshell-e10s
+test-linux1804-64-ccov-qr/opt-xpcshell-e10s
+test-linux1804-64-qr/debug-xpcshell-spi-nw-e10s
+test-linux1804-64-shippable-qr/opt-browser-screenshots-e10s
+test-linux1804-64-shippable-qr/opt-marionette-headless-e10s
+test-linux1804-64-shippable-qr/opt-marionette-headless-fis-e10s
+test-linux1804-64-shippable-qr/opt-mochitest-plain-headless-e10s
+test-linux1804-64-shippable-qr/opt-mochitest-plain-headless-fis-e10s
+test-linux1804-64-shippable-qr/opt-talos-flex-e10s
-test-linux1804-64-shippable/opt-awsy-base-e10s
-test-linux1804-64-shippable/opt-awsy-e10s
-test-linux1804-64-shippable/opt-awsy-tp6-e10s
-test-linux1804-64-shippable/opt-browser-screenshots-e10s
-test-linux1804-64-shippable/opt-browsertime-firefox-youtube-playback-h264-sfr-e10s
-test-linux1804-64-shippable/opt-browsertime-firefox-youtube-playback-hfr-e10s
-test-linux1804-64-shippable/opt-browsertime-firefox-youtube-playback-vp9-sfr-e10s
-test-linux1804-64-shippable/opt-browsertime-firefox-youtube-playback-widevine-h264-sfr-e10s
-test-linux1804-64-shippable/opt-browsertime-firefox-youtube-playback-widevine-hfr-e10s
-test-linux1804-64-shippable/opt-browsertime-firefox-youtube-playback-widevine-vp9-sfr-e10s
-test-linux1804-64-shippable/opt-browsertime-tp6-essential-firefox-amazon-e10s
-test-linux1804-64-shippable/opt-browsertime-tp6-essential-firefox-bing-search-e10s
-test-linux1804-64-shippable/opt-browsertime-tp6-essential-firefox-cnn-e10s
-test-linux1804-64-shippable/opt-browsertime-tp6-essential-firefox-fandom-e10s
-test-linux1804-64-shippable/opt-browsertime-tp6-essential-firefox-google-slides-e10s
-test-linux1804-64-shippable/opt-browsertime-tp6-essential-firefox-instagram-e10s
-test-linux1804-64-shippable/opt-browsertime-tp6-essential-firefox-twitter-e10s
-test-linux1804-64-shippable/opt-browsertime-tp6-essential-firefox-wikipedia-e10s
-test-linux1804-64-shippable/opt-browsertime-tp6-essential-firefox-yahoo-mail-e10s
-test-linux1804-64-shippable/opt-cppunit-1proc
-test-linux1804-64-shippable/opt-firefox-ui-functional-local-e10s
-test-linux1804-64-shippable/opt-firefox-ui-functional-remote-e10s
-test-linux1804-64-shippable/opt-gtest-1proc
-test-linux1804-64-shippable/opt-jsreftest-e10s
-test-linux1804-64-shippable/opt-marionette-e10s
-test-linux1804-64-shippable/opt-marionette-fis-e10s
-test-linux1804-64-shippable/opt-marionette-headless-e10s
-test-linux1804-64-shippable/opt-marionette-headless-fis-e10s
-test-linux1804-64-shippable/opt-mochitest-a11y-1proc
-test-linux1804-64-shippable/opt-mochitest-chrome-1proc
-test-linux1804-64-shippable/opt-mochitest-chrome-gpu-e10s
-test-linux1804-64-shippable/opt-mochitest-plain-e10s
-test-linux1804-64-shippable/opt-mochitest-plain-gpu-e10s
-test-linux1804-64-shippable/opt-mochitest-plain-headless-e10s
-test-linux1804-64-shippable/opt-mochitest-plain-headless-fis-e10s
-test-linux1804-64-shippable/opt-mochitest-remote-e10s
-test-linux1804-64-shippable/opt-mochitest-webgl1-core-e10s
-test-linux1804-64-shippable/opt-mochitest-webgl1-core-gli-e10s
-test-linux1804-64-shippable/opt-mochitest-webgl1-ext-e10s
-test-linux1804-64-shippable/opt-mochitest-webgl1-ext-gli-e10s
-test-linux1804-64-shippable/opt-mochitest-webgl2-core-e10s
-test-linux1804-64-shippable/opt-mochitest-webgl2-core-gli-e10s
-test-linux1804-64-shippable/opt-mochitest-webgl2-ext-e10s
-test-linux1804-64-shippable/opt-mochitest-webgl2-ext-gli-e10s
-test-linux1804-64-shippable/opt-xpcshell-e10s
-test-linux1804-64/debug-cppunit-1proc
-test-linux1804-64/debug-firefox-ui-functional-local-e10s
-test-linux1804-64/debug-firefox-ui-functional-remote-e10s
-test-linux1804-64/debug-gtest-1proc
-test-linux1804-64/debug-jsreftest-e10s
-test-linux1804-64/debug-marionette-e10s
-test-linux1804-64/debug-marionette-fis-e10s
-test-linux1804-64/debug-mochitest-a11y-1proc
-test-linux1804-64/debug-mochitest-chrome-1proc
-test-linux1804-64/debug-mochitest-chrome-gpu-e10s
-test-linux1804-64/debug-mochitest-plain-e10s
-test-linux1804-64/debug-mochitest-plain-gpu-e10s
-test-linux1804-64/debug-mochitest-remote-e10s
-test-linux1804-64/debug-mochitest-webgl1-core-e10s
-test-linux1804-64/debug-mochitest-webgl1-core-gli-e10s
-test-linux1804-64/debug-mochitest-webgl1-ext-e10s
-test-linux1804-64/debug-mochitest-webgl1-ext-gli-e10s
-test-linux1804-64/debug-mochitest-webgl2-core-e10s
-test-linux1804-64/debug-mochitest-webgl2-core-gli-e10s
-test-linux1804-64/debug-mochitest-webgl2-ext-e10s
-test-linux1804-64/debug-mochitest-webgl2-ext-gli-e10s
-test-linux1804-64/debug-xpcshell-e10s
-test-linux1804-64/debug-xpcshell-spi-nw-e10s

mozilla-release

--- target_task_set@6d262ed
+++ target_task_set@ao_ci_linux_tsan
+test-linux1804-64-asan-qr/opt-mochitest-plain-e10s
+test-linux1804-64-asan-qr/opt-mochitest-plain-gpu-e10s
-test-linux1804-64-asan/opt-cppunit-1proc
-test-linux1804-64-asan/opt-firefox-ui-functional-local-e10s
-test-linux1804-64-asan/opt-firefox-ui-functional-remote-e10s
-test-linux1804-64-asan/opt-gtest-1proc
-test-linux1804-64-asan/opt-jsreftest-e10s
-test-linux1804-64-asan/opt-marionette-e10s
-test-linux1804-64-asan/opt-mochitest-a11y-1proc
-test-linux1804-64-asan/opt-mochitest-chrome-1proc
-test-linux1804-64-asan/opt-mochitest-chrome-gpu-e10s
-test-linux1804-64-asan/opt-mochitest-plain-e10s
-test-linux1804-64-asan/opt-mochitest-plain-gpu-e10s
-test-linux1804-64-asan/opt-mochitest-remote-e10s
-test-linux1804-64-asan/opt-mochitest-webgl1-core-e10s
-test-linux1804-64-asan/opt-mochitest-webgl1-ext-e10s
-test-linux1804-64-asan/opt-mochitest-webgl1-ext-fis-gli-e10s
-test-linux1804-64-asan/opt-mochitest-webgl2-core-e10s
-test-linux1804-64-asan/opt-mochitest-webgl2-ext-e10s
-test-linux1804-64-asan/opt-mochitest-webgl2-ext-fis-e10s
-test-linux1804-64-asan/opt-mochitest-webgl2-ext-fis-gli-e10s
-test-linux1804-64-asan/opt-xpcshell-e10s
+test-linux1804-64-shippable-qr/opt-marionette-headless-e10s
-test-linux1804-64-shippable/opt-awsy-base-e10s
-test-linux1804-64-shippable/opt-awsy-e10s
-test-linux1804-64-shippable/opt-awsy-tp6-e10s
-test-linux1804-64-shippable/opt-cppunit-1proc
-test-linux1804-64-shippable/opt-firefox-ui-functional-local-e10s
-test-linux1804-64-shippable/opt-firefox-ui-functional-remote-e10s
-test-linux1804-64-shippable/opt-gtest-1proc
-test-linux1804-64-shippable/opt-jsreftest-e10s
-test-linux1804-64-shippable/opt-marionette-e10s
-test-linux1804-64-shippable/opt-marionette-headless-e10s
-test-linux1804-64-shippable/opt-mochitest-a11y-1proc
-test-linux1804-64-shippable/opt-mochitest-chrome-1proc
-test-linux1804-64-shippable/opt-mochitest-chrome-gpu-e10s
-test-linux1804-64-shippable/opt-mochitest-plain-e10s
-test-linux1804-64-shippable/opt-mochitest-plain-gpu-e10s
-test-linux1804-64-shippable/opt-mochitest-remote-e10s
-test-linux1804-64-shippable/opt-mochitest-webgl1-core-e10s
-test-linux1804-64-shippable/opt-mochitest-webgl1-ext-e10s
-test-linux1804-64-shippable/opt-mochitest-webgl2-core-e10s
-test-linux1804-64-shippable/opt-mochitest-webgl2-ext-e10s
-test-linux1804-64-shippable/opt-xpcshell-e10s
-test-linux1804-64/debug-cppunit-1proc
-test-linux1804-64/debug-firefox-ui-functional-local-e10s
-test-linux1804-64/debug-firefox-ui-functional-remote-e10s
-test-linux1804-64/debug-gtest-1proc
-test-linux1804-64/debug-jsreftest-e10s
-test-linux1804-64/debug-marionette-e10s
-test-linux1804-64/debug-mochitest-a11y-1proc
-test-linux1804-64/debug-mochitest-chrome-1proc
-test-linux1804-64/debug-mochitest-chrome-gpu-e10s
-test-linux1804-64/debug-mochitest-plain-e10s
-test-linux1804-64/debug-mochitest-plain-gpu-e10s
-test-linux1804-64/debug-mochitest-remote-e10s
-test-linux1804-64/debug-mochitest-webgl1-core-e10s
-test-linux1804-64/debug-mochitest-webgl1-ext-e10s
-test-linux1804-64/debug-mochitest-webgl2-core-e10s
-test-linux1804-64/debug-mochitest-webgl2-ext-e10s
-test-linux1804-64/debug-xpcshell-e10s
-test-linux1804-64/debug-xpcshell-spi-nw-e10s

Differential Revision: https://phabricator.services.mozilla.com/D121212
2021-07-30 12:23:37 +00:00
Zibi Braniecki 61e69628d6 Bug 1672317 - [l10nfilesource] part5: Migrate tests to use L10nFileSource. r=platform-i18n-reviewers,gregtatum
Depends on D105391

Differential Revision: https://phabricator.services.mozilla.com/D103259
2021-07-29 21:30:26 +00:00
Noemi Erli 9009ea58e0 Backed out 9 changesets (bug 1672317) for causing toolchain bustages
Backed out changeset c7d16d1bbf56 (bug 1672317)
Backed out changeset 8367ff19d3ba (bug 1672317)
Backed out changeset cce54c20ec3c (bug 1672317)
Backed out changeset a5d67460e7bb (bug 1672317)
Backed out changeset b78f3e332d57 (bug 1672317)
Backed out changeset 3e84f9a521f4 (bug 1672317)
Backed out changeset 1aaa22cf7c13 (bug 1672317)
Backed out changeset d850981cf33c (bug 1672317)
Backed out changeset 944805ef4561 (bug 1672317)
2021-07-30 00:19:40 +03:00
Zibi Braniecki 792cf026d4 Bug 1672317 - [l10nfilesource] part5: Migrate tests to use L10nFileSource. r=platform-i18n-reviewers,gregtatum
Depends on D105391

Differential Revision: https://phabricator.services.mozilla.com/D103259
2021-07-29 17:31:53 +00:00
Florin Strugariu 4b52d8e894 Bug 1721599 - [mozproxy] Drop mitm4 after migrating to mitm5 finished r=perftest-reviewers,AlexandruIonescu
Differential Revision: https://phabricator.services.mozilla.com/D120468
2021-07-29 12:07:17 +00:00
Kimberly Sereduck 38a95bdd75 Bug 1722282: [perfdocs] Validate URLs before formatting;r=perftest-reviewers,AlexandruIonescu
Differential Revision: https://phabricator.services.mozilla.com/D121079
2021-07-29 09:55:13 +00:00
Christoph Kerschbaumer 4a6250387f Bug 1719272: Annotate failing browser/ tests to potentially enable https-first mode in Nightly r=webcompat-reviewers,denschub,webdriver-reviewers,preferences-reviewers,Gijs,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D119177
2021-07-28 19:16:16 +00:00
Sandor Molnar 68cdec0548 Backed out changeset 7eb8945dd8e3 (bug 1719272) for causing bustages in gecko decision task. CLOSED TREE 2021-07-28 19:47:06 +03:00
Christoph Kerschbaumer bb716f0701 Bug 1719272: Annotate failing browser/ tests to potentially enable https-first mode in Nightly r=webcompat-reviewers,denschub,webdriver-reviewers,preferences-reviewers,Gijs,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D119177
2021-07-28 16:08:07 +00:00
Gijs Kruitbosch 6fce85b1ba Bug 1708462 - add warning level linter for OS.File use, r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D120684
2021-07-28 15:15:03 +00:00
Mark Banner 64df328393 Bug 1722691 - Allow hooks to report the count of ESLint warnings as well as errors. r=marco
Differential Revision: https://phabricator.services.mozilla.com/D121076
2021-07-28 11:30:29 +00:00
Julien Wajsberg d23918ae85 Bug 1717047 - [profiler, netwerk] Support all redirections in the parent process r=canaltinova,necko-reviewers,dragana
This moves the adding of the end marker for redirects in nsHttpChannel
to SetupReplacementChannel, so that all redirects are properly caught.
Without that, some requests will show as unfinished in the profiler
frontend.

Some of the redirects are internal and we may be able to flag and ignore
them in the frontend, but that's work for the future.

Because all redirections get a "REDIRECT" end marker, including the
internal redirection to the service worker's intercepted channel, we now
need an additional "START" marker there as well.

All existing profiler tests related to service workers needed to be
updated because there's an extra redirect marker in all these requests,
as well as several pairs of markers that all have the same id.

This also adds a new profiler test for handling the http->https case
that we wouldn't catch before this patch.

Differential Revision: https://phabricator.services.mozilla.com/D118836
2021-07-27 15:12:53 +00:00
Nika Layzell 0e37500335 Bug 1719577 - Part 2: Create mMonitor eagerly in MessageChannel's constructor, r=handyman
Now that PortLink is the only MessageLink implementation, it is no longer
necessary to support sharing a single `RefCountedMonitor` between multiple
MessageChannels, meaning that we can construct the monitor directly in the
`MessageChannel` constructor. The monitor still needs to be refcounted due to
being used by the PortLink as part of the listener implementation.

Differential Revision: https://phabricator.services.mozilla.com/D119350
2021-07-23 19:14:56 +00:00
Kimberly Sereduck dd30ab73f1 Bug 1718124: Add documentation for Raptor benchmark and scenario tests;r=perftest-reviewers,AlexandruIonescu
Differential Revision: https://phabricator.services.mozilla.com/D118750
2021-07-23 09:51:05 +00:00
Julian Descottes 322abbb543 Bug 1721787 - [devtools] devtools try presets are no longer running linux jobs r=ochameau
Depends on D120580

Differential Revision: https://phabricator.services.mozilla.com/D120587
2021-07-23 09:22:46 +00:00
Julian Descottes add15451cf Bug 1721780 - [devtools] devtools try preset is no longer running windows jobs r=nchevobbe
The only platforms available for devtools chrome & browser mochitests are now:
- shippable
- asan
- qr

Only qr covers debug/opt/fission, so let's use this.

Differential Revision: https://phabricator.services.mozilla.com/D120580
2021-07-22 10:28:38 +00:00
Gerald Squelart e7e9ae90ae Bug 1721110 - profiler_current_thread_id() now returns ProfilerThreadId - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D120225
2021-07-21 04:16:59 +00:00
Gerald Squelart 7bc3116790 Bug 1721110 - baseprofiler::profiler_current_thread_id() now returns BaseProfilerThreadId - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D120224
2021-07-21 04:16:59 +00:00
Gerald Squelart 0e7895310f Bug 1721110 - profiler_current_process_id() now returns ProfilerProcessId - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D120223
2021-07-21 04:16:58 +00:00
Gerald Squelart 72f0855bfa Bug 1721110 - Introduce BaseProfilerProcessId and BaseProfilerThreadId - r=florian
These classes should replace the `int` type that is currently used to store process and thread ids. The next patches will start using them. Advantages:
- Prevent type mismatches, e.g., giving a process id (or other number) to a function expecting a thread id.
- Prevent nonsensical arithmetic operations.
- Make the unspecified id more abstract, so it's more obvious and portable.
- Make conversions to/from numbers (for display or storage) more visible.
- Allow future changes of APIs using them less risky.
- Allow future changes of the ids themselves (e.g., to be able to use bigger underlying types on some platforms, or even the opaque std:🧵:id type.)

Differential Revision: https://phabricator.services.mozilla.com/D120221
2021-07-21 04:16:57 +00:00
Gerald Squelart a966352bcd Bug 1721110 - {,Base}ProfilerUtils.h with process&thread functions taken from {,Base}ProfilerState.h - r=florian
This new header isolates the process and thread functions that should be available in all builds, and in most other profiler headers.
Non-MOZ_GECKO_PROFILER implementations return ids 0 (unspecified process/thread). `profiler_is_main_thread()` returns false, it's arbitrary but consistent with `0` (it makes little sense to use it there anyway.)

Differential Revision: https://phabricator.services.mozilla.com/D120220
2021-07-21 04:16:57 +00:00
Gerald Squelart 171c2eed5f Bug 1721110 - {,Base}ProfilerState.h improvements: Sprinkle nodiscard's and more - r=florian
The next patch will extract parts of these headers into a separate file, so it's best to do this clean-up now, to best preserve history.
- Add [[nodiscard]] to all functions that return something. (There are no cases where that returned value could really be ignored.)
- Hide scProfilerMainThreadId in a "detail" namespace, to emphasize that it's an implementation detail that the user shouldn't access directly.
- Combine tightly-nested namespaces start/end into single lines, it's more readable.

Differential Revision: https://phabricator.services.mozilla.com/D120219
2021-07-21 04:16:56 +00:00
Gerald Squelart 02a156fe92 Bug 1720846 - Fix non-unified build by adding missing #includes - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D120301
2021-07-20 09:31:17 +00:00
Kajal Sah 2bf658dd41 Bug 1718713 - Creates dummy custom element in new screenshot. r=emalysz
Differential Revision: https://phabricator.services.mozilla.com/D119209
2021-07-19 16:47:34 +00:00
Alex Lopez 77ce415604 Bug 1696251 - Replace self with command_context where possible in existing mach commands. r=mhentges,webdriver-reviewers,perftest-reviewers,whimboo
This step removes all the dependencies of mach commands to
having a MachCommandBase as the `self` by using the `command_context`
argument instead. This also removes any remaining statefulness from those
classes that implement mach commands, ultimately making it easier to move
existing commands out of classes in a follow-up.

Differential Revision: https://phabricator.services.mozilla.com/D118058
2021-07-19 16:04:25 +00:00
surajeet310 407f1ae5ac Bug 1717651 - Removed instances of 'ensure_subprocess_env' from tools/lint/eslint r=mhentges
Since Python 2 is no longer used in tools/lint/eslint,hence 'ensure_subprocess_env' is obsolete.

Differential Revision: https://phabricator.services.mozilla.com/D119917
2021-07-16 21:06:25 +00:00
Sylvestre Ledru ef018c2533 Bug 1720922 - Update sphinx 4.1.1 and its dependencies r=firefox-build-system-reviewers,mhentges
Depends on D120087

Differential Revision: https://phabricator.services.mozilla.com/D120088
2021-07-16 17:38:43 +00:00
Butkovits Atila a07f790e42 Backed out changeset e1921c5112d8 (bug 1696251) for causing bustages complaining about 'CommandContext'. CLOSED TREE 2021-07-16 20:35:55 +03:00
Butkovits Atila 9cd21f6f85 Backed out changeset d1f54e2176d1 (bug 1718124) for causing lint failures at perfdocs/config.yml. CLOSED TREE 2021-07-16 20:17:56 +03:00
Kimberly Sereduck 56e729107d Bug 1718124: Add documentation for Raptor benchmark and scenario tests;r=perftest-reviewers,AlexandruIonescu
Differential Revision: https://phabricator.services.mozilla.com/D118750
2021-07-16 16:56:50 +00:00
Alex Lopez 190e03aaab Bug 1696251 - Replace self with command_context where possible in existing mach commands. r=mhentges,webdriver-reviewers,perftest-reviewers,whimboo
This step removes all the dependencies of mach commands to
having a MachCommandBase as the `self` by using the `command_context`
argument instead. This also removes any remaining statefulness from those
classes that implement mach commands, ultimately making it easier to move
existing commands out of classes in a follow-up.

Differential Revision: https://phabricator.services.mozilla.com/D118058
2021-07-16 15:51:29 +00:00
Florian Quèze 4593f874da Bug 1720853 - Move profiler_add_*_marker functions out of the public GeckoProfiler.h header, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D120066
2021-07-16 15:26:23 +00:00
Florian Quèze 4f4eb91a27 Bug 1720851 - fix includes in NetworkMarker.cpp, r=gerald,necko-reviewers,kershaw.
Differential Revision: https://phabricator.services.mozilla.com/D120062
2021-07-16 15:26:23 +00:00
Florian Quèze 292c1a1f60 Bug 1720368 - Remove MOZ_GECKO_PROFILER ifdefs around profiler_init and profiler_shutdown calls, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D119809
2021-07-15 22:04:23 +00:00
Florian Quèze 57d1e300f5 Bug 1720362 - Remove the last MOZ_GECKO_PROFILER ifdefs in ipc code, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D119801
2021-07-15 22:04:22 +00:00
Florian Quèze c4c51c4002 Bug 1720358 - Make AutoProfilerLabel available even when MOZ_GECKO_PROFILER is not defined, and remove ifdefs, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D119795
2021-07-15 22:04:22 +00:00
Florian Quèze 4f6e64dec4 Bug 1720289 - remove MOZ_GECKO_PROFILER ifdefs around network markers, r=necko-reviewers,gerald,kershaw.
Differential Revision: https://phabricator.services.mozilla.com/D119740
2021-07-15 22:04:21 +00:00
surajeet310 cb818a9aa9 Bug 1717651 - Removed instances of 'ensure_subprocess_env' from tools/tryselect/selectors r=mhentges
'ensure_subprocess_env' is obsolete now as Python 2 is no longer used in tools/tryselect/selectors .

Differential Revision: https://phabricator.services.mozilla.com/D119979
2021-07-15 21:40:50 +00:00
Tom Ritter 1b9b6b72db Bug 1666222: Cut over a ton of NowUnfuzzed calls -> Now 4/5 r=smaug,extension-reviewers,zombie
With Fuzzyfox removed, Now() does what NowUnfuzzed() did.

Differential Revision: https://phabricator.services.mozilla.com/D119639
2021-07-14 18:18:17 +00:00
Gerald Squelart 9b0d666eda Bug 1719240 - Rework PSMutex into PSAutoLock - r=canaltinova
This prevents unwanted direct access to the mutex, and removes duplicated code.

And make the Base Profiler mutex&lock consistent.

Differential Revision: https://phabricator.services.mozilla.com/D119147
2021-07-13 12:20:49 +00:00
Gerald Squelart 2323e31002 Bug 1719240 - Use BaseProfilerMutex and Lock for state-change APIs - r=canaltinova
PSMutex/Autolock are reserved for the main profiler mutex (which will change in the next patch.)

Differential Revision: https://phabricator.services.mozilla.com/D119146
2021-07-13 12:20:49 +00:00
Tooru Fujisawa cc92ef732d Bug 1708448 - Move property and element functions into js/public/PropertyAndElement.h. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D119619
2021-07-13 11:52:42 +00:00
Andi-Bogdan Postelnicu 90ec98c524 Bug 1719812 - Upgrade llvm toolchain to 12.0.1. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D119493
2021-07-12 13:44:32 +00:00
Steve Fink 09c0d66bcc Bug 1718819 - Export gBreakpadEnabled symbol to fix minidump suppression mechanism. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D119467
2021-07-10 14:17:31 +00:00
Gerald Squelart bc59d71b79 Bug 1719670 - Clear running times when starting a profile, to avoid a big CPU value when restarting the profiler - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D119411
2021-07-09 11:21:25 +00:00
Sandor Molnar d8c88ba66a Backed out changeset 932f7478dc2a (bug 1717047) for causing bug 1719684. CLOSED TREE 2021-07-08 19:41:24 +03:00
Florian Quèze df151e59a2 Bug 1719218 - Remove the need for MOZ_GECKO_PROFILER ifdefs in code using ChildProfilerController, r=gerald,necko-reviewers,dragana.
Differential Revision: https://phabricator.services.mozilla.com/D119132
2021-07-08 16:20:10 +00:00
Florian Quèze 673e38408d Bug 1719218 - Build ProfilerParent even when MOZ_GECKO_PROFILER is not defined, r=gerald,necko-reviewers,nika,dragana.
Differential Revision: https://phabricator.services.mozilla.com/D119131
2021-07-08 16:20:08 +00:00
Michael Froman bbce1490f9 Bug 1719491 - revert clang-format of tools/profiler/public/GeckoTraceEvent.h. r=ng
Bug 1714577 meant to exclude tools/profiler/public/GeckoTraceEvent.h from
clang-format, but the trailing comment in .clang-format-ignored broke that.
Bug 1519636 then formatted the file.

This fixes the exclusion in .clang-format-ignore and backs out the
clang-format on tools/profiler/public/GeckoTraceEvent.h.

Differential Revision: https://phabricator.services.mozilla.com/D119297
2021-07-07 15:57:17 +00:00
Julien Wajsberg e2636f5dd9 Bug 1717047 - [profiler, netwerk] Support all redirections in the parent process r=canaltinova,necko-reviewers,dragana
This moves the adding of the end marker for redirects in nsHttpChannel
to SetupReplacementChannel, so that all redirects are properly caught.
Without that, some requests will show as unfinished in the profiler
frontend.

Some of the redirects are internal and we may be able to flag and ignore
them in the frontend, but that's work for the future.

Because all redirections get a "REDIRECT" end marker, including the
internal redirection to the service worker's intercepted channel, we now
need an additional "START" marker there as well.

All existing profiler tests related to service workers needed to be
updated because there's an extra redirect marker in all these requests,
as well as several pairs of markers that all have the same id.

This also adds a new profiler test for handling the http->https case
that we wouldn't catch before this patch.

Differential Revision: https://phabricator.services.mozilla.com/D118836
2021-07-07 14:09:47 +00:00
Aaron Klotz b1e6df55c3 Bug 1715650: Add linter for detecting COM initialization; r=linter-reviewers,andi
This patch adds a new linter that will error when new code mentions any one of
the following strings:

* `CoInitialize`;
* `CoInitializeEx`;
* `OleInitialize`;
* `RoInitialize`;
* `CoUninitialize`;
* `OleUninitialize`; and
* `RoUninitialize`.

Since I don't care about context, and just want to flag code containing these
names, I opted for a `regex` linter.

Yes, the regex does match a few strings beyond the above list (in particular, it
also matches additional strings that end with an `Ex` suffix), but since
functions with those names don't exist anyway (and would be errors in their own
right), I am not concerned about it.

All existing occurrences have been added to the exclusion list, with the
intent of removing most of them over time.

Differential Revision: https://phabricator.services.mozilla.com/D119129
2021-07-06 14:05:42 +00:00
Gabriele Svelto 2c9bfe697b Bug 1717909 - Fetch only one file at a time from Microsoft's symbol servers; r=marco,calixte
Differential Revision: https://phabricator.services.mozilla.com/D118837
2021-06-26 06:37:29 +00:00
Florian Quèze 19046b7c39 Bug 1718019 - Skip the entire folders of profiler tests when MOZ_GECKO_PROFILER is not defined instead of returning early in each test, r=julienw
Differential Revision: https://phabricator.services.mozilla.com/D118690
2021-06-25 22:11:25 +00:00
Florian Quèze c87b4eb7b7 Bug 1717991 - Profiler headers should declare all the marker related functions even when MOZ_GECKO_PROFILER is not defined, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D118679
2021-06-25 13:28:01 +00:00
Gerald Squelart 26512bc218 Bug 1716712 - Use JIT information in DoFramePointerBacktrace on x64 - r=canaltinova
This is similar to what DoMozStackWalkBacktrace does, by looking where the stack walker stopped, and if it can be restarted at a calling C++-to-JIT entry frame.

Note: The code is pretty much a modified copy, but factoring out the common parts would be difficult because of the specific local variables, the different stack-walking functions, and the different register storages.

Also, instead of mentioning the OS (was only Windows), the choice of platform support is now based on the actual Profiler stack walkers that are used.

Differential Revision: https://phabricator.services.mozilla.com/D118109
2021-06-25 09:48:25 +00:00
Gerald Squelart d5629753f3 Bug 1716274 - profiler_add/remove_state_change_callback - r=canaltinova
Callbacks can be registered to be called at specific profiler state changes.
This may be useful to make sure some markers are recorded at the end of the profile time range, if some information would be useful to always have available (and it doesn't fit in meta-information or elsewhere).

Differential Revision: https://phabricator.services.mozilla.com/D118128
2021-06-24 07:25:55 +00:00
Alexis Beingessner cbc6c14a6c Bug 1717002 - document how to download tsan toolchains. r=andi DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D118612
2021-06-23 17:08:00 +00:00
Julien Wajsberg 693009ee54 Bug 1717414 - [profiler, netwerk] Report the new channel id in redirect network markers r=necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D118468
2021-06-23 16:03:50 +00:00
Julien Wajsberg 3dcc5b5fe6 Bug 1717414 - [profiler] Add a new property to network markers to report the new channel id for redirection processes r=gerald
Then this will make it possible in the UI to relate the redirected
request with its redirection.

With this patch a debug build of Firefox will crash when a redirection
happens, but the next patch will fix this.

Differential Revision: https://phabricator.services.mozilla.com/D118467
2021-06-23 16:03:49 +00:00
Andrew Halberstadt 82e328843f Bug 1717427 - [tryselect] Use 'raise_for_status' when downloading estimates data, r=mhentges
These requests had except blocks to catch all requests exceptions. But because
we weren't calling 'raise_for_status', exceptions were never raised, resulting
in bizarre error tracebacks later on.

Depends on D118356

Differential Revision: https://phabricator.services.mozilla.com/D118357
2021-06-22 20:54:19 +00:00
Andrew Halberstadt 6aec441fb8 Bug 1717427 - [tryselect] Don't allow 'display_estimates' to fail the whole |mach try| run, r=mhentges
A failure displaying estimates should never cause the try push to fail, as it
is entirely optional. This adds a blanket except to catch any exception that
was mishandled inside the estimates submodule.

It still displays a traceback as any failures displayed here should still
legitimately be fixed or have smoother error handling.

Differential Revision: https://phabricator.services.mozilla.com/D118356
2021-06-22 20:54:19 +00:00
Andrew Halberstadt d3508233ee Bug 1717691 - [tryselect] Ensure we re-compute the cache key for target_task_set after '--full', r=mhentges
When a user runs 'mach try --full', we continue computing the target task set
and cache it anyway (since we were already almost there and starting over in
the event they re-run without '--full' is very expensive.

However, when implementing the 'cache_key' function in bug 1714178, I forgot to
recompute the key in this case, causing the contents of 'target_task_set' to
overwrite the 'full_task_set' cache.

This also includes a minor improvement to re-use the 'full_task_set' cache
regardless of 'disable_target_task_filter', as that flag has zero bearing on
the full task graph. This should result in fewer cache misses when using
--full.

Differential Revision: https://phabricator.services.mozilla.com/D118531
2021-06-22 20:53:08 +00:00
Sylvestre Ledru 68ef92902d Bug 1717447 - mozlint/spell: update to version 2.1.0 r=linter-reviewers,marco DONTBUILD
Depends on D118294

Differential Revision: https://phabricator.services.mozilla.com/D118292
2021-06-21 15:29:11 +00:00
Sylvestre Ledru b8c513cc04 Bug 1717447 - mozlint/spell: don't run on tools/lint/cpp/mingw-headers.txt r=linter-reviewers,marco DONTBUILD
Depends on D118291

Differential Revision: https://phabricator.services.mozilla.com/D118293
2021-06-21 15:29:10 +00:00
Sylvestre Ledru 1e5ffa4271 Bug 1717447 - mozlint/spell: add a .in file r=linter-reviewers,marco DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D118291
2021-06-21 15:29:10 +00:00
Gerald Squelart c83e6a0508 Bug 1715922 - Windows timer resolution is enhanced by default, except if notimerresolutionchange feature is set - r=canaltinova
This reverses bug 1703410: By default the profiler now changes the timer resolution (normally 64Hz) when the requested sampling interval is lower than 10ms, to allow fast-enough sampling for most uses.

But since this can influence other timers in Firefox, it makes debugging some types of issues more difficult. To help with this, there is now a "No Timer Resolution change" on Windows, which prevents the profiler from changing the timer resolution, at a risk of slowing down sampling in some processes.

Differential Revision: https://phabricator.services.mozilla.com/D117626
2021-06-21 11:48:23 +00:00
Julien Wajsberg 496ff071fa Bug 1715321 - [profiler, netwerk] Report the type of redirection in network markers r=necko-reviewers,gerald,valentin
The profiler UI part has been landed in
https://github.com/firefox-devtools/profiler/pull/3350 and
https://github.com/firefox-devtools/profiler/pull/3392.

Differential Revision: https://phabricator.services.mozilla.com/D117682
2021-06-21 07:37:56 +00:00
Julien Wajsberg 8bf76f9496 Bug 1715321 - [profiler] Add a parameter to profiler_add_network_marker to capture the type of redirect r=gerald
This commit also implements the changes to the marker streaming operation so
that this information is properly propagated to the frontend.

See https://github.com/firefox-devtools/profiler/pull/3350 and
https://github.com/firefox-devtools/profiler/pull/3392 for the
Firefox UI part.

Note that in debug builds, the new assertions will crash the browser,
until the following commit that uses this new parameter.

Differential Revision: https://phabricator.services.mozilla.com/D117681
2021-06-21 07:37:55 +00:00
Julien Wajsberg 05eb7b5041 Bug 1715321 - [profiler, netwerk] Reorder some parameters of profiler_add_network_marker r=necko-reviewers,gerald,valentin
This moves optional redirect-related parameters to the end, so that it's
easier to use in non-redirect cases.

Differential Revision: https://phabricator.services.mozilla.com/D117680
2021-06-21 07:37:55 +00:00
Julien Wajsberg a4e5a88354 Bug 1715321 - [profiler] Rework the existing test for redirections r=canaltinova
Now the test will warn when more properties than expected are received.
This way we won't forget to update the tests when we add more, but we
also assert that some properties are absent in some cases, as expected.

The test has been also changed a lot to pass in verify mode. To make
this easier we disable the HTTP cache.

Differential Revision: https://phabricator.services.mozilla.com/D117679
2021-06-21 07:27:17 +00:00
Aki Sasaki 5b64d5df25 Bug 1659691 - Update cross-channel algorithm to not replay history. r=firefox-build-system-reviewers,releng-reviewers,bhearsum,mhentges
(Tl;dr: The original author of this patch was axel@mozilla.com (:pike).
This patch has been modified to run in production automation.)

Cross-channel takes all the en-US strings from the shipping train branches
and consolidates them into a single repository. Originally, this ran out of
https://hg.mozilla.org/users/axel_mozilla.com/cross-channel-experimental/ .
The original version was coupled tightly with specific hg internals, making
hg upgrades fragile. Axel wrote
https://bug1659691.bmoattachments.org/attachment.cgi?id=9170636 before
handing off project ownership; this is the original patch to stop replaying
history to simplify the logic.

This patch also automates the previously manual preparation steps, allows
for running both in automation and locally, and adds retries for production
robustness.

Differential Revision: https://phabricator.services.mozilla.com/D116537
2021-06-17 18:52:58 +00:00
Gregory Mierzwinski 6ab48776f3 Bug 1716598 - Use Unix line endings when generating perfdocs. r=perftest-reviewers,Bebe
This patch forces perfdocs to produce unix line endings rather than os-specific line endings. This fixes an issue where generating the docs on windows causes all the docs to change because of the line endings.

Differential Revision: https://phabricator.services.mozilla.com/D117919
2021-06-17 13:26:37 +00:00
Andi-Bogdan Postelnicu f07c975367 Bug 1519636 - Reformat recent changes to the Google coding style. r=necko-reviewers,emilio
Updated with clang-format version 12.0.0 (taskcluster-FZRqPXamQIOU_i4hF0cAcg)

Differential Revision: https://phabricator.services.mozilla.com/D117905
2021-06-17 11:00:22 +00:00
Florian Quèze dfeb53e219 Bug 1715257 - Remove Task Tracer code from the profiler, r=gerald,necko-reviewers.
Differential Revision: https://phabricator.services.mozilla.com/D117996
2021-06-17 09:33:00 +00:00
Mark Banner 28abf1cb81 Bug 1515695 - Remove Task.jsm. r=florian,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D118001
2021-06-17 08:28:02 +00:00
Iulian Moraru b02492de66 Backed out changeset 617a466d0cce (bug 1715257) for causing build bustages. CLOSED TREE 2021-06-17 10:58:16 +03:00
Florian Quèze 7b4906a6bd Bug 1715257 - Remove Task Tracer code from the profiler, r=gerald,necko-reviewers.
Differential Revision: https://phabricator.services.mozilla.com/D117996
2021-06-17 06:12:10 +00:00
Andrew Halberstadt f9c69a3a90 Bug 1714178 - Don't hardcode the project to 'autoland/central' in 'try_select_tasks', r=taskgraph-reviewers,aki
The two 'target_tasks_try_select' target task methods use a hardcoded
"autoland" | "mozilla-central" as the project. This means that you get the set
of tasks for autoland/central even if you e.g, update to beta and pass in
'./mach try fuzzy --parameters project=mozilla-beta'.

This patch ensures we use the proper target tasks method if passing in
non-default parameters. It also fixes the caching to account for this
new project.

Differential Revision: https://phabricator.services.mozilla.com/D117941
2021-06-16 15:53:51 +00:00
Francesco Lodolo (:flod) 2395c9bd16 Bug 1716551 - Improve Fluent linter behavior with single and double quotes, r=dminor
- Don't throw when a placeable is enclosed in double straight quotes
- Catch single quotes used as genitive on plural nouns

Differential Revision: https://phabricator.services.mozilla.com/D117898
2021-06-16 15:11:55 +00:00
Kershaw Chang 0c9e5842a2 Bug 1713796 - P1: Move nsHostRecord to another file, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D117322
2021-06-16 08:14:10 +00:00
Francesco Lodolo (:flod) b2088f67e4 Bug 1716512 - Fluent linter: account for terms when allowing group comments, r=dminor
Differential Revision: https://phabricator.services.mozilla.com/D117739
2021-06-15 11:28:51 +00:00
Dan Mosedale 7a2de0bfe5 Bug 1716257 - make `mach npm` use the same version of node, r=mhentges
Differential Revision: https://phabricator.services.mozilla.com/D117612
2021-06-14 19:21:47 +00:00
Mitchell Hentges e389cc4cc4 Bug 1714684: Remove usages of vendored "mock" library r=perftest-reviewers,ahal,sparky
Python 3 has access to `unittest.mock` in the standard library.

Differential Revision: https://phabricator.services.mozilla.com/D117073
2021-06-14 15:34:46 +00:00
Andrew Halberstadt 225e877c2b Bug 1696531: fix dmd.py and related tools to support python 3, r=bhearsum
Depends on D109729

Differential Revision: https://phabricator.services.mozilla.com/D109731
2021-06-14 15:31:42 +00:00
Myeongjun Go c322da5c7c Bug 1714122 - [perfdocs] Add the run-on-projects settings to the perfdocs test task list r=sparky,perftest-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D116941
2021-06-14 15:14:05 +00:00
Julian Descottes e21ba61a3d Bug 1715969 - [devtools] Remove debugger-tests try preset r=bomsy
Depends on D117524

This preset is redundant with the main devtools preset and not maintained

Differential Revision: https://phabricator.services.mozilla.com/D117530
2021-06-11 12:55:32 +00:00
Julian Descottes abc180d3a7 Bug 1715969 - [devtools] Fix devtools try preset to include macos jobs r=bomsy
macos jobs moved from macosx1014 to macosx1015. Use a more generic string to match osx jobs

Differential Revision: https://phabricator.services.mozilla.com/D117524
2021-06-11 12:55:31 +00:00
Gerald Squelart c953f2a74f Bug 1715844 - Fixed non-MOZ_GECKO_PROFILER build of MicroGeckoProfiler - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D117493
2021-06-11 08:43:42 +00:00
surajeet310 4ee25b07d1 Bug 1714788 - Fixed more Sphinx warnings in 'mach doc' r=sylvestre DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D117225
2021-06-09 20:27:09 +00:00
championshuttler 1f56db85d5 Bug 1715612 - Attempt to migrate try select to py3.r=mhentges
Differential Revision: https://phabricator.services.mozilla.com/D117276
2021-06-09 20:01:22 +00:00
Mitchell Hentges e568fa2e0d Bug 1714641: Remove usages of vendored "backports" code r=ahal,perftest-reviewers
It provides `shutil.which(...)`, which has been part of `shutil` since
Python 3.3.

Differential Revision: https://phabricator.services.mozilla.com/D117063
2021-06-09 15:48:52 +00:00
Mitchell Hentges 70806e17b5 Bug 1714641: Remove usages of vendored "wptserve_py2" library r=jgraham,ahal
We should only be using the Python3 "wptserve" library at this point.

Differential Revision: https://phabricator.services.mozilla.com/D117062
2021-06-09 15:48:51 +00:00
Paul Adenot d3bcddf02f Bug 1714577 - Part 8 - Modify GeckoTraceEvent.h to use the micro gecko profiler API. r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D116845
2021-06-09 15:43:40 +00:00
Paul Adenot 34cc5a6b14 Bug 1714577 - Part 7 - Add a function to insert a very simple profiler marker in the micro gecko profiler. r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D116844
2021-06-09 15:43:39 +00:00
Paul Adenot 3a215ce0dc Bug 1714577 - Part 6 - Copy WebRTC's trace_event.h to Gecko, verbatim, and redirect the original trace_event.h to it. r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D116843
2021-06-09 15:43:39 +00:00
Paul Adenot 2c501af5db Bug 1714577 - Part 2 - Introduction of the micro gecko profiler API. r=gerald
This allows using the Gecko Profiler without pulling in half of Gecko (nsTArray,
nsString, etc.). This is for use in third party code, that we lightly patch to
register the threads.

Differential Revision: https://phabricator.services.mozilla.com/D116839
2021-06-09 15:43:37 +00:00
Tim Giles 0180e3b96d Bug 1686071 - Add PasswordRulesParser module. r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D114110
2021-06-09 13:54:09 +00:00
Nazım Can Altınova 5bcc4d95af Bug 1690624 - Add profiler rust API for thread registration/unregistration r=gerald,emilio
Differential Revision: https://phabricator.services.mozilla.com/D116515
2021-06-09 11:22:55 +00:00