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

8664 Коммитов

Автор SHA1 Сообщение Дата
Gabriele Svelto e452abab1c Bug 1655476 - Scrape symbols for Windows graphics drivers r=marco DONTBUILD
This adds symbol servers from Intel, AMD and NVidia. Unfortunately not all
symbols are available there, we still have to manually download those that
aren't.

Differential Revision: https://phabricator.services.mozilla.com/D95854
2020-11-06 11:02:03 +00:00
Gabriele Svelto 4b85e11596 Bug 1675263 - Refactor the scripts used to scrape Microsoft and Apple system symbols r=marco DONTBUILD
This patch changes a few different things:
- The Docker image used for both scrapers are now based off of our standard
  Debian 10 image instead of an old Ubuntu one
- Both images were changed to make it easy to work with them when an
  interactive task is used
- The python packages used by the scripts had their versions pinned and
  cryptographic hashes have been recorded so that they can be verified before
  running the task
- The dump_syms version used on Windows was bumped to include fixes that allow
  us to scrape public symbols from DLLs and EXEs that have no PDB file available
- The maximum open file limit of the Window scraper was bumped up to cope with
  runs where we gather plenty of symbols in one go
- Similarly the maximum number of symultaneous connections to a single symbol
  server has been limited to 4 to avoid being throttled
- The macOS Python tools were modified to work with Python 3

Differential Revision: https://phabricator.services.mozilla.com/D95853
2020-11-06 11:02:25 +00:00
Barret Rennie ac6be32a0a Bug 1671035 - Add a WebIDL backed path manipulation utility r=Gijs,nika
PathUtils is a path manipulation component to IOUtils, which is based on
simplified file I/O. This work is part of the larger goal of removing
osfile.jsm et al., ospath.jsm et al., and the entire OS.* namespace, especially
from the startup path.

No equivalent was provided for OS.Path.fromFileURI because it is unused.

Differential Revision: https://phabricator.services.mozilla.com/D95105
2020-11-05 18:08:38 +00:00
Tom Ritter 5ab182e7e6 Bug 1674182 - Support a regex filter for./mach try auto r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D95186
2020-11-05 17:53:31 +00:00
Greg Tatum 3986877f46 Bug 1674219 - Provide the basic documentation for Talos; r=sparky,perftest-reviewers
This patch adds the basic docs for Talos using the PerfDocs system. It
includes a high-level overview of what Talos is, and how to interact with
it.

Differential Revision: https://phabricator.services.mozilla.com/D95604
2020-11-05 15:42:35 +00:00
Gregory Mierzwinski 5c2926e336 Bug 1638365 - Use webdriver navigation for pageload tests. r=perftest-reviewers,Bebe
This patch upgrade browsertime to v10, enables webdriver-based navigation in browsertime tests, and also disables the Firefox WindowRecorder for a fairer comparison between Chrome and Firefox.

