Commit Graph

8971 Commits

Author SHA1 Message Date
Nicolas Chevobbe
4faad2f0f5 Bug 1712739 - [devtools] Fold custom WebConsoleFront#evaluateJSAsync method into scriptCommand#execute. r=ochameau.
Tests that were using `evaluateJSAsync` are updated, either by using the new command,
or by awaiting for the `evaluationResult` event.
A couple chrome tests were moved to devtools/shared/commands/js/tests/ and turned
into browser tests, and some of them were completely removed as we tested the
features in mochitests as well.

Differential Revision: https://phabricator.services.mozilla.com/D116248
2021-06-02 13:15:06 +00:00
Gerald Squelart
5bafbe8d3a Bug 1710015 - Prevent re-instantiation of ProfilerParentTracker past XPCOMShutdownThreads - r=canaltinova
Note that we can still use an existing ProfilerParentTracker instance after XPCOMShutdownThreads started (it's necessary, so that e.g., its list can be properly updated when ProfilerParents get destroyed), we just refuse to create a new one past that point.

Differential Revision: https://phabricator.services.mozilla.com/D114709
2021-06-01 01:01:05 +00:00
Nick Alexander
a8f3540069 Bug 1713178 - Make black linter setup avoid updating the virtualenv if it's installed. r=ahal
This could be easily generalized to avoid the updating the virtualenv
more generally, but I think this functionality should be in the
`virtualenv_manager` -- something like `install_pip_binary(...)` -- so
I've just done the most impactful example here.

Differential Revision: https://phabricator.services.mozilla.com/D116148
2021-05-31 21:44:05 +00:00
Henrik Skupin
2c6099421a Bug 1693993 - [marionette] Move Marionette server code to /remote/marionette. r=remote-protocol-reviewers,marionette-reviewers,jdescottes,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D106311
2021-05-31 17:36:06 +00:00
Andrew Halberstadt
c6fc95b9fd Bug 1713391 - Make 'mach try again --index' list the options, r=releng-reviewers,bhearsum
This is a minor quality of life improvement. Prior to this, one needs to:

  1. Type out 'mach try again --list'
  2. Find index
  3. Type out 'mach try again --index <index>'

With this patch, it becomes:

  1. Type out 'mach try again --index'
  2. Find index
  3. Press up + space + <index>

Yes, it is minor :).

Differential Revision: https://phabricator.services.mozilla.com/D116289
2021-05-31 13:52:57 +00:00
Alexandru Michis
d30bd50d0f Backed out changeset 37f2f9ef6ef8 (bug 1693993) for containing unreviewed changes.
CLOSED TREE
2021-05-31 15:55:11 +03:00
Henrik Skupin
55d4518049 Bug 1693993 - [marionette] Move Marionette server code to /remote/marionette. r=remote-protocol-reviewers,marionette-reviewers,jdescottes,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D106311
2021-05-31 08:56:32 +00:00
Alex Lopez
1ee8086c02 Bug 1696251 - Refactor constructors in MachCommandBase subclasses to remove them. r=mhentges,remote-protocol-reviewers
Another step towards avoiding the need for classes in mach commands;
here we are removing constructors either by changing them into helpers
or by simple refactorings.

Differential Revision: https://phabricator.services.mozilla.com/D112434
2021-05-28 18:30:03 +00:00
Butkovits Atila
6bb47ac424 Backed out changeset 4b889750da57 (bug 1696251) for causing lint failures. CLOSED TREE 2021-05-28 01:43:11 +03:00
Alex Lopez
2e8613720d Bug 1696251 - Refactor constructors in MachCommandBase subclasses to remove them. r=mhentges,remote-protocol-reviewers
Another step towards avoiding the need for classes in mach commands;
here we are removing constructors either by changing them into helpers
or by simple refactorings.

Differential Revision: https://phabricator.services.mozilla.com/D112434
2021-05-27 21:03:46 +00:00
Gerald Squelart
7ce2cb9583 Bug 1712733 - Output empty stacks if there are CPU usage numbers - r=florian
In particular, this is useful to show CPU usage graphs in no-periodic-sampling mode.

The GeckoProfiler::CPUUsage gtest was expanded to make sure that we have the same stack in this mode, and different stacks in normal sampling mode.

