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

8437 Коммитов

Автор SHA1 Сообщение Дата
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
Sylvestre Ledru 5ea6c250c3 Bug 1657926 - firefox doc: fix some warnings r=championshuttler
Differential Revision: https://phabricator.services.mozilla.com/D86732
2020-08-11 23:20:25 +00:00
Ricky Stewart cd9a620ede Bug 1657954 - Move various branding options from `old-configure` r=geckoview-reviewers,mhentges,nalexander,snorp
Differential Revision: https://phabricator.services.mozilla.com/D86391
2020-08-11 15:58:52 +00:00
Sylvestre Ledru 1bcabb9d34 Bug 1657926 - Move to sphinx 3.1.2 and sphinx-js 3.0.1 r=championshuttler
Hopefully, it will help with the intermittent issues.
And it seems that the warnings are better presented.

Differential Revision: https://phabricator.services.mozilla.com/D86361
2020-08-11 15:26:16 +00:00
Nathan Froyd 3c32012822 Bug 1658375 - add support for arm64 macOS to profiler sampling and unwinding; r=mstange
The registers referenced in this patch and the assembly have been tested to
compile; the code changes have not been tested to actually work.

Differential Revision: https://phabricator.services.mozilla.com/D86612
2020-08-11 14:09:20 +00:00
Nathan Froyd 7951ffdf2e Bug 1658375 - define platform macros for arm64 macOS in the profiler; r=mstange
This change doesn't resolve some of the issues in profiler code that have
x86-64-isms in them, but this is at least a start.

Differential Revision: https://phabricator.services.mozilla.com/D86595
2020-08-10 22:02:27 +00:00
Michael Hoffmann 6de2904eeb Bug 1553421 - Add request method to network markers r=necko-reviewers,gerald,valentin
Differential Revision: https://phabricator.services.mozilla.com/D85878
2020-08-10 06:33:22 +00:00
Gerald Squelart 9aec647e21 Bug 1658230 - Renamed SpliceableChunkedJSONWriter::WriteFunc to ChunkedWriteFunc - r=gregtatum
SpliceableChunkedJSONWriter::WriteFunc was hiding base-class non-virtual JSONWriter::WriteFunc(), which made it less than ideal (for me) to reason with.

Also made a few subclasses final, to help with possible devirtualization.

Differential Revision: https://phabricator.services.mozilla.com/D86505
2020-08-11 03:51:33 +00:00
Gerald Squelart cc6cde66ad Bug 1658230 - Deduplicate ProfileJSONWriter classes - r=gregtatum
The main change is removing ProfileJSONWriter.cpp, making ProfileJSONWriter.h point at BaseProfileJSONWriter.h, and exposing `mozilla::baseprofiler::` classes in the top namespace as expected by users of ProfileJSONWriter.h (to minimize changes).

These two headers are now always present in the "mozilla" include directory, independent of MOZ_GECKO_PROFILER settings.

The rest is just needed tweaks to match the above changes.

Differential Revision: https://phabricator.services.mozilla.com/D86504
2020-08-11 03:50:54 +00:00
emcminn 037a8e97b9 Bug 1656048 - Remove linter exception for newtab re: whitelist/blacklist, and fix errors r=andreio
Differential Revision: https://phabricator.services.mozilla.com/D85931
2020-08-10 16:47:39 +00:00
Andrew Halberstadt 9fb7a14b52 Bug 1654937 - [lint] Fix test_flake8.py::test_lint_excluded_file on Windows, r=linter-reviewers,sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D86411
2020-08-10 09:37:29 +00:00
Mike Hommey 527e667296 Bug 1537703 - Use llvm-rc instead of rc.exe. r=mhentges,froydnj
This makes us use one less tool from MSVC, and removes one more use of wine
in cross builds.

We replace the call to either rc/llvm-rc or windres with a wrapper script.
While the script is not strictly needed for the latter, we use a wrapper
in that case anyway because it's one step towards fixing bug 1498414.
For llvm-rc, however, we need a wrapper because llvm-rc doesn't preprocess
on its own, so the wrapper does that too.

The wrapper script also allows to deal with the default flags passed to
llvm-rc or windres, rather than inherit them from old-configure.

We also need to explicitly pass the codepage to llvm-rc, which was not
necessary with rc (presumably, llvm-rc has a different default).