Differential Revision: https://phabricator.services.mozilla.com/D95425
2020-11-05 14:27:56 +00:00
alwu 31f03aa534 Bug 1674845 - part3 : create 'mochitest' subfolder for autoplay related plain mochitests. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D95880
2020-11-05 04:50:13 +00:00
alwu 35d0af6eef Bug 1674845 - part2 : create 'autoplay' subfolder and move related files. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D95879
2020-11-05 04:50:11 +00:00
Dorel Luca d1d71a8e1a Backed out 4 changesets (bug 1674845) for Browser-chrome failures in toolkit/content/tests/browser/browser_findbar.js. CLOSED TREE
Backed out changeset 8f20a34998c6 (bug 1674845)
Backed out changeset 98b99d2dd52f (bug 1674845)
Backed out changeset 804d23738709 (bug 1674845)
Backed out changeset 64ca82a10039 (bug 1674845)
2020-11-05 06:47:47 +02:00
alwu 89a2733812 Bug 1674845 - part3 : create 'mochitest' subfolder for autoplay related plain mochitests. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D95880
2020-11-04 21:31:04 +00:00
alwu 635563771a Bug 1674845 - part2 : create 'autoplay' subfolder and move related files. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D95879
2020-11-04 21:29:32 +00:00
Gerald Squelart 9acb23c062 Bug 1674045 - UniqueJSONStrings takes string spans instead of pointers - r=gregtatum
For consistency with `JSONWriter` (which UniqueJSONStrings' functions use), and for added safety and some efficiency, UniqueJSONStrings now takes `Span<const char`> arguments instead of raw pointers to null-terminated strings.

Differential Revision: https://phabricator.services.mozilla.com/D95114
2020-11-02 13:55:16 +00:00
Gerald Squelart c68a3c6b21 Bug 1674045 - Add documentation to UniqueJSONStrings, and clean up - r=gregtatum
Document the class and methods.
`GetOrAddIndex` is only used internally, so it can be private.
`SpliceStringTableElements` can now only work on rvalue UniqueJSONStrings, this emphasizes that it shouldn't be used anymore after this call.

Differential Revision: https://phabricator.services.mozilla.com/D95113
2020-11-02 13:54:43 +00:00
Gerald Squelart 7e610c2025 Bug 1674045 - Deduplicate UniqueJSONStrings - r=gregtatum
The two identical copies are `UniqueJSONStrings` are combined and moved almost verbatim to BaseProfilerJSONWriter.h.

Differential Revision: https://phabricator.services.mozilla.com/D95112
2020-11-02 13:54:20 +00:00
Agi Sferro 6cc1c746de Bug 1671460 - Update to apilint 0.4.0. r=snorp
There is an unfortunate-but-necessary ordering issue that needs to be fixed in
the api.txt file which is causing a lot of one time updates. The ordering of
annotations was not stable (and now it is).

Differential Revision: https://phabricator.services.mozilla.com/D95382
2020-11-02 19:42:25 +00:00
Kartikaya Gupta eb7dfc2feb Bug 1674468 - Audit documentation. r=kvark
No significant changes here, mostly clarifying the wording in some places and
making sure it's accurate. Also added a section on the access group since
people looking at this tool may not know about those pieces.

Depends on D95394

Differential Revision: https://phabricator.services.mozilla.com/D95395
2020-11-02 16:15:14 +00:00
Kartikaya Gupta 14a729735a Bug 1674468 - Remove a couple of pending TODOs. r=kvark
We can just use the author of the commit as the committer. I don't know why
I used anything different in the first place, but I'd like to remove references
to the graphics-team email address so this seems like a good time to fix it.

Also remove another TODO that I'm probably never going to do.

Differential Revision: https://phabricator.services.mozilla.com/D95394
2020-11-02 16:14:59 +00:00
Ricky Stewart fe502f41e1 Bug 1660338 - Pass down location of `virtualenv` `bin` directory from `mach lint` invocation down to linters r=ahal
The logic the `black` and `flake8` linters were using to find the location of the appropriate binaries for linting was wrong in certain cases given how `mach lint` uses subprocesses to batch work. Instead, we allow the option to override the old janky behavior with a known-good path.

Differential Revision: https://phabricator.services.mozilla.com/D95396
2020-10-31 04:42:11 +00:00
alwu d87f6fb19c Bug 1673521 - move all browser tests into browser folder in order to adopt browser-test eslint setting automatically. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D94872
2020-10-29 19:32:26 +00:00
Razvan Maries 30f21fe657 Backed out changeset f1c833a3cffb (bug 1673521) for Gecko Decision Task bustage. CLOSED TREE 2020-10-29 21:25:52 +02:00
alwu d4db5c9d04 Bug 1673521 - move all browser tests into browser folder in order to adopt browser-test eslint setting automatically. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D94872
2020-10-29 19:06:44 +00:00
Ricky Stewart fbe2b42f80 Bug 1673700 - Don't use double quotes around strings in definition of `fork_interpose` r=firefox-build-system-reviewers,glandium
The definition of `patch_main()` has behavior that kicks in only on Windows and for Python 2. Unfortunately, not all of our `mach` commands have been migrated to Python 3, so this still matters.

Bug 1654103 replaced the single-quoted strings in this function with double-quoted strings. This should be fine, except that we call into `multiprocessing.forking.main()` with some monkey-patching that is meant to fix a Windows-specific bug (see bug 1316140). We don't do any clever serialization or anything here and we end up just passing that source to `multiprocessing.forking.main()` which aggregates that source code [dumbly](https://github.com/python/cpython/blob/2.7/Lib/multiprocessing/forking.py#L259), wrapping everything in double-quotes again and passing it to `_subprocess.CreateProcess()`, which ends up failing if the source contains strings formatted with double quotes.

We could revert bug 1654103 and exempt this file from linting, but that is overkill given that this file otherwise contains useful stuff. Instead we move everything to another file, exempt that file from linting, and update `util.py` accordingly.

Differential Revision: https://phabricator.services.mozilla.com/D94909
2020-10-29 15:47:14 +00:00
Simon Giesecke 80cee3b558 Bug 1639552 - Add obfuscating VFS. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D76140
2020-10-29 10:40:19 +00:00
Gerald Squelart 661d9cff56 Bug 1673494 - Tweak profile gathering timeout, with pref "devtools.performance.recording.child.timeout_s" - r=gregtatum
Instead of a repeating timeout of only twice the parent's serialization time + 1s, use that double parent time and multiply it by the number of children, and add the number of seconds from the about:config preference "devtools.performance.recording.child.timeout_s" (still 1s by default).

Differential Revision: https://phabricator.services.mozilla.com/D94955
2020-10-28 22:17:48 +00:00
Greg Tatum b3a1294711 Bug 1673723 - Test marker schema from xpcshell tests; r=gerald,julienw
Moving markers definitions to where they are used means that it's harder
to unit test them from gtests. xpcshell tests have the benefits of exercising
the markers in a more realistic setting. However, we still need to test the
output of the schema. This patch adds a new capability to do a deep equality
check of the schema results. The utility function attempts to make the output
more readable by humans, and suggest how to fix errors. This will hopefully
make it easy for users to update and maintain their markers.

Differential Revision: https://phabricator.services.mozilla.com/D94890
2020-10-28 14:08:59 +00:00
Greg Tatum c66aecf287 Bug 1673623 - Initialize the baseprofiler in xpcshell tests; r=gerald
The baseprofiler is required to be in place first for features that are only
implemented in the baseprofiler, such as the MarkerThreadId::MainThread().
This patch adds the initialization, and upates the ProfilerIOInterposeObserver
to use baseprofiler-only features.

The issue before, was that the base profiler was not initialized, and the
mozilla::baseprofiler::profiler_main_thread_id() was incorrectly reporting that
the main thread index was 0.

No tests were changed in this patch, but it does have coverage with:

tools/profiler/tests/xpcshell/test_feature_fileioall.js

This test would fail with just the interposer changes.

Differential Revision: https://phabricator.services.mozilla.com/D94839
2020-10-27 21:42:20 +00:00
Sean Feng bc73c91f55 Bug 1518999 - Bump the browsertime hash to 8bf45e80ccc65237c622246b11c0739f0409e8e4 r=sparky,perftest-reviewers
Bump the browsertime hash to add a fix from upstream which fixes a
firstPaint related bug when FCP is supported.

Differential Revision: https://phabricator.services.mozilla.com/D90108
2020-10-27 16:13:23 +00:00
Greg Tatum 656917f124 Bug 1671701 - Add more comprehensive tests for FileIO markers; r=gerald,julienw
This re-works our tests to run all of the branches in the interposer. There is
a bit of a risk that this won't pass on all platforms as there is an allow list
of known operations. However, it's currently only limited to macOS and Linux.

Please note the placement of utility functions in shared-head.js if they were
generally useful beyond the xpcshell tests, and in xpcshell/head.js if the
functions were only useful for the specific FileIO tests.

Differential Revision: https://phabricator.services.mozilla.com/D93850
2020-10-27 14:04:15 +00:00
Greg Tatum cf34cd635a Bug 1671701 - Remove FileIOMarkerPayload; r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D93849
2020-10-27 14:04:12 +00:00
Greg Tatum 6451405048 Bug 1671701 - Migrated FileIO markers to the Markers 2.0 API; r=gerald,julienw
This commit uses the new Markers 2.0 API for FileIO Markers. I had to
create another option for the MarkerStack class in order to conditionally
capture a backtrace inside of the Macro. Otherwise the macro invocation
failed.

Differential Revision: https://phabricator.services.mozilla.com/D93848
2020-10-27 14:04:04 +00:00
Johann Hofmann 3d58a1fbfb Bug 941354 - Use innerMostURI on about:{neterror,certerror}. r=prathiksha,baku
This is to prevent issues with parsing the correct hostname for displaying and adding
exceptions for urls like view-source:.

Differential Revision: https://phabricator.services.mozilla.com/D94421
2020-10-27 10:55:51 +00:00
Gerald Squelart 204efca960 Bug 1672310 - Output marker backtraces from other threads - r=gregtatum
The new Markers 2.0 code had missed one detail:
Backtraces in markers were serialized as just the `ProfileChunkedBuffer`, which doesn't expose the original thread id like `ProfilerBacktrace` did.
Then when outputting the profile, the marker code would use the marker's thread id (where the marker should be displayed in the frontend, which *could* be different from where the backtrace came) to deserialize and stream the attached marker, and a special check in the streaming code meant that the mismatched id would ignore the stored sample, and the displayed marker would show no stack.

With this patch, when streaming stacks from markers, the given thread id is 0 (an impossible thread id), which indicates that whatever sample is present should be streamed.
`ProfilerBacktrace` doesn't need to store the thread id anymore.
This solves the above problem.

As a bonus, the streaming code now reports the original thread of the sample(s) it found. This could be used in the future, to better show in the frontend that some stacks may come from other threads.

Differential Revision: https://phabricator.services.mozilla.com/D94264
2020-10-27 03:16:12 +00:00
Butkovits Atila f31945adb0 Backed out 3 changesets (bug 1671701) for causing failure at browser_startup_mainthreadio.js. CLOSED TREE
Backed out changeset b4b6ec163792 (bug 1671701)
Backed out changeset a343865ccfe0 (bug 1671701)
Backed out changeset e6f882892fea (bug 1671701)
2020-10-27 02:40:13 +02:00
Greg Tatum 366bff7778 Bug 1671701 - Add more comprehensive tests for FileIO markers; r=gerald,julienw
This re-works our tests to run all of the branches in the interposer. There is
a bit of a risk that this won't pass on all platforms as there is an allow list
of known operations. However, it's currently only limited to macOS and Linux.

Please note the placement of utility functions in shared-head.js if they were
generally useful beyond the xpcshell tests, and in xpcshell/head.js if the
functions were only useful for the specific FileIO tests.

Differential Revision: https://phabricator.services.mozilla.com/D93850
2020-10-26 20:27:21 +00:00
Greg Tatum 954d07f101 Bug 1671701 - Remove FileIOMarkerPayload; r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D93849
2020-10-26 20:12:29 +00:00
Greg Tatum 4cc2187968 Bug 1671701 - Migrated FileIO markers to the Markers 2.0 API; r=gerald,julienw
This commit uses the new Markers 2.0 API for FileIO Markers. I had to
create another option for the MarkerStack class in order to conditionally
capture a backtrace inside of the Macro. Otherwise the macro invocation
failed.

Differential Revision: https://phabricator.services.mozilla.com/D93848
2020-10-26 20:12:22 +00:00
Butkovits Atila 9817823a41 Backed out changeset 2edd2bd119ff (bug 941354) for browser-chrome related failures. CLOSED TREE 2020-10-26 23:31:58 +02:00
Johann Hofmann a735fc4151 Bug 941354 - Use innerMostURI on about:{neterror,certerror}. r=prathiksha,baku
This is to prevent issues with parsing the correct hostname for displaying and adding
exceptions for urls like view-source:.

Differential Revision: https://phabricator.services.mozilla.com/D94421
2020-10-26 20:12:14 +00:00
Ricky Stewart 210585edd2 Bug 1672023 - Remove excluded files from `black.yml`
These files were omitted from the original patch because reformatting them required some manual intervention in order to avoid breaking unit tests. Generally the `noqa` lines were already there and just needed to be moved from one line to another (due to the reformatting by `black`), but sometimes `black` saw fit to move a bunch of stuff all onto one line, requiring me to introduce new `noqa` lines.

Besides the autoformat by `black` and some manual fixups, this patch contains no other changes.

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94052

Depends on D94045
2020-10-26 18:21:44 +00:00
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Andrew Halberstadt 1761ded69a No Bug - Update tryselect docs around installing watchman, DONTBUILD, r=firefox-source-docs-reviewers,sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D94104
2020-10-20 21:55:19 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart fe80718d67 Bug 1672023 - Remove excluded files from `black.yml` r=sylvestre,perftest-reviewers,geckoview-reviewers,agi
These files were omitted from the original patch because reformatting them required some manual intervention in order to avoid breaking unit tests. Generally the `noqa` lines were already there and just needed to be moved from one line to another (due to the reformatting by `black`), but sometimes `black` saw fit to move a bunch of stuff all onto one line, requiring me to introduce new `noqa` lines.

Besides the autoformat by `black` and some manual fixups, this patch contains no other changes.

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94052
2020-10-23 20:40:44 +00:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Sean Feng 10786ede6c Bug 1518999 - Bump the browsertime hash to 8bf45e80ccc65237c622246b11c0739f0409e8e4 r=sparky,perftest-reviewers
Bump the browsertime hash to add a fix from upstream which fixes a
firstPaint related bug when FCP is supported.

Differential Revision: https://phabricator.services.mozilla.com/D90108
2020-10-23 19:46:56 +00:00
Myeongjun Go 27e4a2b691 Bug 1672207 - [perfdocs] Remove legacy code on build_test_description r=sparky,perftest-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D94127
2020-10-23 13:04:19 +00:00
Ben Hearsum 427616a2a1 Bug 1598823: remove visualmetrics mach command r=sparky,releng-reviewers,perftest-reviewers,aki DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D94160
2020-10-22 15:20:20 +00:00
Gerald Squelart 15d07d6c5b Bug 1672501 - Initialize scProfilerMainThreadId from profiler_init - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D94419
2020-10-22 12:55:13 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Dorel Luca 26941cf2f5 Backed out changeset 94ec15429e21 (bug 1672023) for Backout conflicts with Bug 1654103. CLOSED TREE 2020-10-22 03:43:01 +03:00
Ricky Stewart 8b352f1843 Bug 1672023 - Remove excluded files from `black.yml` r=sylvestre,perftest-reviewers,geckoview-reviewers,agi
These files were omitted from the original patch because reformatting them required some manual intervention in order to avoid breaking unit tests. Generally the `noqa` lines were already there and just needed to be moved from one line to another (due to the reformatting by `black`), but sometimes `black` saw fit to move a bunch of stuff all onto one line, requiring me to introduce new `noqa` lines.

Besides the autoformat by `black` and some manual fixups, this patch contains no other changes.

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94052
2020-10-21 21:29:30 +00:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Andrew Halberstadt d793d59bb4 Bug 1662603 - [ci] Print dependents of a task that should not be scheduled, r=taskgraph-reviewers,jmaher
This makes it easier to diagnose why the integration test failed.

Differential Revision: https://phabricator.services.mozilla.com/D94328
2020-10-21 21:08:32 +00:00
Florian Quèze 6f8f8fdeae Bug 1672251 - Allow capturing profiles of tests that trigger private browsing, r=gerald.
This allows `./mach test <test path and name> --profiler` to work even for tests that use private browsing.

Differential Revision: https://phabricator.services.mozilla.com/D94152
2020-10-21 18:49:38 +00:00
Andrew Halberstadt 635fc5d710 Bug 1670240 - [tryselect] Use the 'TestManifestLoader' when resolving test paths r=jmaher
This walks the file system to read moz.build files, rather than following the DIRS
traversal. The latter is problematic because many moz.build files that happen to
define manifests could be excluded by the local build config.

Differential Revision: https://phabricator.services.mozilla.com/D94197
2020-10-21 10:54:10 +00:00
Mike Conley c22a8ed2b1 Bug 1661304 - Add an interface for front-end code to annotate background hang reports. r=dthayer,chutten,smaug
Depends on D92809

Differential Revision: https://phabricator.services.mozilla.com/D88309
2020-10-20 20:13:47 +00:00
Narcis Beleuzu 1e5c5c405a Backed out 7 changesets (bug 1661304) for xpcshell failures on test_UserInteraction_annotations.js. CLOSED TREE
Backed out changeset 10459893968e (bug 1661304)
Backed out changeset 234f7dd34c95 (bug 1661304)
Backed out changeset e1954838e36f (bug 1661304)
Backed out changeset 6f0f76bb873d (bug 1661304)
Backed out changeset 5186bba48ce7 (bug 1661304)
Backed out changeset 442ce3a64bab (bug 1661304)
Backed out changeset 88b46f9a789e (bug 1661304)
2020-10-19 21:39:07 +03:00
Mike Conley 69c8c5891d Bug 1661304 - Add an interface for front-end code to annotate background hang reports. r=dthayer,chutten,smaug
Differential Revision: https://phabricator.services.mozilla.com/D88309
2020-10-19 17:41:15 +00:00
Myeongjun Go 10359c348a Bug 1663708 - [perfdocs] Find tests to add to documentation using manifests instead of path searching r=sparky,perftest-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D91703
2020-10-19 15:17:04 +00:00
Gerald Squelart 334aa92a37 Bug 1670954 - profiler_main_thread_id() and profiler_is_main_thread() - r=gregtatum
These functions will be useful to get the main thread id, or check if we're in it, in some public code (e.g., markers).

Differential Revision: https://phabricator.services.mozilla.com/D93735
2020-10-16 22:06:53 +00:00
Valentin Gosu 1a306ee2c7 Bug 1671164 - Rename nsHostResolver::Blacklisted to Blocklisted r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D93491
2020-10-15 11:04:29 +00:00
Gerald Squelart ddcc13f424 Bug 1640999 - Output meta.markerSchema for all used marker types in the process - r=gregtatum
Using the stored marker functions, stream all marker schema to JSON.

Added tests for all common marker types.

Differential Revision: https://phabricator.services.mozilla.com/D90660
2020-10-14 02:12:29 +00:00
Gerald Squelart 2621d4cbf0 Bug 1640999 - Add `MarkerTypeDisplay` to all marker type definitions - r=gregtatum
Add `static mozilla::MarkerSchemaWriter MarkerTypeDisplay()` for each existing marker type.

Because all markers of a given type now must have the same payload and display schema, the DOM event marker has changed from type=tracing with category=DOMEvent, to its own type=DOMEvent, which is now accepted on the front-end.

Based on c9692715f2/src/profile-logic/marker-schema.js

Differential Revision: https://phabricator.services.mozilla.com/D90658
2020-10-14 02:11:25 +00:00
Kartikaya Gupta 41a7b15263 Bug 1669778 - Follow-up to fix silly typo. r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D92992
2020-10-13 20:22:02 +00:00
Gerald Squelart e62f237161 Bug 1670547 - Made AutoArraySchemaWriter safer and more efficient - r=canaltinova
`AutoArraySchemaWriter::FreeFormElement()` is never used, we can remove it.

When constructed, `AutoArraySchemaWriter` was optionally taking a `UniqueStrings` reference, which was stored as a pointer.
Then `AutoArraySchemaWriter::StringElement()` would do a dangerous `MOZ_RELEASE_ASSERT(mStrings);`.

The class is now split in two:
- `AutoArraySchemaWriter`, which does not deal with strings at all, so we don't need a pointer to `UniqueStrings`.
- `AutoArraySchemaWithStringsWriter` that can also deal with strings, in which we store a (non-null) `UniqueStrings` reference.

This is both:
- Safer, because it's not possible to instantiate the non-string writer and try to write a string.
- More efficient, because we don't need to pass&store a `UniqueStrings` reference/pointer when we don't deal with strings.

Differential Revision: https://phabricator.services.mozilla.com/D93191
2020-10-12 23:26:10 +00:00
Andrew Halberstadt 1267e17146 Bug 1519990 - [tryselect] Don't perform expensive computation on import from 'coverage' selector, r=marco
This was causing us to generate the build backend on 'tab' completion (since we
were importing the file to parse available options out of the ArgumentParser
defined therein).

Differential Revision: https://phabricator.services.mozilla.com/D92010
2020-10-08 04:26:07 +00:00
Gerald Squelart db3689ee3d Bug 1670046 - If NoPayload marker has a stack and/or inner window id, convert to NoPayloadUserData - r=gregtatum
It is possible to add options to a NoPayload marker, but stack and inner window ids would be lost because they are normally stored in the payload 'data' JSON object, which doesn't exist for NoPayload markers.
So in this case, we automatically change the marker to a new (internal) "NoPayloadUserData" type, which has a payload in which we can store options.

This is temporary, until bug 1646714 moves these options into the top-level marker JSON object.

Differential Revision: https://phabricator.services.mozilla.com/D93059
2020-10-09 13:00:48 +00:00
Sylvestre Ledru cad53f4804 Bug 1588458 - Replace dxr links by searchfox in the code/test r=kats,sparky
Differential Revision: https://phabricator.services.mozilla.com/D92792
2020-10-08 14:02:40 +00:00
Sylvestre Ledru 1edb1e71c0 Bug 1588458 - Replace dxr links by searchfox in the md doc r=firefox-source-docs-reviewers,championshuttler DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D92790
2020-10-08 08:11:59 +00:00
Sylvestre Ledru 9bce072e44 Bug 1588458 - Replace dxr by searchfox in the rst doc r=ahal DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D49140
2020-10-08 08:13:15 +00:00
Mike Hommey a12805866c Bug 1669633 - Remove the JS_STANDALONE option. r=firefox-build-system-reviewers,rstewart
It was only meant to be used internally, when the top-level python
configure invoked the js python subconfigure. Now that this doesn't
happen, we can remove the option, and consolidate js_standalone and
building_js, which are now roughly synonyms.

Differential Revision: https://phabricator.services.mozilla.com/D92726
2020-10-07 17:48:06 +00:00
Kartikaya Gupta f246440880 Bug 1669778 - Add a couple more presets for minimal tier-1 builds. r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D92786
2020-10-07 17:30:06 +00:00
Kartikaya Gupta edb02da630 Bug 1669547 - Use the currently-running python executable for the preview command. r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D92656
2020-10-07 17:28:35 +00:00
Sylvestre Ledru 5c7636b11a no bug - Fix more docs warnings (404) r=firefox-source-docs-reviewers,championshuttler DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D92765
2020-10-07 15:30:36 +00:00
Greg Tatum eb498b98eb Bug 1665810 - Add an end-to-end mochitest for DOMEvent markers r=gerald
I created a new test file for testing markers in the parent process. It
can be re-used to test a variety of different markers and their payloads
to ensure they are properly being created, and with relevant information.
The idea here is that this tests the entire pipeline, and excercises the
code as an end user of the profiler would.

Differential Revision: https://phabricator.services.mozilla.com/D92457
2020-10-06 13:57:50 +00:00
Greg Tatum c8755d4217 Bug 1669266 - Upgrade the DOMEvent marker to not be of type "tracing" r=gerald
This is part of the Markers 2.0 work. This payload proved to be a bit ambiguous
when moving to the new marker schema, so it requires an upgrader.

The test is included as the following commit.

Differential Revision: https://phabricator.services.mozilla.com/D92456
2020-10-06 13:57:46 +00:00
Gijs Kruitbosch 1aa2c4d5db Bug 1668274 - update eslint, eslint-plugin-no-unsanitized and mocha to allow use of logical assignment operators, r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D91933
2020-10-02 18:00:40 +00:00
Gerald Squelart 79c0e0c0ef Bug 1667915 - Marker type is now given as a reified empty argument instead of a template argument - r=gregtatum
This makes it clearer where marker-type-specific payload arguments start, just after the marker type object.

Also improved the main API documentation.

Differential Revision: https://phabricator.services.mozilla.com/D91681
2020-10-01 11:02:54 +00:00
Gerald Squelart ee701f64d7 Bug 1667915 - Separate marker category from marker options - r=gregtatum
The `category.WithOptions(...)` syntax was a bit strange and difficult to explain.

Now the category and options are separate parameters. Default options can be specified with `MarkerOptions{}` or just `{}`.

As a special case, defaulted-NoPayload functions don't need `<>`, and defaulted-NoPayload functions and macros don't even need `{}` for default options, e.g.:
`profiler_add_marker("name", OTHER); PROFILER_MARKER_UNTYPED("name", OTHER);`

Differential Revision: https://phabricator.services.mozilla.com/D91680
2020-10-01 11:02:23 +00:00
Bogdan Tara ababae891b Backed out 2 changesets (bug 1667915) for platform related bustage CLOSED TREE
Backed out changeset e7a0788a1741 (bug 1667915)
Backed out changeset d34505b2d81b (bug 1667915)
2020-10-01 12:34:39 +03:00
Gerald Squelart 58ca6739aa Bug 1667915 - Marker type is now given as a reified empty argument instead of a template argument - r=gregtatum
This makes it clearer where marker-type-specific payload arguments start, just after the marker type object.

Also improved the main API documentation.

Differential Revision: https://phabricator.services.mozilla.com/D91681
2020-10-01 01:45:20 +00:00
Gerald Squelart e07ae06a1d Bug 1667915 - Separate marker category from marker options - r=gregtatum
The `category.WithOptions(...)` syntax was a bit strange and difficult to explain.

Now the category and options are separate parameters. Default options can be specified with `MarkerOptions{}` or just `{}`.

As a special case, defaulted-NoPayload functions don't need `<>`, and defaulted-NoPayload functions and macros don't even need `{}` for default options, e.g.:
`profiler_add_marker("name", OTHER); PROFILER_MARKER_UNTYPED("name", OTHER);`

Differential Revision: https://phabricator.services.mozilla.com/D91680
2020-10-01 01:44:47 +00:00
Gregory Mierzwinski 11ff239729 Bug 1639372 - Run visual metrics locally through raptor. r=tarek,perftest-reviewers,Bebe
This patch makes it possible to run visual metrics through raptor-browsertime locally.

Differential Revision: https://phabricator.services.mozilla.com/D90548
2020-09-30 15:13:06 +00:00
Florian Quèze 9c87b313a1 Bug 1668056 - Bailout profiler markers should be text markers. r=jandem,gerald
Differential Revision: https://phabricator.services.mozilla.com/D91775
2020-09-30 12:19:54 +00:00
Julian Descottes ba81ea58eb Bug 1667325 - [marionette] Add a marionette try preset r=marionette-reviewers,ahal,maja_zf
Differential Revision: https://phabricator.services.mozilla.com/D91395
2020-09-30 13:42:36 +00:00
Sebastian Hengst 0cf7e55237 Backed out changeset 0b7c8f6349b1 (bug 1667743) on request from kershaw for causing bug 1667801 2020-09-30 13:12:53 +02:00
Sylvestre Ledru 6be67c14c4 Bug 1667831 - doc: refresh links as many pages moved in-tree r=firefox-source-docs-reviewers,ahal DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D91619
2020-09-29 17:53:54 +00:00
Philipp Fischbeck 8d351c89b3 Bug 1622686 - Make testing/web-platform flake8 compliant. r=sylvestre,jgraham
This also enables py3 linting for testing/web-platform. The external testing/web-platform/tests is excluded from linting.

Differential Revision: https://phabricator.services.mozilla.com/D90744
2020-09-29 14:22:49 +00:00
Kershaw Chang 5eabf77a18 Bug 1667743 - Remove unused esni code r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D91571
2020-09-28 17:21:39 +00:00
Sylvestre Ledru 6f3f63970d Bug 1667830 - Update of the various dependencies used by the doc r=firefox-source-docs-reviewers,ahal,championshuttler
Differential Revision: https://phabricator.services.mozilla.com/D91617
2020-09-28 20:42:52 +00:00
James Graham 61e09da070 Bug 1666759 - Add a target_tasks filter that enables scheduling uncommon tasks, r=jmaher
In particular this allows scheduling backlog tasks on try with --disable-target-task-filter

Differential Revision: https://phabricator.services.mozilla.com/D91135
2020-09-25 19:48:47 +00:00
Florian Quèze dcf2fbc92f Bug 1667406 - add Renderer to the default thread filter, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D91447
2020-09-25 15:16:34 +00:00
Nika Layzell 028b755895 Bug 1664542 - Part 2: Test client.openWindow/COOP+COEP, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D90624
2020-09-24 16:34:28 +00:00
Christian Holler d939231580 Bug 1659393 - Add missing headers to FuzzingInterfaceStream.cpp for AFL. r=truber
Differential Revision: https://phabricator.services.mozilla.com/D87227
2020-08-18 13:27:18 +00:00
Christian Holler 0215dcbfc4 Bug 1659392 - Only enable rust fuzzing code with libFuzzer. r=truber
Differential Revision: https://phabricator.services.mozilla.com/D87228
2020-08-18 13:32:15 +00:00
Mats Palmgren 5434696f81 Bug 1665152 - Initial CSS Masonry draft spec. r=dholbert
NPOTB DONTBUILD

The Overview.html file was generated by this command:
curl https://api.csswg.org/bikeshed/ -F file=@layout/docs/css-grid-3/Overview.bs -F force=1 > layout/docs/css-grid-3/Overview.html

Differential Revision: https://phabricator.services.mozilla.com/D90302
2020-09-23 23:21:38 +00:00
Robert Helmer 4748e0ad3a Bug 1665957 - rename Pioneer to Ion r=maxxcrawford,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D90749
2020-09-23 22:10:16 +00:00
Mitchell Hentges 0d40573061 Bug 1666883: install-moz-phab should use pip CLI, not internal file r=firefox-build-system-reviewers,rstewart
Programmatically detecting the moz-phab location by looking at pip
egg/dist files is easily subject to breakage if pip changes its internal
file structure, as it did from pip 19 to pip 20.

So, instead, call the (more stable) pip CLI directly and parse the
output.

Differential Revision: https://phabricator.services.mozilla.com/D91199
2020-09-23 21:08:26 +00:00
Ricky Stewart 18cc8129db Bug 1666517 - `./mach busted` shows recent resolved bugs as well as unresolved bugs r=mhentges,dmajor DONTBUILD
The idea here is that if someone else reported a bug and it got fixed immediately, but you don't have the fix yet for whatever reason (e.g you haven't pulled to the latest `central` or whatever), then you'll see it here. I've chosen 15 days as the cutoff basically arbitrarily.