Differential Revision: https://phabricator.services.mozilla.com/D115892
2021-05-27 11:44:45 +00:00
Alex Lopez
07cf832a8a Bug 1696251 - Turn all properties in MachCommandBase subclasses into methods. r=mhentges,perftest-reviewers,sparky
As a step towards moving mach commands outside of classes, this converts all
properties into methods so that they can later become top-level helper functions.

Differential Revision: https://phabricator.services.mozilla.com/D112196
2021-05-26 18:08:02 +00:00
Myeongjun Go
2b372b94ce Bug 1615289 - [perfdocs] Include tasks the tests run on in Raptor r=sparky,perftest-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D115161
2021-05-26 17:37:54 +00:00
Alexandru Michis
42a1b9d860 Backed out changeset 2b813a59026a (bug 1710015) for causing crashes. 2021-05-24 01:28:47 +03:00
Julien Wajsberg
037bce57a7 Bug 1567222 - [profiler] Add a test to check network markers for synthetized responses from a service worker r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D112217
2021-05-21 09:40:30 +00:00
Julien Wajsberg
93131a67c8 Bug 1567222 - [profiler] Add redirect markers when respondWith isn't called in the service worker's fetch handler r=canaltinova,asuth,necko-reviewers
When `respondWith` isn't called, then we run the "reset interception"
steps, which sets up a new channel and does an internal redirect. We
need a profiler network marker with the "REDIRECT" status to properly
track this.

Differential Revision: https://phabricator.services.mozilla.com/D112216
2021-05-21 09:40:30 +00:00
Julien Wajsberg
030582337b Bug 1567222 - [profiler] Add a test with a serviceworker that has no fetch handlers r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D112214
2021-05-21 09:40:30 +00:00
Julien Wajsberg
8e022cdb47 Bug 1567222 - [profiler] Change the test utility to find the service worker thread, using a profiler marker r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D112211
2021-05-21 09:40:29 +00:00
Julien Wajsberg
db45325052 Bug 1567222 - [profiler] In tests, make the network markers filter more generic r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D112210
2021-05-21 09:40:28 +00:00
Julien Wajsberg
32d5576a22 Bug 1567222 - [profiler] Improve the reporting of objectContainsOnly in case of failures r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D112209
2021-05-21 09:40:28 +00:00
Julien Wajsberg
e3661cbd2a Bug 1567222 - [profiler] Report service worker install errors, so that tests don't timeout r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D112208
2021-05-21 09:40:28 +00:00
Julien Wajsberg
8f1a757929 Bug 1567222 - [profiler] Small changes to the caching serviceworker profiler marker test r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D112207
2021-05-21 09:40:27 +00:00
Julien Wajsberg
cd011872b8 Bug 1567222 - [profiler] Improve the profiler's serviceworker tool to make it easier to install different serviceworker implementations r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D112206
2021-05-21 09:40:27 +00:00
Gerald Squelart
9bb504564a Bug 1710015 - Prevent re-instantiation of ProfilerParentTracker past XPCOMShutdownThreads - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D114709
2021-05-20 11:47:46 +00:00
Butkovits Atila
5aecf96709 Backed out changeset 922238fa3da0 (bug 1710015) for causing crashes on android. CLOSED TREE 2021-05-20 16:25:00 +03:00
Gerald Squelart
563a053a97 Bug 1689325 - Also use CPU to determine if a thread is asleep - r=canaltinova
In cases where a thread is not doing anything, but hasn't been marked as asleep with `AUTO_PROFILER_THREAD_SLEEP`, we can still duplicate the previous sample if we know that zero CPU activity happened.

Differential Revision: https://phabricator.services.mozilla.com/D115454
2021-05-20 12:09:58 +00:00
Gerald Squelart
f00df4603f Bug 1710015 - Prevent re-instantiation of ProfilerParentTracker past XPCOMShutdownThreads - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D114709
2021-05-20 11:47:46 +00:00
Gerald Squelart
098790a8eb Bug 1703410 - Only change Windows timer resolution if PROFILER_ADJUST_TIMER_RESOLUTION is set - r=florian
On Windows, the profiler changes the timer resolution when the sampling interval is less than 10ms.
However this change affects all of Firefox, which can change other behaviors, sometimes causing confusion when refresh-rate issues magically disappear when the profiler is running.

So now by default the profiler will not change the timer resolution. This should rarely affect the profiler's effective sampling rate, unless all threads in a process are in a waiting state, in which case there is nothing new to sample anyway! The front-end is investigating ways to make sampling gaps more obvious, see https://github.com/firefox-devtools/profiler/issues/2962