While here, remove the unused WINDRES subst from js/src/old-configure.in.
Also, while here, we remove --use-temp-file, because as described in the
linked bug and in the windres manual page, it was used to work around bugs
on Windows 98 and earlier.

Differential Revision: https://phabricator.services.mozilla.com/D86312
2020-08-08 21:02:04 +00:00
Andreea Pavel aed7669de9 Bug 1654648 - fix whitespace linting failure r=test-only 2020-08-08 07:14:40 +03:00
Evan Welsh 2e8ba0e06f Bug 1654696 - Implement code coverage JSAPI. r=nbp,jwalden
Differential Revision: https://phabricator.services.mozilla.com/D85808
2020-08-08 03:23:31 +00:00
Ricky Stewart 31755b431d Bug 1657650 - Require that Mach command providers subclass MachCommandBase. r=remote-protocol-reviewers,marionette-reviewers,maja_zf,mhentges,froydnj
Today we don't require that `mach` `CommandProvider`s subclass from any particular parent class and we're very lax about the requirements they must meet. While that's convenient in certain circumstances, it has some unfortunate implications for feature development.

Today the only requirements that we have for `CommandProvider`s are that they have an `__init__()` method that takes either 1 or 2 arguments, the second of which must be called `context` and is populated with the `mach` `CommandContext`. Again, while this flexibility is occasionally convenient, it is limiting. As we add features to `mach`, having a better idea what the shape of our `CommandProvider`s are and how we can instantiate them and use them is increasingly important, and this gives us additional control when having `mach` configure `CommandProvider`s based on data that is only available at the `mach` level. In particular, we plan to leverage this in bugs 985141 and 1654074.

Here we add validation to the `CommandProvider` decorator to ensure all classes inherit from `MachCommandBase`, update all `CommandProvider`s in-tree to inherit from `MachCommandBase`, and update source and test code accordingly.

Follow-up work: we now require (de facto) that the `context` be populated with a `topdir` attribute by the `populate_context_handler` function, since instantiating the `MachCommandBase` requires a `topdir` be provided. This is fine for now in the interest of keeping this patch reasonably sized, but some additional refactoring could make this cleaner.

Differential Revision: https://phabricator.services.mozilla.com/D86255
2020-08-07 18:24:59 +00:00
Ricky Stewart 3ddb065650 Bug 1656611 - Remove `objdir` support from `virtualenv_packages.txt` handling r=mhentges,froydnj
I noticed that the `objdir:build` entry in `build/virtualenv_packages.txt` entry was apparently unused. This originates from bug 841713, seven years ago, when the `objdir` handling was introduced. Today, this doesn't appear to be serving a purpose. There is no Python library in my `$objdir/build` directory; nor can I see anything in `build/moz.build` or any related files suggesting one could ever appear. I can only assume this feature has outlived its usefulness, so delete it and the relevant in-tree support.

This necessitates slightly changing the signature and implementation of the `activate_pipenv()` method; also update all callers.

Differential Revision: https://phabricator.services.mozilla.com/D85635
2020-08-07 16:03:36 +00:00
Bogdan Tara 57ed67928b Backed out changeset 760fc38c793b (bug 1656611) for doc failure complaining about virtualenv_root CLOSED TREE 2020-08-07 18:57:56 +03:00
Ricky Stewart 41e473f17b Bug 1656611 - Remove `objdir` support from `virtualenv_packages.txt` handling r=mhentges,froydnj
I noticed that the `objdir:build` entry in `build/virtualenv_packages.txt` entry was apparently unused. This originates from bug 841713, seven years ago, when the `objdir` handling was introduced. Today, this doesn't appear to be serving a purpose. There is no Python library in my `$objdir/build` directory; nor can I see anything in `build/moz.build` or any related files suggesting one could ever appear. I can only assume this feature has outlived its usefulness, so delete it and the relevant in-tree support.

This necessitates slightly changing the signature and implementation of the `activate_pipenv()` method; also update all callers.