Differential Revision: https://phabricator.services.mozilla.com/D91062
2020-09-23 20:40:25 +00:00
Simon Giesecke de7bab0f06 Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82325
2020-09-23 15:17:15 +00:00
Andi-Bogdan Postelnicu d13f799bfc Bug 1666513 - Format with black the python code that generates the C++ database. r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D91010
2020-09-22 16:14:03 +00:00
Nico Grunbaum c9ad55f22d Bug 1664900 - P5 - mv peerconnection to jsapi;r=dminor
Differential Revision: https://phabricator.services.mozilla.com/D90951
2020-09-23 04:28:03 +00:00
Nico Grunbaum f8dd90decb Bug 1664900 - P3 - mv media-conduit to libwebrtcglue;r=dminor
Differential Revision: https://phabricator.services.mozilla.com/D90949
2020-09-23 04:25:07 +00:00
Nico Grunbaum 54d899d308 Bug 1664900 - move /media/webrtc/signaling/src to /dom/media/webrtc;r=dminor,webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D90179
2020-09-23 04:22:29 +00:00
Michael Froman 5b942915e9 Bug 1664898 - move media/mtransport to media/transport. r=ng
Differential Revision: https://phabricator.services.mozilla.com/D90309
2020-09-22 21:43:49 +00:00
Narcis Beleuzu 99412cbf35 Backed out changeset 8dab8ca19839 (bug 1665957) for bc failures on browser_ion_ui.js . CLOSED TREE 2020-09-23 09:00:43 +03:00
Robert Helmer 84f317e9d4 Bug 1665957 - rename Pioneer to Ion r=maxxcrawford,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D90749
2020-09-22 18:26:16 +00:00
Mitchell Hentges 1de0840710 Bug 1665445: install-moz-phab installs the Phabricator credentials r=firefox-build-system-reviewers,rstewart
Since `install-moz-phab` is meant to simplify the moz-phab setup flow,
automatically prompting for Phabricator credentials removes an otherwise
manual step.

Detecting the "console_script" location of a package in a
cross-platform, virtualenv-supporting and "--user"-supporting way is
tough, and the most consistent solution seems to be to list the package
contents of moz-phab and look for the one that seems to be the entry
point.

Differential Revision: https://phabricator.services.mozilla.com/D90642
2020-09-22 20:44:32 +00:00
Markus Stange c3839e8a3c Bug 1666246 - Allow duplicate ThreadIds in the profiler's registered thread list. r=gerald
This patch makes us trust the TLS whenever we try to determine whether the current
thread is already registered. It also removes assertions that assume that thread IDs
can never be re-used without a proper unregistration of the old thread.

Differential Revision: https://phabricator.services.mozilla.com/D90915
2020-09-21 23:36:12 +00:00
Tim Huang a62df35eb6 Bug 1663992 - Add a test. r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D90833
2020-09-21 13:01:01 +00:00
Gerald Squelart a811180396 Bug 1664732 - Transition DOMEvent to markers 2.0 - r=gregtatum,smaug
There is only one call site, so I believe it's best to have the marker type there.
I think it's cleaner this way, this marker type doesn't need to be present in a header shared by all users of the profiler.

The only downside is that we cannot unit-test this particular marker type automatically anymore, but I don't think it's strictly needed:
- There are still plenty of tests checking that generic marker types work end-to-end, so we can have some confidence this specific one can do its job.
- If it somehow started to fail, either it would be quickly found that it breaks the front-end, or it wouldn't have any visible effect in which case it's not a big issue.
Follow-up bug 1665810 will instead add a higher-level xpcshell test or mochitest.