If some power users really need the added sampling precision in some profiling sessions, the timer resolution change may be requested before running Firefox, by setting the environment variable "PROFILER_ADJUST_TIMER_RESOLUTION" to any value.

Differential Revision: https://phabricator.services.mozilla.com/D115451
2021-05-19 22:29:17 +00:00
Mike Hommey
0f6971cac4 Bug 1711828 - Cap printed Watts to 6 characters. r=xpcom-reviewers,mccr8
If for some reason the input number is a very large double, printing it
can overflow the 16-bytes buffers the function is called with. But
anything above 1000W is very likely invalid.

Differential Revision: https://phabricator.services.mozilla.com/D115446
2021-05-19 21:58:12 +00:00
Toshihito Kikuchi
d8fe2ac176 Bug 1702086 - Part4: Use PEHeaders::GetBounds instead of GetModuleInformation. r=gerald
`SharedLibraryInfo::GetInfoForSelf()` can use `PEHeaders::GetBounds` instead of
`GetModuleInformation` to get the start/end address of a module's mapped region
in the local process.  It's roughly 100x faster because `GetModuleInformation`
invokes two system calls `NtQueryInformationProcess` and `NtReadVirtualMemory`
while `nt::PEHeaders` does not.

Depends on D115254

Differential Revision: https://phabricator.services.mozilla.com/D115255
2021-05-19 18:01:49 +00:00
Toshihito Kikuchi
2755a48956 Bug 1702086 - Part3: Use PEHeaders::GetVersionInfo. r=gerald
This patch replaces two versions of `GetVersion` in Gecko profiler and
baseprofiler with `PEHeaders::GetVersionInfo`.

Depends on D115253

Differential Revision: https://phabricator.services.mozilla.com/D115254
2021-05-19 18:01:48 +00:00
Toshihito Kikuchi
4e1b4037be Bug 1702086 - Part2: Get PDB information from the new handle. r=gerald
This patch is the actual fix for Bug 1702086.  The problem of Bug 1702086 is that
`LoadLibraryExW` loaded the module onto an address different from the original
mapped addresss because it was unloaded after we started enumeration.  Calling
`GetPdbInfo` with the original address `module.lpBaseOfDll` caused a crash.

The proposed fix consists of three parts.

The first part is to get PDB information from `handleLock`, which is always valid
even if the original address was unloaded.  With this, we don't need a check
of `VirtualQuery`.

The second part is to add `LOAD_LIBRARY_AS_IMAGE_RESOURCE` along with
`LOAD_LIBRARY_AS_DATAFILE` to the call to `LoadLibraryEx`.  This is needed
to read information from the sections outside the PE headers because
RVA (= relative virtual address) is an address after relocation.
Without `LOAD_LIBRARY_AS_IMAGE_RESOURCE`, a module is mapped without relocation,
so `GetPdbInfo()` accesses wrong memory resulting in a crash.

The third part is to introduce `PEHeaders::GetPdbInfo`, replacing two versions
of `GetPdbInfo` in Gecko profiler and baseprofiler.

Depends on D115252

Differential Revision: https://phabricator.services.mozilla.com/D115253
2021-05-19 18:01:48 +00:00
Toshihito Kikuchi
d64610fed5 Bug 1702086 - Part1: Introduce EnumerateProcessModules. r=gerald
This patch introduces `EnumerateProcessModules` to enumerate all loaded modules
in the local process so that Gecko profiler and baseprofiler can use it.

Differential Revision: https://phabricator.services.mozilla.com/D115252
2021-05-19 18:01:47 +00:00
Mark Banner
5f379eb4db Bug 1702858 - Update node modules for latest versions, remove obsolete. r=mossop
@babel/transform-flow-strip-types and eslint-plugin-flowtype are no longer required as devtools removed the uses of them in bug 1690742.

Differential Revision: https://phabricator.services.mozilla.com/D115402
2021-05-19 16:53:53 +00:00
Mitchell Hentges
27bd6970fe Bug 1694531: Clarify try docs regarding signing and OS signatures r=glandium DONTBUILD
* Don't use a separate heading level for the signature-resolution
  section, since RST thought it was more important than the others (the
  original goal was for it to be a lesser header).
* Clarify that the "damaged" error is caused by the app being
  quarantined, and not because of the key used to sign the app.