Differential Revision: https://phabricator.services.mozilla.com/D85635
2020-08-06 18:21:35 +00:00
Hamzah 8a86250605 Bug 1408051 - Remove mozharness' copy of virtualenv and use the one under /third_party/python instead r=ahal,rail
Differential Revision: https://phabricator.services.mozilla.com/D83181
2020-08-05 19:52:24 +00:00
Simon Giesecke 1e02318b49 Bug 1653335 - Replace MakeSpan uses by constructor calls. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D83817
2020-08-07 07:49:47 +00:00
Andrew Halberstadt 8733547d93 Bug 1657649 - [ci] Remove the SETA shadow-scheduler, r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D86250
2020-08-06 20:27:26 +00:00
Mike Hommey 22179736a6 Bug 1656141 - Rename version_win.py to create_rc.py. r=firefox-build-system-reviewers,mhentges,rstewart
Because while the original perl script was added to add version info
to Windows binaries, it does more and will do even more with upcoming
changes.

Differential Revision: https://phabricator.services.mozilla.com/D86153
2020-08-06 22:52:01 +00:00
Mihai Alexandru Michis c4e805857f Backed out 9 changesets (bug 1656141) for causing multiple failures.
CLOSED TREE

Backed out changeset 9033b0400339 (bug 1656141)
Backed out changeset e43dd57dc61a (bug 1656141)
Backed out changeset eb450457a9b7 (bug 1656141)
Backed out changeset 194a994cf9c9 (bug 1656141)
Backed out changeset ce6831acb5e3 (bug 1656141)
Backed out changeset 29653ea85d49 (bug 1656141)
Backed out changeset 704f28486bda (bug 1656141)
Backed out changeset de8899453150 (bug 1656141)
Backed out changeset 4b133eda46aa (bug 1656141)
2020-08-07 01:48:45 +03:00
Mike Hommey d6565296c3 Bug 1656141 - Rename version_win.py to create_rc.py. r=firefox-build-system-reviewers,mhentges,rstewart
Because while the original perl script was added to add version info
to Windows binaries, it does more and will do even more with upcoming
changes.

Differential Revision: https://phabricator.services.mozilla.com/D86153
2020-08-06 15:59:09 +00:00
David Major 4950130b02 Bug 1657391 - Update CodeCoverageHandler.cpp for clang-12 r=marco
In clang-12, 5809a32e7c split `__gcov_flush` into `__gcov_dump` and `__gcov_reset`. We have to make a corresponding update in CodeCoverageHandler.cpp to avoid build errors.

Differential Revision: https://phabricator.services.mozilla.com/D86026
2020-08-05 22:00:39 +00:00
Andi-Bogdan Postelnicu 1ead43f591 Bug 1657299 - First step of refactor `static-analysis` integration, making it more modular. r=marco
Add a modular approach for the integration of `static-analysis` module in order
to be able to share components of it with other modules, like the integration of
`clangd` in `vscode` where we need to have access to the configuration of `clang-tidy`
in order to have `in-ide` `static-analysis` messages.
In this initial step we make a separate module for the clang-tidy configuration.

Differential Revision: https://phabricator.services.mozilla.com/D85979
2020-08-06 06:51:16 +00:00
Andi-Bogdan Postelnicu 9e73e83509 Bug 1657301 - Reformat `static-analysis` with `black`. r=sylvestre
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D85985
2020-08-05 13:32:46 +00:00
Gerald Squelart b0647eab4e Bug 1657174 - Added more targeted assertions around multiple thread de-registrations - r=mstange
`MOZ_RELEASE_ASSERT(registeredThread == TLSRegisteredThread::RegisteredThread(lock));` is failing on Android, probably as a follow-up to bug 1651086, which allowed multiple registrations (to fix a problem with yet-unknown root cause).
This assertion is too broad to help find the issue because at this point:
- If `FindCurrentThreadRegisteredThread()` is not null, `TLSRegisteredThread::RegisteredThread()` should also not be null, and it should equal `FindCurrentThreadRegisteredThread()`, from the first succesful `profiler_register_thread()`.
- If `FindCurrentThreadRegisteredThread()` is null, `TLSRegisteredThread::RegisteredThread()` should be null as well, from the first `profiler_unregister_thread()`.

So this patch splits this assertion into multiple more targeted ones to check the above, and also some extra assertions after de-registration, to ensure that both `FindCurrentThreadRegisteredThread()` and `TLSRegisteredThread::RegisteredThread()` are null.

Differential Revision: https://phabricator.services.mozilla.com/D86118
2020-08-06 00:55:20 +00:00