Differential Revision: https://phabricator.services.mozilla.com/D90185
2020-09-18 01:46:48 +00:00
Mitchell Hentges a6b53b2c97 Bug 1665509: Use which(pip3) to install MozPhab in `install-moz-phab` r=firefox-build-system-reviewers,rstewart
On windows, just subprocessing `pip3 ...` was running the mach
virtualenv's pip3 binary, rather than the system's (or user's
virtualenv's) pip3.

Differential Revision: https://phabricator.services.mozilla.com/D90492
2020-09-18 00:50:10 +00:00
Sylvestre Ledru 6e0da56328 no bug - tsan doc - Add a link to the sources DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D90387
2020-09-16 13:24:16 +00:00
Alex Chronopoulos e0a11a51c2 Bug 1656438 - Replace dos EOL with unix one. r=padenot
In addition to that remove it from the exclude list of the whitespace sanity check assuming that the dos EOL had made it fail.

Differential Revision: https://phabricator.services.mozilla.com/D85552
2020-09-17 06:16:49 +00:00
Shane Caraveo 41e690dc38 Bug 1659530 skip 3rd party panel when installing recommended addons r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D87326
2020-09-16 16:53:56 +00:00
Dorel Luca 72ef712fd0 Backed out 10 changesets (bug 1518999) for GeckoView failures in PanZoomControllerTest.scroll. CLOSED TREE
Backed out changeset 7b5bdd071d05 (bug 1518999)
Backed out changeset 401e488734dd (bug 1518999)
Backed out changeset c13e51e17329 (bug 1518999)
Backed out changeset 2a2d67ba15b8 (bug 1518999)
Backed out changeset 3d4d84003227 (bug 1518999)
Backed out changeset 972731762965 (bug 1518999)
Backed out changeset f21b13582dad (bug 1518999)
Backed out changeset 13a4c749a802 (bug 1518999)
Backed out changeset 5a6cea5fd344 (bug 1518999)
Backed out changeset c3bb552e76a3 (bug 1518999)
2020-09-17 02:58:34 +03:00
Mitchell Hentges 469ac734aa Bug 1665444: Don't `install-moz-phab` with --user if in venv r=firefox-build-system-reviewers,rstewart
Virtual environments don't allow user installations.
If a developer enters their own virtual environment before running
`mach install-moz-phab`, moz-phab should be installed to that virtual
environment, rather than attempting to (and failing to) install
to the --user environment.

Differential Revision: https://phabricator.services.mozilla.com/D90455
2020-09-16 19:23:00 +00:00
Sean Feng 5a6573c11e Bug 1518999 - Bump the browsertime hash to 8bf45e80ccc65237c622246b11c0739f0409e8e4 r=sparky,perftest-reviewers
Bump the browsertime hash to add a fix from upstream which fixes a
firstPaint related bug when FCP is supported.

Differential Revision: https://phabricator.services.mozilla.com/D90108
2020-09-16 14:56:43 +00:00
Mitchell Hentges 648ccad85b Bug 1654074: Publish glean handle to mach commands r=firefox-build-system-reviewers,rstewart
Allows mach commands to define their own glean metrics with the `metrics_path` @CommandProvider parameter.
When `metrics_path` is defined:
* A `metrics` kwarg is provided to the decorated class. This `metrics` handle is a Glean instance, so Glean documentation should be consulted for usage information.
* When `mach doc telemetry` is run, metrics docs will be generated from all the registered metrics files.

Note: there was some consideration between making `metrics_path` a @CommandProvider or @Command parameter.
In the end, @CommandProvider seemed like a better fit because:
* Metrics seem to be more associated with the entire class than a specific command/method. This is because a class represents a "domain", and that domain may have different commands that have overlapping metrics.  Accordingly, all the metrics should be defined once as available to the entire class.
* Currently, @Command methods only take parameters that map one-to-one with CLI arguments. It could seem inconsistent to have one exception: the metrics handle

Differential Revision: https://phabricator.services.mozilla.com/D85953
2020-09-15 21:15:20 +00:00
Julian Seward d952612d22 Bug 1665029 - LUL: reduce space consumption by not storing duplicate RuleSets. r=fitzgen.
LUL (a Lightweight Unwind Library) performs unwinding on targets that use
Dwarf CFI metadata.  As each Linux/Android shared object is mapped into
memory, it reads unwind data from the objects .eh_frame and/or .debug_frame
sections, and from that info produces a set of canned how-to-unwind recipes,
called RuleSets, which are stored in a SecMap object.  There is one SecMap
object for each mapped object in the process.

Each RuleSet describes how to do a step of unwinding for some code address
range.  Most code address ranges are very short (a few bytes) and so there are
many RuleSets.  libxul.so as of Sept 2020 has approaching 4 million RuleSets,
for example.  Currently, each is 48 bytes long, and so storing them all
requires considerable space, over 200MB.

This patch reduces the storage requirement almost by a factor of 6.  The key
observation is that although there are many RuleSets, almost all of them are
duplicates.  libxul.so typically has less than 300 different RuleSets.  This
patch exploits that observation using two different compression schemes.

Firstly, it makes sense to store each different RuleSet only once, in a vector
("the dictionary").  Then, instead of storing (for libxul.so) a vector of 4
million 48-byte-sized RuleSets, we store a vector of 4 million triples, of the
form

 (code_address, len, dictionary_index)

If `code_address` is 64-bit, and we (entirely reasonably) constrain `len` and
`dictionary_index` to be 32 bits, then a triple takes 16 bytes.  This would
give a factor of 3 memory saving, assuming (again reasonably) that the
dictionary's size is insignificant.

Secondly, we observe that (a) all `code_address`es for any specific shared
object (hence, for the associated RuleSet) span at maximum about 120MB, (b)
that the highest observed `dictionary_index` is less than 400, and (c) that
almost all `len` values are less than 2^16.  Hence we can represent that
triple as

  (32-bit offset_from_RuleSet_base_address, 16-bit len, 16-bit dictionary_index)

For the few `len` values that won't fit into 16 bits, we can chop the range up
into a sequence of 2^16-1 long chunks.  This is exceedingly rare in practice.

With this arrangement, each triple is 8 bytes, hence giving the final
compression figure of 6 == 48 / 8.

In the patch, the triple is represented by a new struct, `Extent`.

This scheme is described (more or less) in
https://blog.mozilla.org/jseward/2013/09/03/how-compactly-can-cfiexidx-stack-unwinding-info-be-represented/

and there is background information on the representations at
https://blog.mozilla.org/jseward/2013/08/29/how-fast-can-cfiexidx-based-stack-unwinding-be/

---

Specific changes are:

class RuleSet: fields `mAddr` and `mLen`, which used to specify the address
range to which the RuleSet applied, have been removed.  They can no longer be
part of RuleSet because each RuleSet is now stored only once, and referenced
by each address range fragment which uses it.  The address information has
instead been moved to ..

struct Extent: this is a new, 8 byte structure, which specifies address
ranges, and indices into the dictionary of RuleSets, as described above.

class SecMap: this holds all the unwind information harvested from a single
Linux/Android shared object.

* Per the description above, the may-contain-duplicates vector of RuleSets,
  `mRuleSet`, has been removed.  Instead it is replaced by a vector of
  `Extent`s, `mExtents`, and the duplicate-free vector of RuleSets,
  `mDictionary`, entries in which are referred to from `mExtents`.

* `mDictionary` cannot be efficiently created until we know all the RuleSets
  that it will need to contain.  Hence, while reading unwind data, a hash
  table, `mUniqifier`, is used as an intermediate.  This maps RuleSets to
  unique integer IDs.  Once reading is complete, `mUniqifier` is enumerated in
  order of the unique IDs, and the RuleSets are copied into their correct
  locations in `mDictionary`.  `mUniqifier` is then deleted, and plays no
  further role.

In terms of actions, the main changes are:

* SecMap::AddRuleSet: the new RuleSet is looked up in `mUniqifier`, or added
  if missing.  This generates a dictionary-index for it.  This is the core of
  the de-duplication process.  Also, a new `mExtent` entry is added for the
  range.

* SecMap::PrepareRuleSets: this is called once all info has been read, but
  before we commence unwinding.  The `mExtent`s implied-address-ranges are
  sorted, trimmed and generally tidied up.  `mDictionary` is created from
  `mUniqifier` and the latter is deleted.

Secondary changes:

* SecMap::mSummaryMinAddr and SecMap::mSummaryMaxAddr have been removed and
  replaced by `mMapMinAVMA` and `mMapMaxAVMA`.

  `mSummaryMinAddr` and `mSummaryMaxAddr` previously held the minimum and
  maximum code addresses of any RuleSets in this SecMap.  However, computing
  them incrementally is no longer possible, and in any case we need to have a
  fixed address for the SecMap against which the Extent::offset fields are
  based.

  Hence we store instead the lowest and highest code addresses for the mapped
  text segment that this SecMap covers -- hence `mMapMinAVMA` and
  `mMapMaxAVMA`.  These are known before we start reading unwind info for this
  SecMap, and are guaranteed to be a superset of the range previously
  specified by `mSummaryMinAddr` and `mSummaryMaxAddr`.  These ranges are
  guaranteed not to overlap the ranges of any other SecMap in the system, and
  hence can still be used for their intended purpose of binary-searching to
  top level collection of SecMaps (which is owned by the one-and-only PriMap).

* Some comments have been cleaned up.  Some imprecise uses of the term
  "address" have been replaced with the more precise terminology "AVMA"
  (Actual Virtual Memory Address).  See existing comment at the top of
  LulMain.h.

Differential Revision: https://phabricator.services.mozilla.com/D90289
2020-09-16 10:18:36 +00:00
Narcis Beleuzu 84c3cc7574 Backed out 47 changesets (bug 1656438) for bustages on DynamicResampler.cpp . CLOSED TREE
Backed out changeset dc497e6c016d (bug 1656438)
Backed out changeset 780a6b48d876 (bug 1656438)
Backed out changeset a9baeaefbb85 (bug 1656438)
Backed out changeset 297b4dbd2380 (bug 1656438)
Backed out changeset 8c3c64217bf6 (bug 1656438)
Backed out changeset d51cd6827d3b (bug 1656438)
Backed out changeset 1e48be97c8ad (bug 1656438)
Backed out changeset 44d075680b27 (bug 1656438)
Backed out changeset 64c35518d82f (bug 1656438)
Backed out changeset 159e8137d4ad (bug 1656438)
Backed out changeset 0546062cc053 (bug 1656438)
Backed out changeset 18079c579276 (bug 1656438)
Backed out changeset b6f3e65401b4 (bug 1656438)
Backed out changeset cfbc65954235 (bug 1656438)
Backed out changeset d35cf2a0b659 (bug 1656438)
Backed out changeset 5da08b28c7b5 (bug 1656438)
Backed out changeset 8071a5b82a62 (bug 1656438)
Backed out changeset 4f2aeff6e0e4 (bug 1656438)
Backed out changeset 4bb23c108319 (bug 1656438)
Backed out changeset 90c2ec79a8fc (bug 1656438)
Backed out changeset ffb479620b65 (bug 1656438)
Backed out changeset 9e9f40be7bd7 (bug 1656438)
Backed out changeset 664f66d512ff (bug 1656438)
Backed out changeset ce3a1f7b1c79 (bug 1656438)
Backed out changeset 8e59070e92ea (bug 1656438)
Backed out changeset fd84761e9af8 (bug 1656438)
Backed out changeset 50ec7aa8a44a (bug 1656438)
Backed out changeset 338a090e2657 (bug 1656438)
Backed out changeset 1f262745a844 (bug 1656438)
Backed out changeset 3b904a06afd1 (bug 1656438)
Backed out changeset d5c5afc9239f (bug 1656438)
Backed out changeset 9351b87ca40b (bug 1656438)
Backed out changeset 2baecf74521e (bug 1656438)
Backed out changeset 8571622fc9a0 (bug 1656438)
Backed out changeset c4ad7c72bc9c (bug 1656438)
Backed out changeset e505d1d051c4 (bug 1656438)
Backed out changeset a51bb724a78c (bug 1656438)
Backed out changeset 8cacc0e96a3e (bug 1656438)
Backed out changeset 58838694eb67 (bug 1656438)
Backed out changeset 2baa906a480d (bug 1656438)
Backed out changeset 52e1ae3a4fd7 (bug 1656438)
Backed out changeset 1da839e0562d (bug 1656438)
Backed out changeset 55c9c22b0a13 (bug 1656438)
Backed out changeset d116b82ffad9 (bug 1656438)
Backed out changeset b640887eca0e (bug 1656438)
Backed out changeset 5be36600b092 (bug 1656438)
Backed out changeset 7b07bbe610ae (bug 1656438)
2020-09-15 20:15:27 +03:00
Alex Chronopoulos bd90aec1ed Bug 1656438 - Replace dos EOL with unix one. r=padenot
In addition to that remove it from the exclude list of the whitespace sanity check assuming that the dos EOL had made it fail.

Differential Revision: https://phabricator.services.mozilla.com/D85552
2020-09-15 14:42:42 +00:00
Andrew Halberstadt 78e5d41e3e Bug 1664771 - [docs] Remove bogus 'Expires' header when uploading docs, r=firefox-source-docs-reviewers,championshuttler
As per:
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html

This header doesn't actually control when an object gets deleted. Rather it is when the object
expires in the browser cache (i.e, when the expiry is hit, the browser will reload the object).

Remove this as it's only causing confusion.

Differential Revision: https://phabricator.services.mozilla.com/D90162
2020-09-14 20:06:57 +00:00
Alexis Beingessner e5dd298d13 Bug 1654807 - update thin-vec to 0.2.1 for potential endianess fix. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D87019
2020-09-14 17:32:40 +00:00
Gerald Squelart 782cf5d3ad Bug 1657033 - Use Span<const char> in JSONWriter - r=froydnj
In most situations, JSONWriter users already know string lengths (either directly, or through `nsCString` and friends), so we should keep this information through JSONWriter and not recompute it again.
This also allows using JSONWriter with sub-strings (e.g., from a bigger buffer), without having to create null-terminated strings.

Public JSONWriter functions have overloads that accept literal strings.

Differential Revision: https://phabricator.services.mozilla.com/D86192
2020-09-14 02:33:20 +00:00
Tarek Ziadé 9c8bb6e963 Bug 1663417 - make scriptinfo compatible with xpcshell tests r=sparky
Differential Revision: https://phabricator.services.mozilla.com/D89372
2020-09-10 23:15:09 +00:00
Gerald Squelart 2ac895ec86 Bug 1664122 - Clearer MarkerOptions accessors - r=gregtatum
`MarkerOptions::Set()` returns the same reference type as the object it's invoked on, i.e.: & -> &, and && -> &&.

`MarkerOptions::NAME()` now always returns a reference to a `const` member, so it's clear it cannot be modified (even if the object at hand is not `const`).
`MarkerOptions::NAMERef()` must be used when non-`const` access is needed.

Differential Revision: https://phabricator.services.mozilla.com/D89715
2020-09-11 00:44:18 +00:00
Gerald Squelart a087b2df35 Bug 1663554 - Convert AUTO_PROFILER_TEXT_MARKER_... to new AUTO_PROFILER_MARKER_TEXT - r=gregtatum
The name `AUTO_PROFILER_MARKER_TEXT` is more consistent with the equivalent non-`AUTO` macro, and similarly arguments have been re-ordered to be the same, i.e.: Name, category&options, text.

The different macros with different argument sets can now be collapsed into one macro, and the optional arguments (timing, inner window id, backtrace) can easily be added to the `MarkerOptions` where needed.

As a bonus, a specific start time can optionally be provided at construction time.

Differential Revision: https://phabricator.services.mozilla.com/D89588
2020-09-11 00:42:51 +00:00
Gerald Squelart b0bf2c2172 Bug 1663554 - Convert PROFILER_ADD_TEXT_MARKER and friends to PROFILER_MARKER_TEXT - r=gregtatum
Mostly mechanical changes, with some work needed to convert the different payloads (with optional timestamps, inner window id, and/or backtrace) to the equivalent MarkerOptions.

Differential Revision: https://phabricator.services.mozilla.com/D89587
2020-09-11 00:41:27 +00:00
Narcis Beleuzu f837964009 Backed out 3 changesets (bug 1661809, bug 1662706, bug 1663417) for SM bustages. CLOSED TREE
Backed out changeset 96e69574f7ee (bug 1662706)
Backed out changeset a584b11a503a (bug 1663417)
Backed out changeset 655ce94f20f3 (bug 1661809)
2020-09-11 01:50:09 +03:00
Tarek Ziadé 2e207a9e80 Bug 1663417 - make scriptinfo compatible with xpcshell tests r=sparky DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D89372
2020-09-10 11:18:26 +00:00
Sylvestre Ledru fb75df0e5c Bug 1663916 - mdn to in-tree: Update of the mdn import doc r=dmajor
Differential Revision: https://phabricator.services.mozilla.com/D89594
2020-09-09 15:13:07 +00:00
Gerald Squelart 5f9ff13253 Bug 1663543 - Convert PROFILER_ADD_MARKER and 2-arg profiler_add_marker to PROFILER_MARKER_UNTYPED - r=gregtatum
Mostly mechanical change, with some extra work where non-literal names are provided.
Also, when this is the only profiler call in a file, `#include "GeckoProfiler.h"` can be changed to `#include "mozilla/ProfilerMarkers.h"`.

Differential Revision: https://phabricator.services.mozilla.com/D89415
2020-09-10 03:02:36 +00:00
Myeongjun Go b53336d5a4 Bug 1653326 - [perfdocs] Add documentation about individual mozperftest tests to perfdocs r=sparky,perftest-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D86488
2020-09-09 17:58:39 +00:00
Ricky Stewart a2345d5933 Bug 1662529 - Remove reference to `mach bootstrap` from `mach install-moz-phab` in case where `pip3` cannot be found r=mhentges,glob
`mach bootstrap` doesn't guarantee that it will install `pip3`for you since bug 1647814, so this is bad advice. This removes a weird self-referential loop where `mach bootstrap` recommends you run `mach install-moz-phab` which then recommends you run `mach bootstrap`.

Differential Revision: https://phabricator.services.mozilla.com/D89028
2020-09-08 16:11:42 +00:00
championshuttler 34d62b1d86 Bug 1661783 - Re-enable test_rst.py on Linux.r=rstewart
Differential Revision: https://phabricator.services.mozilla.com/D89311
2020-09-08 15:50:53 +00:00
Andrew Halberstadt 0295d6c8af Bug 1648791 - [try] Add a try preset to select build tasks, r=glandium
This can be run using:

     $ ./mach try --preset builds

The build list can be filtered further using '-xq', e.g:

    $ ./mach try --preset builds -xq "win"

Or it can be filtered further interactively:

    $ ./mach try --preset builds -xi

Finally, tasks can be added to the build list:

    $ ./mach try --preset builds -q "'windows 'mochitest"

This gives a T-style push. There is currently no way to both filter builds and
add additional tasks, it needs to be one or the other.

Differential Revision: https://phabricator.services.mozilla.com/D81352
2020-09-08 05:01:44 +00:00
Mike Hommey aa86bba7ac Bug 1662601 - Remove fileid. r=gsvelto
The last thing that was using fileid was fix-stacks, which, as of bug
1662037, doesn't anymore.

Differential Revision: https://phabricator.services.mozilla.com/D89076
2020-09-05 05:31:28 +00:00
Gerald Squelart 5507ddc4c5 Bug 1660458 - Improve TLS initialization and usage, remove inline-able function-static init - r=canaltinova
The profiler should guarantee that TLS initializations are done only once (from `profiler_init()`), so there is no need to potentially do it at every TLS access.
Instead, the initialization functions set the TLS states once (to `Initialized` or `Unavailable`, depending on the underlying TLS initialization success), and later accesses to this effectively-read-only flag can be done without thread synchronization.
This reduces the generated code size.

There are also DEBUG-build checks that no accesses are done before initialization; this is theoretically racy, but it's only used to detect too-early accesses in DEBUG builds, which should never happen anyway.

Differential Revision: https://phabricator.services.mozilla.com/D89338
2020-09-07 23:07:38 +00:00
Sylvestre Ledru da34b6a58e Bug 1661514 - Reformat some python files with black 20.8b1 r=rstewart
# ignore-this-changeset

Depends on D88711

Differential Revision: https://phabricator.services.mozilla.com/D88712
2020-09-07 14:05:10 +00:00
Sylvestre Ledru acd45d10e5 Bug 1661514 - Update to black 20.8b1 r=rstewart
Differential Revision: https://phabricator.services.mozilla.com/D88711
2020-09-07 15:25:29 +00:00
Gerald Squelart 87d2667590 Bug 1662994 - Fix non-MOZ_GECKO_PROFILER_BUILD - r=canaltinova
`ProfileChunkedBuffer` needed to be fully defined, because its destructor is needed to define `UniquePtr<ProfileChunkedBuffer>`.
It can just be empty, because it won't actually be used anyway.

Added non-`MOZ_GECKO_PROFILER` tests around this.

Differential Revision: https://phabricator.services.mozilla.com/D89351
2020-09-07 10:11:16 +00:00
Andrew Halberstadt 12c83e7e26 Bug 1655750 - [tryselect] Handle --list/edit-presets even on selectors that don't support presets, r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D88645
2020-09-02 19:44:49 +00:00
Bryce Seager van Dyk a90a447c1c Bug 1649532 - Port DecoderDoctor notifications to fission. r=Gijs
Port handling of DecoderDoctor notifications for fission. This is done by moving
the observing of 'decoder-doctor-notification' from browser-media.js to fission
friendly actors.

As browser-media.js had only code related to this patch left it is removed along
with references to it. Same with ContentObservers.js.

Differential Revision: https://phabricator.services.mozilla.com/D88322
2020-08-28 18:34:24 +00:00
Gerald Squelart b1c2892ebb Bug 1646266 - Profiler Markers 2.0 tests - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D87260
2020-09-02 04:03:32 +00:00
Gerald Squelart ff8b12cb5c Bug 1646266 - {,Base}ProfilerMarkerTypes.h - r=gregtatum
This patch ports existing ProfilerMarkerPayload types to draft struct definitions that may be used with the new markers API.
This is just a starting point, they may be changed later on as needed, see meta-bug 1661394.

Differential Revision: https://phabricator.services.mozilla.com/D87259
2020-09-02 04:03:22 +00:00
Gerald Squelart e6bd850ec0 Bug 1646266 - {BASE_,}PROFILER_MARKER{,_TEXT} - r=gregtatum
This is the main public marker API:
- `AddMarkerToBuffer` can be used to store a marker to any buffer. This could be useful to code that wants to store markers outside of the default profiler buffers.
- `baseprofiler::AddMarker`/`profiler_add_marker` store a marker in the appropriate profiler buffer.
- BASE_PROFILER_MARKER and PROFILER_MARKER do the same, but are also defined (and empty) when MOZ_GECKO_PROFILER is not #defined.
All these take a name, marker options, a marker type, and the type's expected arguments if any (as expected by the `StreamJSONMarkerData` function).

Extra helpers for the most common types:
- BASE_PROFILER_MARKER_UNTYPED and PROFILER_MARKER_UNTYPED store a marker with no data payload.
- BASE_PROFILER_MARKER_TEXT and PROFILER_MARKER_TEXT store a text marker. `baseprofiler::markers::Text` is an example of how new marker types can be defined.

Differential Revision: https://phabricator.services.mozilla.com/D87257
2020-09-02 04:03:20 +00:00
Gerald Squelart 0000b4f25a Bug 1646266 - Marker Deserialization - r=gregtatum
`DeserializeAfterKindAndStream()` is the main function that extracts all the marker data (past the already-read entry kind), and streams it to JSON using the user-provided `Stream(JSONWriter&, ...)` function in the appropriate marker type definition.

It currently requires two external functions to stream the name and the optional backtrace, because these are different between the two profilers. This may change in the future.

(Deserialization is implemented before serialization, because the `Deserialize()` function is needed during serialization to get a marker type tag.)

Differential Revision: https://phabricator.services.mozilla.com/D87254
2020-09-02 04:01:48 +00:00
Gerald Squelart 2c20225e23 Bug 1646266 - NoPayload default type, with specialized empty helper - r=gregtatum
`NoPayload` will be mostly used internally when adding markers without payload data.
It has an empty specialization of the MarkerTypeHelper (mainly to catch misuses), and the add-marker code will need to have different compile-time paths to handle it.

Differential Revision: https://phabricator.services.mozilla.com/D87252
2020-09-02 04:01:02 +00:00
Gerald Squelart 6daee06496 Bug 1646266 - Rework backtrace-capture functions - r=gregtatum
`profiler_capture_backtrace(ProfileChunkedBuffer&)` renamed to `profiler_capture_backtrace_into(ProfileChunkedBuffer&)` (notice "_into"), which is clearer.

New function `profiler_capture_backtrace()` creates a buffer, uses `profiler_capture_backtrace_into()`, and returns a `UniquePtr<ProfileChunkedBuffer>`, which can later be given to `MarkerStack::TakeBacktrace`.

`profiler_get_backtrace()` (returning a `UniqueProfilerBacktrace`) now uses `profiler_capture_backtrace()`.

This patch reduces most duplicate code between these functions.

Differential Revision: https://phabricator.services.mozilla.com/D88280
2020-09-02 03:58:50 +00:00
Gerald Squelart 043c34629b Bug 1646266 - Marker option: MarkerTiming - r=gregtatum
This moves the existing MarkerTiming class introduced in bug 1640969 to the BaseProfilerMarkersPrerequesites.h header, and can be used as a marker option.

Some minor clarifying changes:
- `Instant()` is split into two functions: `InstantNow()` and `InstantAt(TimeStamp)`.
- `Interval(TimeStamp, TimeStamp)` must be given both start and end, otherwise `IntervalUntilNowFrom(TimeStamp)` takes the start only and ends "now".

Also the default construction is now reserved for internal marker usage, the private member function `IsUnspecified()` will be used by the add-marker code will replace it with `InstantNow()`.

The serialization contains the phase, and only one or two timestamps as needed, to save space for non-interval timings.

Differential Revision: https://phabricator.services.mozilla.com/D87245
2020-09-02 03:57:59 +00:00
Gerald Squelart 7fc90b5c27 Bug 1646266 - CorePS buffer access - r=gregtatum
The upcoming profiler-specific add-marker function will need to know which `ProfileChunkedBuffer` to serialize to, `profiler_get_core_buffer()` give access to the profiler's buffer, and `CachedCoreBuffer()` keeps it stored in a function-static object.

Differential Revision: https://phabricator.services.mozilla.com/D87256
2020-09-02 03:57:19 +00:00
Gerald Squelart f55e5c3957 Bug 1646266 - ProfilerString{,8,16}View - r=gregtatum
These string views are similar to `std::string_view`, but they are optimized to be serialized in the profiler buffer, and later deserialized and streamed to JSON.
They accept literal strings, and keep them as unowned raw pointers and sizes.
They also accept any substring reference, assuming that they will only be used as parameters during function calls, and therefore the dependent string will live during that call where these `StringView`'s are used.

Internally, they also allow optional string ownership, which is only used during deserialization and streaming.
This is hidden, so that users are not tempted to use potentially expensive string allocations during profiling; it's only used *after* profiling, so it's less of an impact to allocate strings then. (But it could still be optimized later on, as part of bug 1577656.)

Differential Revision: https://phabricator.services.mozilla.com/D87242
2020-09-02 03:57:17 +00:00
Gerald Squelart e91236469e Bug 1646266 - ProfilerMarkers skeleton files - r=gregtatum
This patch introduces all new files that contain the new markers C++ API and implementation.
They are mostly empty at this time, only including each other as eventually needed, and with `#ifdef MOZ_GECKO_PROFILER` guards.

Rough inclusion diagram: (header <-- includer)

    BaseProfilerMarkerPrerequesites.h <-- ProfilerMarkerPrerequesites.h  (Useful types: Input string view, marker options)
                  ^                                    ^
       BaseProfilerMarkerDetail.h     <--    ProfilerMarkerDetail.h      (Implementation details)
                  ^                                    ^
         BaseProfilerMarkers.h        <--      ProfilerMarkers.h         (Main API)
                  ^      ^---------                    ^   ^---------
       BaseProfilerMarkerTypes.h  |   <--    ProfilerMarkerTypes.h   |   (Common marker types)
                  ^         BaseProfiler.h        <--         GeckoProfiler.h  (Existing main profiler headers)

Differential Revision: https://phabricator.services.mozilla.com/D87241
2020-09-02 03:55:43 +00:00
Cristina Coroiu 8eaafae8fd Backed out 2 changesets (bug 1661514) for lint failure on a CLOSED TREE
Backed out changeset 8e58c88f756b (bug 1661514)
Backed out changeset aef89f9a8031 (bug 1661514)
2020-09-01 19:34:12 +03:00
Sylvestre Ledru 5ee2fbd7cb Bug 1661514 - Reformat some python files with black 20.8b1 r=rstewart
# ignore-this-changeset

Depends on D88711

Differential Revision: https://phabricator.services.mozilla.com/D88712
2020-08-31 17:06:22 +00:00
Sylvestre Ledru 7b9bcc2a8b Bug 1661514 - Update to black 20.8b1 r=rstewart
Differential Revision: https://phabricator.services.mozilla.com/D88711
2020-08-31 17:05:08 +00:00
Gregory Mierzwinski 4e902a393d Bug 1661329 - Add idle and idle-bg power usage tests to raptor-browsertime. r=perftest-reviewers,Bebe
This patch adds the idle and idle-bg tests to raptor-browsertime. To make these work, a new browsertime script was built which handles waiting on a given page url, as well as backgrounding the application.

Differential Revision: https://phabricator.services.mozilla.com/D88491
2020-09-01 10:02:55 +00:00
Gregory Mierzwinski 7101f264ef Bug 1650879 - Upgrade browsertime to v9.4.0. r=tarek,perftest-reviewers,Bebe
Differential Revision: https://phabricator.services.mozilla.com/D88324
2020-09-01 14:01:18 +00:00
Mike Hommey 6db78719c3 Bug 1662037 - Update fix-stacks to a version that does not need fileid. r=njn
Differential Revision: https://phabricator.services.mozilla.com/D88959
2020-09-01 08:58:14 +00:00
Philipp Fischbeck 24588e8d85 Bug 1622683 - Make dom/websocket flake8 and pylint compliant. r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D88809
2020-08-31 14:42:21 +00:00
Cristina Coroiu 91699791f8 Backed out 20 changesets (bug 1646266) for build bustage at baseprofiler/core/ProfilerMarkers.cpp on a CLOSED TREE
Backed out changeset a2734d73264c (bug 1646266)
Backed out changeset a0c2db6f73c7 (bug 1646266)
Backed out changeset 6b71d7b09641 (bug 1646266)
Backed out changeset fcf3c271d0fc (bug 1646266)
Backed out changeset b4a39ef38261 (bug 1646266)
Backed out changeset 6c2b59568703 (bug 1646266)
Backed out changeset 5e7a28a727a1 (bug 1646266)
Backed out changeset b51bc775d1e3 (bug 1646266)
Backed out changeset a01a466e464c (bug 1646266)
Backed out changeset 2c8828fab7a0 (bug 1646266)
Backed out changeset 9fd6a871374f (bug 1646266)
Backed out changeset 3b88d838b252 (bug 1646266)
Backed out changeset bde14a8b0660 (bug 1646266)
Backed out changeset dfd7e13e9e0b (bug 1646266)
Backed out changeset 22bdc0172356 (bug 1646266)
Backed out changeset 4ea14ca3d492 (bug 1646266)
Backed out changeset 25f8e4b67b32 (bug 1646266)
Backed out changeset 3d0160207591 (bug 1646266)
Backed out changeset 790ed86c1a6c (bug 1646266)
Backed out changeset 4c38607ea1ba (bug 1646266)
2020-09-01 11:01:57 +03:00
Gerald Squelart fa20d50c45 Bug 1646266 - Profiler Markers 2.0 tests - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D87260
2020-09-01 04:02:11 +00:00
Gerald Squelart 7440a01e37 Bug 1646266 - {,Base}ProfilerMarkerTypes.h - r=gregtatum
This patch ports existing ProfilerMarkerPayload types to draft struct definitions that may be used with the new markers API.
This is just a starting point, they may be changed later on as needed, see meta-bug 1661394.

Differential Revision: https://phabricator.services.mozilla.com/D87259
2020-09-01 04:01:06 +00:00
Gerald Squelart bf1b496989 Bug 1646266 - {BASE_,}PROFILER_MARKER{,_TEXT} - r=gregtatum
This is the main public marker API:
- `AddMarkerToBuffer` can be used to store a marker to any buffer. This could be useful to code that wants to store markers outside of the default profiler buffers.
- `baseprofiler::AddMarker`/`profiler_add_marker` store a marker in the appropriate profiler buffer.
- BASE_PROFILER_MARKER and PROFILER_MARKER do the same, but are also defined (and empty) when MOZ_GECKO_PROFILER is not #defined.
All these take a name, marker options, a marker type, and the type's expected arguments if any (as expected by the `StreamJSONMarkerData` function).

Extra helpers for the most common types:
- BASE_PROFILER_MARKER_UNTYPED and PROFILER_MARKER_UNTYPED store a marker with no data payload.
- BASE_PROFILER_MARKER_TEXT and PROFILER_MARKER_TEXT store a text marker. `baseprofiler::markers::Text` is an example of how new marker types can be defined.

Differential Revision: https://phabricator.services.mozilla.com/D87257
2020-09-01 04:00:33 +00:00
Gerald Squelart a23a149def Bug 1646266 - Marker Deserialization - r=gregtatum
`DeserializeAfterKindAndStream()` is the main function that extracts all the marker data (past the already-read entry kind), and streams it to JSON using the user-provided `Stream(JSONWriter&, ...)` function in the appropriate marker type definition.

It currently requires two external functions to stream the name and the optional backtrace, because these are different between the two profilers. This may change in the future.

(Deserialization is implemented before serialization, because the `Deserialize()` function is needed during serialization to get a marker type tag.)

Differential Revision: https://phabricator.services.mozilla.com/D87254
2020-09-01 03:59:55 +00:00
Gerald Squelart 208176a140 Bug 1646266 - NoPayload default type, with specialized empty helper - r=gregtatum
`NoPayload` will be mostly used internally when adding markers without payload data.
It has an empty specialization of the MarkerTypeHelper (mainly to catch misuses), and the add-marker code will need to have different compile-time paths to handle it.

Differential Revision: https://phabricator.services.mozilla.com/D87252
2020-09-01 03:59:09 +00:00
Gerald Squelart 74d1ab4ad6 Bug 1646266 - Rework backtrace-capture functions - r=gregtatum
`profiler_capture_backtrace(ProfileChunkedBuffer&)` renamed to `profiler_capture_backtrace_into(ProfileChunkedBuffer&)` (notice "_into"), which is clearer.

New function `profiler_capture_backtrace()` creates a buffer, uses `profiler_capture_backtrace_into()`, and returns a `UniquePtr<ProfileChunkedBuffer>`, which can later be given to `MarkerStack::TakeBacktrace`.

`profiler_get_backtrace()` (returning a `UniqueProfilerBacktrace`) now uses `profiler_capture_backtrace()`.

This patch reduces most duplicate code between these functions.

Differential Revision: https://phabricator.services.mozilla.com/D88280
2020-09-01 03:57:02 +00:00
Gerald Squelart 5068c84cfe Bug 1646266 - Marker option: MarkerTiming - r=gregtatum
This moves the existing MarkerTiming class introduced in bug 1640969 to the BaseProfilerMarkersPrerequesites.h header, and can be used as a marker option.

Some minor clarifying changes:
- `Instant()` is split into two functions: `InstantNow()` and `InstantAt(TimeStamp)`.
- `Interval(TimeStamp, TimeStamp)` must be given both start and end, otherwise `IntervalUntilNowFrom(TimeStamp)` takes the start only and ends "now".

Also the default construction is now reserved for internal marker usage, the private member function `IsUnspecified()` will be used by the add-marker code will replace it with `InstantNow()`.

The serialization contains the phase, and only one or two timestamps as needed, to save space for non-interval timings.

Differential Revision: https://phabricator.services.mozilla.com/D87245
2020-09-01 03:56:16 +00:00
Gerald Squelart c9adf082b0 Bug 1646266 - CorePS buffer access - r=gregtatum
The upcoming profiler-specific add-marker function will need to know which `ProfileChunkedBuffer` to serialize to, `profiler_get_core_buffer()` give access to the profiler's buffer, and `CachedCoreBuffer()` keeps it stored in a function-static object.

Differential Revision: https://phabricator.services.mozilla.com/D87256
2020-09-01 03:55:00 +00:00
Gerald Squelart f458e68ddc Bug 1646266 - ProfilerString{,8,16}View - r=gregtatum
These string views are similar to `std::string_view`, but they are optimized to be serialized in the profiler buffer, and later deserialized and streamed to JSON.
They accept literal strings, and keep them as unowned raw pointers and sizes.
They also accept any substring reference, assuming that they will only be used as parameters during function calls, and therefore the dependent string will live during that call where these `StringView`'s are used.

Internally, they also allow optional string ownership, which is only used during deserialization and streaming.
This is hidden, so that users are not tempted to use potentially expensive string allocations during profiling; it's only used *after* profiling, so it's less of an impact to allocate strings then. (But it could still be optimized later on, as part of bug 1577656.)

Differential Revision: https://phabricator.services.mozilla.com/D87242
2020-09-01 03:54:26 +00:00
Gerald Squelart 6ec5853647 Bug 1646266 - ProfilerMarkers skeleton files - r=gregtatum
This patch introduces all new files that contain the new markers C++ API and implementation.
They are mostly empty at this time, only including each other as eventually needed, and with `#ifdef MOZ_GECKO_PROFILER` guards.

Rough inclusion diagram: (header <-- includer)

    BaseProfilerMarkerPrerequesites.h <-- ProfilerMarkerPrerequesites.h  (Useful types: Input string view, marker options)
                  ^                                    ^
       BaseProfilerMarkerDetail.h     <--    ProfilerMarkerDetail.h      (Implementation details)
                  ^                                    ^
         BaseProfilerMarkers.h        <--      ProfilerMarkers.h         (Main API)
                  ^      ^---------                    ^   ^---------
       BaseProfilerMarkerTypes.h  |   <--    ProfilerMarkerTypes.h   |   (Common marker types)
                  ^         BaseProfiler.h        <--         GeckoProfiler.h  (Existing main profiler headers)

Differential Revision: https://phabricator.services.mozilla.com/D87241
2020-09-01 03:53:59 +00:00
Brindusan Cristian 891f3554a7 Backed out 20 changesets (bug 1646266) for build bustages at TestBaseProfiler.cpp. CLOSED TREE
Backed out changeset e2e161965ad3 (bug 1646266)
Backed out changeset 5d8691cb0edb (bug 1646266)
Backed out changeset 119344e72ed8 (bug 1646266)
Backed out changeset da8ae4c7615c (bug 1646266)
Backed out changeset d5a7d5139d59 (bug 1646266)
Backed out changeset 1eba69baac1f (bug 1646266)
Backed out changeset 33da5fe6d185 (bug 1646266)
Backed out changeset 60a54b5d7bad (bug 1646266)
Backed out changeset 8e65fa28b768 (bug 1646266)
Backed out changeset 678a7c5d8a83 (bug 1646266)
Backed out changeset 3c1f350a07d5 (bug 1646266)
Backed out changeset d091750b1b14 (bug 1646266)
Backed out changeset de4d9ab1a6e1 (bug 1646266)
Backed out changeset 9eff1a8c358e (bug 1646266)
Backed out changeset db3bdff5e4d7 (bug 1646266)
Backed out changeset be8fd5f6d335 (bug 1646266)
Backed out changeset 220f96d1e3a2 (bug 1646266)
Backed out changeset 092c89f164ba (bug 1646266)
Backed out changeset ddec14555d7e (bug 1646266)
Backed out changeset 8c9ceb8f8dc8 (bug 1646266)
2020-09-01 05:24:52 +03:00
Gerald Squelart 7b632d04a8 Bug 1646266 - Profiler Markers 2.0 tests - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D87260
2020-09-01 01:38:49 +00:00
Gerald Squelart 3980c1d522 Bug 1646266 - {,Base}ProfilerMarkerTypes.h - r=gregtatum
This patch ports existing ProfilerMarkerPayload types to draft struct definitions that may be used with the new markers API.
This is just a starting point, they may be changed later on as needed, see meta-bug 1661394.

Differential Revision: https://phabricator.services.mozilla.com/D87259
2020-09-01 01:38:26 +00:00
Gerald Squelart 5e53131645 Bug 1646266 - {BASE_,}PROFILER_MARKER{,_TEXT} - r=gregtatum
This is the main public marker API:
- `AddMarkerToBuffer` can be used to store a marker to any buffer. This could be useful to code that wants to store markers outside of the default profiler buffers.
- `baseprofiler::AddMarker`/`profiler_add_marker` store a marker in the appropriate profiler buffer.
- BASE_PROFILER_MARKER and PROFILER_MARKER do the same, but are also defined (and empty) when MOZ_GECKO_PROFILER is not #defined.
All these take a name, marker options, a marker type, and the type's expected arguments if any (as expected by the `StreamJSONMarkerData` function).

Extra helpers for the most common types:
- BASE_PROFILER_MARKER_UNTYPED and PROFILER_MARKER_UNTYPED store a marker with no data payload.
- BASE_PROFILER_MARKER_TEXT and PROFILER_MARKER_TEXT store a text marker. `baseprofiler::markers::Text` is an example of how new marker types can be defined.

Differential Revision: https://phabricator.services.mozilla.com/D87257
2020-09-01 01:37:53 +00:00
Gerald Squelart 75bfba7dd8 Bug 1646266 - Marker Deserialization - r=gregtatum
`DeserializeAfterKindAndStream()` is the main function that extracts all the marker data (past the already-read entry kind), and streams it to JSON using the user-provided `Stream(JSONWriter&, ...)` function in the appropriate marker type definition.

It currently requires two external functions to stream the name and the optional backtrace, because these are different between the two profilers. This may change in the future.

(Deserialization is implemented before serialization, because the `Deserialize()` function is needed during serialization to get a marker type tag.)

Differential Revision: https://phabricator.services.mozilla.com/D87254
2020-09-01 01:37:25 +00:00
Gerald Squelart f3ea5dc029 Bug 1646266 - NoPayload default type, with specialized empty helper - r=gregtatum
`NoPayload` will be mostly used internally when adding markers without payload data.
It has an empty specialization of the MarkerTypeHelper (mainly to catch misuses), and the add-marker code will need to have different compile-time paths to handle it.

Differential Revision: https://phabricator.services.mozilla.com/D87252
2020-09-01 01:37:20 +00:00
Gerald Squelart 0338f0c407 Bug 1646266 - Rework backtrace-capture functions - r=gregtatum
`profiler_capture_backtrace(ProfileChunkedBuffer&)` renamed to `profiler_capture_backtrace_into(ProfileChunkedBuffer&)` (notice "_into"), which is clearer.

New function `profiler_capture_backtrace()` creates a buffer, uses `profiler_capture_backtrace_into()`, and returns a `UniquePtr<ProfileChunkedBuffer>`, which can later be given to `MarkerStack::TakeBacktrace`.

`profiler_get_backtrace()` (returning a `UniqueProfilerBacktrace`) now uses `profiler_capture_backtrace()`.

This patch reduces most duplicate code between these functions.

Differential Revision: https://phabricator.services.mozilla.com/D88280
2020-09-01 01:34:17 +00:00
Gerald Squelart 718ef431b3 Bug 1646266 - Marker option: MarkerTiming - r=gregtatum
This moves the existing MarkerTiming class introduced in bug 1640969 to the BaseProfilerMarkersPrerequesites.h header, and can be used as a marker option.

Some minor clarifying changes:
- `Instant()` is split into two functions: `InstantNow()` and `InstantAt(TimeStamp)`.
- `Interval(TimeStamp, TimeStamp)` must be given both start and end, otherwise `IntervalUntilNowFrom(TimeStamp)` takes the start only and ends "now".

Also the default construction is now reserved for internal marker usage, the private member function `IsUnspecified()` will be used by the add-marker code will replace it with `InstantNow()`.

The serialization contains the phase, and only one or two timestamps as needed, to save space for non-interval timings.

Differential Revision: https://phabricator.services.mozilla.com/D87245
2020-09-01 01:33:26 +00:00
Gerald Squelart 56dc2f7c14 Bug 1646266 - CorePS buffer access - r=gregtatum
The upcoming profiler-specific add-marker function will need to know which `ProfileChunkedBuffer` to serialize to, `profiler_get_core_buffer()` give access to the profiler's buffer, and `CachedCoreBuffer()` keeps it stored in a function-static object.

Differential Revision: https://phabricator.services.mozilla.com/D87256
2020-09-01 01:32:13 +00:00
Gerald Squelart 80e6ec3baf Bug 1646266 - ProfilerString{,8,16}View - r=gregtatum
These string views are similar to `std::string_view`, but they are optimized to be serialized in the profiler buffer, and later deserialized and streamed to JSON.
They accept literal strings, and keep them as unowned raw pointers and sizes.
They also accept any substring reference, assuming that they will only be used as parameters during function calls, and therefore the dependent string will live during that call where these `StringView`'s are used.

Internally, they also allow optional string ownership, which is only used during deserialization and streaming.
This is hidden, so that users are not tempted to use potentially expensive string allocations during profiling; it's only used *after* profiling, so it's less of an impact to allocate strings then. (But it could still be optimized later on, as part of bug 1577656.)

Differential Revision: https://phabricator.services.mozilla.com/D87242
2020-09-01 01:31:45 +00:00
Gerald Squelart 5dd7e84aa2 Bug 1646266 - ProfilerMarkers skeleton files - r=gregtatum
This patch introduces all new files that contain the new markers C++ API and implementation.
They are mostly empty at this time, only including each other as eventually needed, and with `#ifdef MOZ_GECKO_PROFILER` guards.

Rough inclusion diagram: (header <-- includer)

    BaseProfilerMarkerPrerequesites.h <-- ProfilerMarkerPrerequesites.h  (Useful types: Input string view, marker options)
                  ^                                    ^
       BaseProfilerMarkerDetail.h     <--    ProfilerMarkerDetail.h      (Implementation details)
                  ^                                    ^
         BaseProfilerMarkers.h        <--      ProfilerMarkers.h         (Main API)
                  ^      ^---------                    ^   ^---------
       BaseProfilerMarkerTypes.h  |   <--    ProfilerMarkerTypes.h   |   (Common marker types)
                  ^         BaseProfiler.h        <--         GeckoProfiler.h  (Existing main profiler headers)

Differential Revision: https://phabricator.services.mozilla.com/D87241
2020-09-01 01:31:17 +00:00
Narcis Beleuzu 6d1bdc6124 Backed out 20 changesets (bug 1646266) for bustages on TestBaseProfiler.cpp . CLOSED TREE
Backed out changeset 0871a6eb61bb (bug 1646266)
Backed out changeset c797da0d5b1b (bug 1646266)
Backed out changeset 5e8954913748 (bug 1646266)
Backed out changeset 9bc0276c9260 (bug 1646266)
Backed out changeset fa6a89f9eba2 (bug 1646266)
Backed out changeset 9a1cd7b6c1ca (bug 1646266)
Backed out changeset d193a9f84702 (bug 1646266)
Backed out changeset ecfc47fc2444 (bug 1646266)
Backed out changeset 7ecc9ee961b6 (bug 1646266)
Backed out changeset e482a2568f27 (bug 1646266)
Backed out changeset 1a17cf6e6b4d (bug 1646266)
Backed out changeset 08dd6220f0dd (bug 1646266)
Backed out changeset 4189499ea599 (bug 1646266)
Backed out changeset df82ad015f84 (bug 1646266)
Backed out changeset 1c1501cfa02b (bug 1646266)
Backed out changeset 9001175e7475 (bug 1646266)
Backed out changeset c25cdf173894 (bug 1646266)
Backed out changeset e01bc772d669 (bug 1646266)
Backed out changeset 35166588a684 (bug 1646266)
Backed out changeset f05f6a52bd7e (bug 1646266)
2020-09-01 03:31:28 +03:00
Gerald Squelart 12fefb1ee0 Bug 1646266 - Profiler Markers 2.0 tests - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D87260
2020-08-31 23:36:11 +00:00
Gerald Squelart c626d815bc Bug 1646266 - {,Base}ProfilerMarkerTypes.h - r=gregtatum
This patch ports existing ProfilerMarkerPayload types to draft struct definitions that may be used with the new markers API.
This is just a starting point, they may be changed later on as needed, see meta-bug 1661394.

Differential Revision: https://phabricator.services.mozilla.com/D87259
2020-08-31 23:35:05 +00:00
Gerald Squelart 680bd83298 Bug 1646266 - {BASE_,}PROFILER_MARKER{,_TEXT} - r=gregtatum
This is the main public marker API:
- `AddMarkerToBuffer` can be used to store a marker to any buffer. This could be useful to code that wants to store markers outside of the default profiler buffers.
- `baseprofiler::AddMarker`/`profiler_add_marker` store a marker in the appropriate profiler buffer.
- BASE_PROFILER_MARKER and PROFILER_MARKER do the same, but are also defined (and empty) when MOZ_GECKO_PROFILER is not #defined.
All these take a name, marker options, a marker type, and the type's expected arguments if any (as expected by the `StreamJSONMarkerData` function).

Extra helpers for the most common types:
- BASE_PROFILER_MARKER_UNTYPED and PROFILER_MARKER_UNTYPED store a marker with no data payload.
- BASE_PROFILER_MARKER_TEXT and PROFILER_MARKER_TEXT store a text marker. `baseprofiler::markers::Text` is an example of how new marker types can be defined.

Differential Revision: https://phabricator.services.mozilla.com/D87257
2020-08-31 23:34:33 +00:00
Gerald Squelart 8d3604614a Bug 1646266 - Marker Deserialization - r=gregtatum
`DeserializeAfterKindAndStream()` is the main function that extracts all the marker data (past the already-read entry kind), and streams it to JSON using the user-provided `Stream(JSONWriter&, ...)` function in the appropriate marker type definition.

It currently requires two external functions to stream the name and the optional backtrace, because these are different between the two profilers. This may change in the future.

(Deserialization is implemented before serialization, because the `Deserialize()` function is needed during serialization to get a marker type tag.)

Differential Revision: https://phabricator.services.mozilla.com/D87254
2020-08-31 23:33:53 +00:00
Gerald Squelart 95eb9ec051 Bug 1646266 - NoPayload default type, with specialized empty helper - r=gregtatum
`NoPayload` will be mostly used internally when adding markers without payload data.
It has an empty specialization of the MarkerTypeHelper (mainly to catch misuses), and the add-marker code will need to have different compile-time paths to handle it.

Differential Revision: https://phabricator.services.mozilla.com/D87252
2020-08-31 23:33:07 +00:00
Gerald Squelart 71abce20e5 Bug 1646266 - Rework backtrace-capture functions - r=gregtatum
`profiler_capture_backtrace(ProfileChunkedBuffer&)` renamed to `profiler_capture_backtrace_into(ProfileChunkedBuffer&)` (notice "_into"), which is clearer.

New function `profiler_capture_backtrace()` creates a buffer, uses `profiler_capture_backtrace_into()`, and returns a `UniquePtr<ProfileChunkedBuffer>`, which can later be given to `MarkerStack::TakeBacktrace`.

`profiler_get_backtrace()` (returning a `UniqueProfilerBacktrace`) now uses `profiler_capture_backtrace()`.

This patch reduces most duplicate code between these functions.

Differential Revision: https://phabricator.services.mozilla.com/D88280
2020-08-31 23:30:53 +00:00
Gerald Squelart 8670e62694 Bug 1646266 - Marker option: MarkerTiming - r=gregtatum
This moves the existing MarkerTiming class introduced in bug 1640969 to the BaseProfilerMarkersPrerequesites.h header, and can be used as a marker option.

Some minor clarifying changes:
- `Instant()` is split into two functions: `InstantNow()` and `InstantAt(TimeStamp)`.
- `Interval(TimeStamp, TimeStamp)` must be given both start and end, otherwise `IntervalUntilNowFrom(TimeStamp)` takes the start only and ends "now".

Also the default construction is now reserved for internal marker usage, the private member function `IsUnspecified()` will be used by the add-marker code will replace it with `InstantNow()`.

The serialization contains the phase, and only one or two timestamps as needed, to save space for non-interval timings.

Differential Revision: https://phabricator.services.mozilla.com/D87245
2020-08-31 23:30:17 +00:00
Gerald Squelart 8ff41618d2 Bug 1646266 - CorePS buffer access - r=gregtatum
The upcoming profiler-specific add-marker function will need to know which `ProfileChunkedBuffer` to serialize to, `profiler_get_core_buffer()` give access to the profiler's buffer, and `CachedCoreBuffer()` keeps it stored in a function-static object.

Differential Revision: https://phabricator.services.mozilla.com/D87256
2020-08-31 23:28:56 +00:00
Gerald Squelart 4e9b0b4d1f Bug 1646266 - ProfilerString{,8,16}View - r=gregtatum
These string views are similar to `std::string_view`, but they are optimized to be serialized in the profiler buffer, and later deserialized and streamed to JSON.
They accept literal strings, and keep them as unowned raw pointers and sizes.
They also accept any substring reference, assuming that they will only be used as parameters during function calls, and therefore the dependent string will live during that call where these `StringView`'s are used.

Internally, they also allow optional string ownership, which is only used during deserialization and streaming.
This is hidden, so that users are not tempted to use potentially expensive string allocations during profiling; it's only used *after* profiling, so it's less of an impact to allocate strings then. (But it could still be optimized later on, as part of bug 1577656.)

Differential Revision: https://phabricator.services.mozilla.com/D87242
2020-08-31 23:28:22 +00:00
Gerald Squelart 3cb4ee0995 Bug 1646266 - ProfilerMarkers skeleton files - r=gregtatum
This patch introduces all new files that contain the new markers C++ API and implementation.
They are mostly empty at this time, only including each other as eventually needed, and with `#ifdef MOZ_GECKO_PROFILER` guards.

Rough inclusion diagram: (header <-- includer)

    BaseProfilerMarkerPrerequesites.h <-- ProfilerMarkerPrerequesites.h  (Useful types: Input string view, marker options)
                  ^                                    ^
       BaseProfilerMarkerDetail.h     <--    ProfilerMarkerDetail.h      (Implementation details)
                  ^                                    ^
         BaseProfilerMarkers.h        <--      ProfilerMarkers.h         (Main API)
                  ^      ^---------                    ^   ^---------
       BaseProfilerMarkerTypes.h  |   <--    ProfilerMarkerTypes.h   |   (Common marker types)
                  ^         BaseProfiler.h        <--         GeckoProfiler.h  (Existing main profiler headers)

Differential Revision: https://phabricator.services.mozilla.com/D87241
2020-08-31 23:27:54 +00:00
Narcis Beleuzu a7cd806311 Backed out 2 changesets (bug 1659530, bug 1657476) for bustages on check.svg. CLOSED TREE
Backed out changeset 761a09f4d153 (bug 1659530)
Backed out changeset c8afdd9434bb (bug 1657476)
2020-09-01 02:30:36 +03:00
Shane Caraveo 6f359e0bea Bug 1659530 skip 3rd party panel when installing recommended addons r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D87326
2020-08-31 21:38:13 +00:00
Mihai Alexandru Michis 6bf176bfa5 Backed out changeset d634c912adcd (bug 1655750) for causing Bug 1662030.
CLOSED TREE
2020-08-31 16:35:11 +03:00
Sylvestre Ledru 0063306864 Bug 1661434 - Add tring to the codespell exclude list
In the doc, we have an example of a regex called
[s]tring
it is confusing for codespell

Differential Revision: https://phabricator.services.mozilla.com/D88806
2020-08-31 12:23:24 +00:00
Sylvestre Ledru 9c192aa9ca Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D88713
2020-08-31 09:23:02 +00:00
Mihai Alexandru Michis 261d01524b Backed out changeset d0f173a90792 (bug 1519636) for causing bustages.
CLOSED TREE
2020-08-31 10:14:58 +03:00
Sylvestre Ledru 939dd426e6 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D88713
2020-08-31 06:51:21 +00:00
Andrew Halberstadt 36bafe8efd Bug 1655750 - [tryselect] Handle --list/edit-presets even on selectors that don't support presets, r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D88645
2020-08-30 17:44:20 +00:00
Ricky Stewart 89acae267e Bug 1661783 - Disable `test_rst.py` on Linux r=ahal
This test begins to fail due to a `pip` installation issue after bug 1660351. It's already disabled on macOS (also due to what the comment says is a `pip` installation issue), so it's very possible the custom `requirements.txt` that this test installs is deficient in some way that surfaces in certain `virtualenv`s under certain circumstances. I can't diagnose the failure, but what I have seen is that bug 1659539 will fix that problem entirely with no extra intervention required, so we should be able to re-enable this for Linux (and maybe macOS as well?) when that patch lands.

Differential Revision: https://phabricator.services.mozilla.com/D88653
2020-08-28 18:57:20 +00:00
Nick Thomas ffceb1c957 Bug 1653476 - import partner repack script into tree and convert to py3, r=aki
Differential Revision: https://phabricator.services.mozilla.com/D88374
2020-08-27 22:19:32 +00:00
Butkovits Atila b8629b8d1e Backed out 9 changesets (bug 1630809, bug 1653476) for Gecko Decision failures. CLOSED TREE
Backed out changeset 02a27bfc76dd (bug 1653476)
Backed out changeset afb5df61943a (bug 1630809)
Backed out changeset 04628c1f98e9 (bug 1630809)
Backed out changeset 4b4d50e0b1bf (bug 1630809)
Backed out changeset 2fa2deb5c993 (bug 1630809)
Backed out changeset d6652114cac3 (bug 1630809)
Backed out changeset ad5e4caa3291 (bug 1630809)
Backed out changeset d3d841cd14f3 (bug 1630809)
Backed out changeset b3746502e227 (bug 1630809)
2020-08-28 01:15:03 +03:00
Nick Thomas 9c0467f88b Bug 1653476 - import partner repack script into tree and convert to py3, r=aki
Differential Revision: https://phabricator.services.mozilla.com/D88374
2020-08-27 14:56:47 +00:00
Emil Farisan 76574f22bf Bug 1657121 - exclude uuid from s3_delete_missing. r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D88282
2020-08-27 20:02:59 +00:00
Gerald Squelart 3cbc9b5572 Bug 1659404 - Fix non-MOZ_GECKO_PROFILER build - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D88375
2020-08-27 14:41:46 +00:00
Keefer Rourke 000d8dcc94 Bug 1660015: Add IOUtils to privileged eslint environment configuration r=barret,zombie
This change makes eslint aware of the global IOUtils interface, such that it
may be used without having to access it from the window or otherwise declaring
the global in a special comment on a file-by-file basis.

Differential Revision: https://phabricator.services.mozilla.com/D87612
2020-08-26 15:31:24 +00:00
Bruno Bartolomasi 3f561dcc33 Bug 1648027 - Add toolkit/components/telemetry/ in the include list of tools/lint/pylint.yml r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D83858
2020-08-26 14:14:47 +00:00
Gerald Squelart 1628f9ba8d Bug 1660177 - Replace SpliceableJSONWriter::Splice(const char*) with better calls where possible - r=canaltinova
In most calls to `SpliceableJSONWriter::Splice(const char*)`:
- The data comes from a `ChunkedJSONWriteFunc` and is copied to a new buffer, which is then copied again through `Write()`. Instead we can copy the data directly from the `ChunkedJSONWriteFunc`; and this is a nice complement to `TakeAndSplice()` below.
- Or the length is already known, so we can pass it to a new `Splice(const char*, size_t)`, which forwards it to `Write(const char*, size_t)`, saving one `strlen` call.

Differential Revision: https://phabricator.services.mozilla.com/D87703
2020-08-26 08:03:20 +00:00
Gerald Squelart af0143531b Bug 1660177 - Clarify accesses to SpliceableChunkedJSONWriter's WriteFunc - r=canaltinova
`SpliceableChunkedJSONWriter::ChunkedWriteFunc` returns a `ChunkedJSONWriteFunc*`, which is never null and is either used to:
1. Copy data.
2. Or take ownership of the chunks.

In the first case, `ChunkedWriteFunc()` now returns a `const ChunkedJSONWriteFunc&` (notice "const &"), so only const members may be used to copy the data.

In the second case, a new function `TakeChunkedWriteFunc()` returns `ChunkedJSONWriteFunc&&` (notice "&&"), so it's clear that its chunks can be taken away. Some `DEBUG` assertions help ensure that it's not used anymore after that.
`TakeAndSplice()` now takes a `ChunkedJSONWriteFunc&&`.

All callers have been updated to the more appropriate functions.

Differential Revision: https://phabricator.services.mozilla.com/D87702
2020-08-26 08:03:17 +00:00
Razvan Maries ff54551a34 Backed out 12 changesets (bug 1660328, bug 1660015, bug 1649595, bug 1649596, bug 1649593, bug 1659176, bug 1659839, bug 1659838, bug 1657663, bug 1657647, bug 1655460) for xpcshell perma failures. CLOSED TREE
Backed out changeset ff95badf90e3 (bug 1660328)
Backed out changeset a92f8525ab6f (bug 1659176)
Backed out changeset 8ca05470a0d5 (bug 1659839)
Backed out changeset 5de389b735d3 (bug 1649596)
Backed out changeset 73bdddd96664 (bug 1649595)
Backed out changeset 59800d609b55 (bug 1659838)
Backed out changeset 8aca41723313 (bug 1649593)
Backed out changeset dc0d90b3e135 (bug 1657647)
Backed out changeset e3dd5b6b4fbd (bug 1657663)
Backed out changeset f9c823fa14ba (bug 1657663)
Backed out changeset a5aecc7a6469 (bug 1655460)
Backed out changeset 21b64ef30e12 (bug 1660015)
2020-08-26 06:35:20 +03:00
Keefer Rourke de9f6fdad8 Bug 1660015: Add IOUtils to privileged eslint environment configuration r=barret,zombie
This change makes eslint aware of the global IOUtils interface, such that it
may be used without having to access it from the window or otherwise declaring
the global in a special comment on a file-by-file basis.

Differential Revision: https://phabricator.services.mozilla.com/D87612
2020-08-24 16:13:01 +00:00
Sylvestre Ledru 18115d5efd Bug 1660615 - Mach doc: sphinx: pass the -T option by default r=firefox-source-docs-reviewers,championshuttler DONTBUILD
It shows exceptions by default:
https://www.sphinx-doc.org/en/master/man/sphinx-build.html#cmdoption-sphinx-build-T

Differential Revision: https://phabricator.services.mozilla.com/D87969
2020-08-23 14:51:51 +00:00
Sylvestre Ledru fee0487d60 Bug 1652286 - Firefox doc: Workaround the BlockingIOError error r=firefox-source-docs-reviewers,championshuttler
Seems the same issue as https://github.com/travis-ci/travis-ci/issues/8920

Differential Revision: https://phabricator.services.mozilla.com/D87952
2020-08-23 08:49:48 +00:00
Sylvestre Ledru da495a5a28 Bug 1660615 - Add a verbose mode for "mach doc" r=firefox-source-docs-reviewers,championshuttler
And show the sphinx arguments

Differential Revision: https://phabricator.services.mozilla.com/D87951
2020-08-23 09:04:26 +00:00
Sylvestre Ledru dcc2514c21 Bug 1660615 - ride along - reformat moztreedocs with black r=firefox-source-docs-reviewers,championshuttler
Differential Revision: https://phabricator.services.mozilla.com/D87950
2020-08-23 08:49:52 +00:00
Sylvestre Ledru 612c02c213 Bug 1658812 - sphinx/autodoc should also ignore tests directory r#?firefox-source-docs-reviewers r=firefox-source-docs-reviewers,ahal
Differential Revision: https://phabricator.services.mozilla.com/D86854
2020-08-22 14:23:47 +00:00
Kershaw Chang b86af334f1 Bug 1652655 - P6: Add test_use_httpssvc.js to exclusion list. CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D87902
2020-08-21 19:33:06 +00:00
Simon Giesecke f77f8fd84c Bug 1659674 - Change BulkWrite to return mozilla::Result. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D87419
2020-08-21 09:54:48 +00:00
DesWurstes 041dc6bfcd Bug 1020254 - PDFParent should set the find clipboard. r=mikedeboer
Differential Revision: https://phabricator.services.mozilla.com/D85140
2020-08-21 07:37:19 +00:00
Razvan Maries ef96306031 Bug 1660288 - Fixing the lint failure. CLOSED TREE 2020-08-20 23:55:09 +03:00
Gijs Kruitbosch 11288fd257 Bug 1660288 - fix python3 errors in the linter's hooks.py tripped when using python3-based mercurial, r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D87800
2020-08-20 20:35:26 +00:00
Emil Farisan e5378efe38 Bug 1658505 - updated links and updated some code blocks. r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D87443
2020-08-19 16:10:37 +00:00
Emil Farisan 1c3c4674f6 Bug 1658505 - added banner in migrated pages and added table. r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D86812
2020-08-19 10:12:39 +00:00
Emil Farisan bfa8dd8228 Bug 1658505 - fix codespell and rst errors and remove unused reference. r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D86810
2020-08-17 12:07:49 +00:00
Emil Farisan 8d75cc29fb Bug 1658505 - added debugging and memory sanitizer pages from MDN to in-tree. r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D86705
2020-08-17 12:07:18 +00:00
Duncan Dean d99484e5ff Bug 1620162 - Upgrade eslint-plugin-jest and fix new lint errors. r=bomsy,Standard8
Currently the `jest/no-standalone-expect` rule needs to be disabled for `jest-in-case` cases blocks as it is not compatible.

Differential Revision: https://phabricator.services.mozilla.com/D87184
2020-08-20 08:52:42 +00:00
Bogdan Tara a904137456 Backed out changeset 0327b662a05f (bug 1659674) for nsStorageStream related central bustage CLOSED TREE 2020-08-20 02:58:41 +03:00
Gerald Squelart 5601ec576f Bug 1659901 - Rework profiler's TLS accesses - r=mstange
To ensure correct usage of TLSs in the profiler, they are now better encapsulated so that:
- init() is called once and its result is cached. (TLSREGISTEREDThread::Init() doesn't need proof of the PSLock, because it's using thread-safe function-static initializers.)
- get() and set() always init() as needed, or in some particular cases strongly assert that init() was successful.

Also, a null-check was missing in profiler_init_threadmanager().

Depends on D87588

Differential Revision: https://phabricator.services.mozilla.com/D87589
2020-08-19 18:26:32 +00:00
Gerald Squelart 2a9a115783 Bug 1657174 - Added more (un)registration TLS assertions - r=mstange
Assertions are also clarified with messages, to better distinguish the same tests in different locations.

Assertions should now cover all cases:
- NEW: After registering a thread in the profiler with `CorePS::AppendRegisteredThread`, the TLS should be set to that thread.
- NEW: If `profiler_register_thread` is called again, the TLS should still be set to that thread.
- When `profiler_unregister_thread` is first called, the TLS should still be set to that thread (that's the assertion currently trigering this bug 1657174),
- NEW: When `profiler_unregister_thread` is first called and after we remove the thread with `CorePS::RemoveRegisteredThread`, the TLS should now be null.
- If `profiler_unregister_thread` is called again (or with a never-registered thread), the TLS should be null.

This is a further exploratory patch for bug 1657174, this will not prevent crashes, but hopefully it should give a bit more information, at least a smaller range in which the possible presumed registration/TLS race happens.

Differential Revision: https://phabricator.services.mozilla.com/D87588
2020-08-19 17:49:12 +00:00
Simon Giesecke 9352526320 Bug 1659674 - Change BulkWrite to return mozilla::Result. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D87419
2020-08-19 14:39:03 +00:00
Florian Quèze 918620c7cc Bug 1659771 - Remove obsolete nsIProfiler.AddMarker API, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D87470
2020-08-18 22:52:55 +00:00
Sonia Singla 5f5c9fd7f2 Bug 1659267 - Remove usages of -moz-user-select across the Firefox codebase. r=emilio,marionette-reviewers,geckoview-reviewers,preferences-reviewers,whimboo,agi
Differential Revision: https://phabricator.services.mozilla.com/D87499
2020-08-18 23:37:51 +00:00
Ricky Stewart 1218762d08 Bug 1659575 - Delete `mach python-safety` r=ahal
There are zero uses of this `mach` command over the past 90 days according to our telemetry. There are no external references to `mach python-safety` in-tree, and indeed if you track the history of the originating bug 1468394, it appears that once the `mach` command was created, none of the follow-up work that was discussed (i.e. running this in CI and triaging failures to appropriate owners) was done over the following 2 years.

If this ever does appear to be useful in the future, we can just resurrect this code from source control.

Differential Revision: https://phabricator.services.mozilla.com/D87351
2020-08-18 14:18:24 +00:00
Nazım Can Altınova 8fbf2fb2ca Bug 1659103 - Start JVM profiler before loading of libxul and mozglue r=geckoview-reviewers,julienw,snorp
Before this patch, we were always waiting for libxul to load because we were
starting the JVM from libxul. But we needed to start this a lot earlier. Also
thinking that JVM profiler can actually run without the gecko side, we can
start this a lot earlier than we currently start. We need to check the
environmnet variables to be able to start the profiler. It looks like the best
place to do it is inside the GeckoThread.run method.

We have also a similar code for Java debugger, with maybeWaitForJavaDebugger
name. This fucntion does similar things in terms of enviromnent variable
handling.

Differential Revision: https://phabricator.services.mozilla.com/D87069
2020-08-18 12:57:22 +00:00
Andrew Halberstadt 456d9a582f Bug 1655107 - [moztreedocs] Use pip-tools rather than pipenv to manage doc dependencies r=championshuttler,sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D85048
2020-08-17 17:46:23 +00:00
Andrew Halberstadt 9acf8feccb Bug 1659466 - [docs] Don't set up redirects for try pushes, r=firefox-source-docs-reviewers,sylvestre,championshuttler
Differential Revision: https://phabricator.services.mozilla.com/D87286
2020-08-17 17:24:54 +00:00
Bogdan Tara 42af559fd1 Backed out changeset 6124d9a5422b (bug 1655107) for pip related failures CLOSED TREE 2020-08-17 17:32:40 +03:00
Andrew Halberstadt b5d2c40afa Bug 1655107 - [moztreedocs] Use pip-tools rather than pipenv to manage doc dependencies r=championshuttler,sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D85048
2020-08-17 14:07:35 +00:00
Gerald Squelart 2ae86bbfac Bug 1658232 - profiler_capture_backtrace(ProfileChunkedBuffer&) - r=canaltinova
The stack sampling can be abstracted to only use a reference to a `ProfileBuffer`, and the existing `locked_profiler_get_backtrace` can provide its stack-based `ProfileBuffer` that points at a heap-based `ProfileChunkedBuffer` (the one that will be stored in the returned `ProfilerBacktrace`).

And we can now add a public `profiler_capture_backtrace` that only takes a reference to a `ProfileChunkedBuffer`, and fills it with a backtrace.
This will be used by the new marker API, to optionally capture a backtrace in stack-based buffers at the user's request.

Differential Revision: https://phabricator.services.mozilla.com/D86514
2020-08-13 03:30:58 +00:00
Gerald Squelart d9705556b1 Bug 1658232 - Use a temporary ProfileBuffer in locked_profiler_get_backtrace - r=gregtatum
A heap-allocate ProfileBuffer is not really needed, so it's more efficient to have one on the stack during capture, and we don't need to keep it in the `ProfilerBacktrace`.

Differential Revision: https://phabricator.services.mozilla.com/D86513
2020-08-13 03:30:30 +00:00
Gerald Squelart b2df384fc7 Bug 1658232 - ProfilerBacktrace can reference or own a ProfileBuffer and/or ProfileChunkedBuffer - r=canaltinova,gregtatum
Instead of always taking ownership of both heap-allocated `ProfileBuffer` and `ProfileChunkedBuffer`, `ProfilerBacktrace` can now accept:
- Unique pointers to both or either, similar to what it was before, so a ProfilerBacktrace can be kept for later use.
- Non-owning pointers to both or either, to allow callers to use stack-based buffer(s); null pointers are allowed for totally empty backtraces.

Only the `ProfileChunkedBuffer` contains the actual data, we can create a `ProfileBuffer` on the spot if not provided.

Differential Revision: https://phabricator.services.mozilla.com/D86512
2020-08-13 03:30:02 +00:00
Gerald Squelart d4fa7a1fda Bug 1658232 - Use std::string for ProfilerBacktrace::mName - r=gregtatum
Instead of keeping a pointer to a null-terminated string, it's simpler to keep a proper `std::string`, and it helps to keep the length ready for streaming.

Differential Revision: https://phabricator.services.mozilla.com/D86511
2020-08-13 03:29:34 +00:00
Gerald Squelart ab7dd1effd Bug 1658232 - ProfileBuffer::UnderlyingChunkedBuffer() - r=gregtatum
Let `ProfilerBuffer` expose its underlying `ProfileChunkedBuffer`, this will be useful when `ProfilerBacktrace` will only be given a `ProfileBuffer`, and to perform some safety checks.

As a bonus from this change, `StoreMarker()` can be made non-generic -- It was relying on both `ProfileBuffer` and `ProfileChunkedBuffer` to have the same function `PutObjects()`. Consequently, we don't need `ProfileBuffer::PutObjects()` anymore, this removes this clunky pass-through (but useful and the best solution at the time).

Differential Revision: https://phabricator.services.mozilla.com/D86510
2020-08-13 03:29:06 +00:00
Gerald Squelart accd288dcf Bug 1658232 - Don't make ~ProfileBuffer() erase the ProfileChunkedBuffer - r=gregtatum
Until now the `ProfileBuffer` would erase its attached `ProfileChunkedBuffer` upon destruction.
However:
- The main `ProfileChunkedBuffer` is erased anyway in the `ActivePS`,
- Other `ProfileChunkedBuffer`s are short-lived and don't really need to be erased.
- The upcoming changes to `ProfilerBacktrace` and its users means that we will only keep the `ProfileChunkedBuffer` as backtrace storage, a `ProfileBuffer` will only be needed during capture and then when streaming to JSON; so we don't want the `ProfileChunkedBuffer` to be erased when detached from its capturing `ProfileBuffer`.
- Also, the erasing was done by `ResetChunkManager()` in `~ProfileBuffer()`, which was asymetric with what the constructor does (nothing!). So it's better to leave whoever did the `SetChunkManager()` to deal with the corresponding `ResetChunkManager()` (in the main case `ActivePS`, otherwise short-lived buffers being destroyed at the end of their scope).

Both `ProfileBuffer` destructors were only doing this operation, so we can just remove them completely.

Differential Revision: https://phabricator.services.mozilla.com/D86509
2020-08-13 03:28:38 +00:00
Gerald Squelart 3f131cf7b3 Bug 1658232 - ProfileBufferEntryKinds.h - r=gregtatum
Backtraces and other marker data will be stored directly into a ProfileChunkedBuffer from public code in both profilers, so we will need to have the entry "kinds" available outside of the profiler directories.
This also helps with de-duplicating, since the kinds will now be in one spot and shared by both profilers.

Differential Revision: https://phabricator.services.mozilla.com/D86508
2020-08-13 03:28:11 +00:00
Gerald Squelart 5d1e58c441 Bug 1658232 - ns...Strings are now serialized with their length instead of the number of bytes - r=gregtatum
While working on this bug, I found it distracting to reason about how strings (of different char types) are stored in the profile buffer.
So instead of storing the size in bytes, I think it's better to store the string length in number of characters, in particular it matches lengths as handled by string types.

Differential Revision: https://phabricator.services.mozilla.com/D86507
2020-08-13 03:27:42 +00:00
Nazım Can Altınova 5b42e2f322 Bug 1658708 - Do not create a MarkerTiming when profiler is not active. r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D86807
2020-08-12 14:38:44 +00:00