Differential Revision: https://phabricator.services.mozilla.com/D112249
2021-05-18 15:00:45 +00:00
Alex Lopez
455d9a088b Bug 1696251 - Pass MachCommandBase object as first argument for Mach Commands. r=mhentges,remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers
As an intermediate step to allow mach commands as standalone functions, the MachCommandBase
subclass instance that currently corresponds to self has to be made available as a separate
argument (named command_context).

Differential Revision: https://phabricator.services.mozilla.com/D109650
2021-05-17 16:15:58 +00:00
Steve Fink
975831564a Bug 1709918 - Process --gecko-profile* options correctly. r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D114527
2021-05-13 15:46:59 +00:00
Gregory Mierzwinski
d02f8dc2a2 Bug 1675788 - Output supported perftest tools when mach browsertime is run. r=perftest-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D115005
2021-05-13 12:46:37 +00:00
Gerald Squelart
93fc93adba Bug 1710607 - If not profiling, make ShutdownProfilerChild dispatch SYNC - r=canaltinova
When not profiling, ShutdownProfilerChild should be quick, so it's safe to run synchronously.
In this case, we don't need to manually shutdown the thread (to wait for the previously-async task).
This removes the risky thread-shutdown with its inner event-handling loop, where all crashes in bug 1613798 happen.

Differential Revision: https://phabricator.services.mozilla.com/D114845
2021-05-12 10:44:33 +00:00
Kimberly Sereduck
afadbdf9a1 Bug 1706627: Migrate static wiki content for AWSY tests to PerfDocs r=perftest-reviewers,sparky
Differential Revision: https://phabricator.services.mozilla.com/D113858
2021-05-11 20:08:08 +00:00
Alex Ionescu
40e4622730 Bug 1707233 - Fix perfdocs manifest and recording names r=sparky,perftest-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D113243
2021-05-11 13:58:59 +00:00
Matt Woodrow
97cdf4f16e Bug 1707513 - Add reftest-snapshot task using the 'drawSnapshot' reftest mode. r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D114189
2021-05-10 00:28:01 +00:00
Alexandru Michis
4b2cad43d1 Backed out 2 changesets (bug 1707513) for causing reftest failures in partial-prerender-expansion-with-resolution-1.html
Backed out changeset f9bdd1b929f2 (bug 1707513)
Backed out changeset b76d28f3a159 (bug 1707513)
2021-05-08 22:13:23 +03:00
Matt Woodrow
2f98b2305c Bug 1707513 - Add reftest-snapshot task using the 'drawSnapshot' reftest mode. r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D114189
2021-05-08 05:52:19 +00:00
Florian Quèze
7a8983cc88 Bug 1705318 - substract the memory used by the profiler buffer when sampling the memory counter, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D114397
2021-05-07 09:32:11 +00:00
Gerald Squelart
e2d8ae5a08 Bug 1708350 - profiler_suspend_and_sample_thread can now sample the current thread - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D114115
2021-05-06 23:23:40 +00:00
Cosmin Sabou
59ec919b24 Bug 1709496 - Fix clippy mozlint failure. r=glandium 2021-05-07 00:46:37 +03:00
Mike Hommey
a23f5eb33e Bug 1709496 - Attribute clippy issues to the specific file where they are. r=sylvestre
And fix the paths filtering.

Differential Revision: https://phabricator.services.mozilla.com/D114308
2021-05-06 21:17:56 +00:00
Mike Hommey
faeedaaeef Bug 1708379 - Adapt mozlint clippy test to pass with rustc 1.52. r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D114450
2021-05-06 20:36:52 +00:00
Sandor Molnar
6ceb5f92a7 Backed out 10 changesets (bug 1696531) for causing mochitest failures in TypeError: cannot use a string pattern on a bytes-like object. CLOSED TREE
Backed out changeset abc85e3c21b0 (bug 1696531)
Backed out changeset 82445e26060e (bug 1696531)
Backed out changeset 97771570e425 (bug 1696531)
Backed out changeset c3f229148f6c (bug 1696531)
Backed out changeset 9557ff3065bc (bug 1696531)
Backed out changeset 98d17a5f6886 (bug 1696531)
Backed out changeset b0eee4af2caf (bug 1696531)
Backed out changeset 544be24f74be (bug 1696531)
Backed out changeset ddcc795bf838 (bug 1696531)
Backed out changeset e5e76f56ceb9 (bug 1696531)
2021-05-06 23:57:56 +03:00