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

2643 Коммитов

Автор SHA1 Сообщение Дата
Yannis Juglaret fe80a53950 Bug 1766432 - Part 1: Use a custom definition for PROCESS_MITIGATION_DYNAMIC_CODE_POLICY in MinGW builds. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D157903
2022-09-29 15:29:14 +00:00
Mike Hommey f9a559f1ed Bug 1789507 - Update builders to rustc 1.64. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D157896
2022-09-22 20:51:26 +00:00
Gerald Squelart 92a9be7744 Bug 1774773 - Added atomic locking around marker schema functions - r=florian
To avoid real or apparent races to the list of marker schema functions, some
bits of the atomic count are used to effectively implement a RWLock, so that
any number of threads can add their own new marker schema concurrently, while
the profile-capture reading of the whole list can only be done on its own.

Differential Revision: https://phabricator.services.mozilla.com/D157310
2022-09-15 03:39:00 +00:00
Gerald Squelart 14f77ee12e Bug 1612799 - Make UniqueJSONStrings operations fallible - r=canaltinova
When something goes wrong, the most likely cause is running out of memory, so
we clear our data to try and free some memory ASAP, to hopefully reduce the
likelihood of a terminating OOM elsewhere.

Differential Revision: https://phabricator.services.mozilla.com/D155653
2022-09-05 01:19:29 +00:00
Gerald Squelart 7dc3f8d14e Bug 1612799 - Make UniqueJSONStrings a FailureLatch - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D155652
2022-09-05 01:19:29 +00:00
Gerald Squelart 1339f652fd Bug 1612799 - Make Spliceable{,Chunked}JSONWriter a FailureLatch - r=canaltinova
For now, all users specify an infallible latch.

Differential Revision: https://phabricator.services.mozilla.com/D155651
2022-09-05 01:19:28 +00:00
Gerald Squelart 1d441558f5 Bug 1612799 - Refactor SpliceableChunkedJSONWriter's access to its ChunkedJSONWriteFunc - r=canaltinova
Instead of redundantly explaining each `static_cast` in different
SpliceableChunkedJSONWriter functions, safe accesses are now isolated to only
two functions, making the public function implementations simpler, including
changes in the following patch.

Differential Revision: https://phabricator.services.mozilla.com/D155650
2022-09-05 01:19:28 +00:00
Gerald Squelart cc671ebfb1 Bug 1612799 - Make ChunkedJSONWriteFunc a FailureLatch, with optionally-fallible operations - r=canaltinova
Note that at this point, it's using the FailureLatchInfallibleSource singleton,
so operations are still effectively infallible, i.e. they will terminate the
program.
But users already handle future fallible outcomes.

Differential Revision: https://phabricator.services.mozilla.com/D155649
2022-09-05 01:19:28 +00:00
Gerald Squelart 9c971ec78d Bug 1612799 - Add default initializers for ChunkedJSONWriteFunc member variables - r=canaltinova
This removes some redundant initializers in constructors (present and future).

Also some [[nodiscard]]s were added where appropriate, and empty lines for
clarity.

Differential Revision: https://phabricator.services.mozilla.com/D155648
2022-09-05 01:19:27 +00:00
Gerald Squelart de815dbad9 Bug 1612799 - FailureLatch - r=canaltinova
The FailureLatch interface, and some implementation helpers and classes, will
be used to record the first failure (if any) during some long process.

Differential Revision: https://phabricator.services.mozilla.com/D155647
2022-09-05 01:19:27 +00:00
Gerald Squelart 90b45a2617 Bug 1785745 - Make UniqueStack::mUniqueStrings and mCodeAddressService private - r=canaltinova
This makes it easier to understand how these are actually used, and constrain
these uses as intended.

Differential Revision: https://phabricator.services.mozilla.com/D154960
2022-08-22 21:31:48 +00:00
Gerald Squelart bb96954e6d Bug 1785741 - Remove unused profiler_get_profile_json_into_lazily_allocated_buffer - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D154954
2022-08-18 22:26:09 +00:00
Gerald Squelart 42904cee2c Bug 1784812 - Make all JSONWriteFunc-derived classes and their overriden methods final - r=canaltinova
All JSONWriteFuncs are effectively final, this patch enforces that, hopefully
helping the compiler to de-virtualize some calls.

Differential Revision: https://phabricator.services.mozilla.com/D154619
2022-08-17 07:07:54 +00:00
Gerald Squelart 4326b92ea7 Bug 1784812 - Use common JSONWriteFuncs when writing to a string - r=canaltinova,media-playback-reviewers,alwu
Most users of JSONWriter want to fill a string, so instead of having all these
similar implementations, we now have central reusable implementations:
- JSONStringWriteFunc contains a string and writes to it.
- JSONStringRefWriteFunc references a string and writes to it. This is most
  useful when the string already exists somewhere, or needs to be returned from
  a function (so we avoid another conversion when returning).

Differential Revision: https://phabricator.services.mozilla.com/D154618
2022-08-17 07:07:54 +00:00
Gerald Squelart eb90b3b175 Bug 1784812 - JSONWriter may optionally not own its writer - r=canaltinova
mWriter is now a reference, and the ownership is optional through a separate
member variable that could stay null.
User can now choose to keep the JSONWriteFunc on their stack, which saves a
heap allocation, and makes it easier to access the concrete JSONWriteFunc
implementation directly (instead of through WriteFunc()).

Differential Revision: https://phabricator.services.mozilla.com/D154617
2022-08-17 07:07:53 +00:00
Gerald Squelart 24798f281f Bug 1784812 - JSONWriter::WriteFunc() returns a reference - r=canaltinova
mWriter is never null (and lots of calls just dereference it without checking),
so we may as well enforce it:
- The constructor MOZ_RELEASE_ASSERTs that it's not null.
- The accessor WriteFunc() returns a reference instead of a scary raw pointer.

(Note that we can't make mWriter a NotNull<...>, because the next patch will
give the option to keep that owning pointer null.)

Differential Revision: https://phabricator.services.mozilla.com/D154616
2022-08-17 07:07:53 +00:00
Iulian Moraru 859487ba6b Backed out 4 changesets (bug 1784812) for causing build bustages on DDMediaLogs. CLOSED TREE
Backed out changeset c9998c927079 (bug 1784812)
Backed out changeset d2568bc2f8a6 (bug 1784812)
Backed out changeset 9f01bf89c583 (bug 1784812)
Backed out changeset d8506496d8f2 (bug 1784812)
2022-08-17 05:48:36 +03:00
Gerald Squelart d7c05cb55e Bug 1784812 - Make all JSONWriteFunc-derived classes and their overriden methods final - r=canaltinova
All JSONWriteFuncs are effectively final, this patch enforces that, hopefully
helping the compiler to de-virtualize some calls.

Depends on D154618

Differential Revision: https://phabricator.services.mozilla.com/D154619
2022-08-16 22:57:50 +00:00
Gerald Squelart 253bb5dc48 Bug 1784812 - Use common JSONWriteFuncs when writing to a string - r=canaltinova,media-playback-reviewers,alwu
Most users of JSONWriter want to fill a string, so instead of having all these
similar implementations, we now have central reusable implementations:
- JSONStringWriteFunc contains a string and writes to it.
- JSONStringRefWriteFunc references a string and writes to it. This is most
  useful when the string already exists somewhere, or needs to be returned from
  a function (so we avoid another conversion when returning).

Depends on D154617

Differential Revision: https://phabricator.services.mozilla.com/D154618
2022-08-16 22:57:49 +00:00
Gerald Squelart 722fbce3cc Bug 1784812 - JSONWriter may optionally not own its writer - r=canaltinova
mWriter is now a reference, and the ownership is optional through a separate
member variable that could stay null.
User can now choose to keep the JSONWriteFunc on their stack, which saves a
heap allocation, and makes it easier to access the concrete JSONWriteFunc
implementation directly (instead of through WriteFunc()).

Depends on D154616

Differential Revision: https://phabricator.services.mozilla.com/D154617
2022-08-16 22:57:49 +00:00
Gerald Squelart 68a8dee9cc Bug 1784812 - JSONWriter::WriteFunc() returns a reference - r=canaltinova
mWriter is never null (and lots of calls just dereference it without checking),
so we may as well enforce it:
- The constructor MOZ_RELEASE_ASSERTs that it's not null.
- The accessor WriteFunc() returns a reference instead of a scary raw pointer.

(Note that we can't make mWriter a NotNull<...>, because the next patch will
give the option to keep that owning pointer null.)

Differential Revision: https://phabricator.services.mozilla.com/D154616
2022-08-16 22:57:48 +00:00
Gerald Squelart 6cd5fee5d2 Bug 1571089 - Remove the "leaf" profiler feature - r=canaltinova
We currently support stack walking everywhere, and when it fails, we fall back
to leaf stacks. The leaf option is a bit confusing in how it works, and doesn't
provide much value.

Differential Revision: https://phabricator.services.mozilla.com/D153695
2022-08-08 12:29:43 +00:00
Bob Owen 4261f121bf Bug 1783189: Remove setting of WER_FAULT_REPORTING_DISABLE_SNAPSHOT_HANG flag in RegisterRuntimeExceptionModule. r=gsvelto
Hangs are now filtered out in the module itself, so this is no longer required
and didn't appear to work as hoped anyway.

Differential Revision: https://phabricator.services.mozilla.com/D153751
2022-08-08 12:05:00 +00:00
Butkovits Atila 1a455850f9 Backed out changeset 523ef50a4e16 (bug 1571089) for causing xpcshell failures at test_ext_geckoProfiler_schema.js. CLOSED TREE 2022-08-08 13:21:54 +03:00
Gerald Squelart 24f16538a9 Bug 1571089 - Remove the "leaf" profiler feature - r=canaltinova
We currently support stack walking everywhere, and when it fails, we fall back
to leaf stacks. The leaf option is a bit confusing in how it works, and doesn't
provide much value.

Differential Revision: https://phabricator.services.mozilla.com/D153695
2022-08-08 08:43:43 +00:00
Gerald Squelart f91d94a4c9 Bug 1777431 - Use the same default constants in both profilers - r=florian
The BASE_PROFILER_DEFAULT_...ENTRIES constants in BaseProfiler.h were smaller
than those in ProfilerControl.h, leading to a shorter profiling range in the
parent process!
Now these constants and some other shared ones are only defined in
BaseProfiler.h, and reused in ProfilerControl.h.

PROFILER_DEFAULT_DURATION was moved to where it's first used, and should one
day disappear (see bug 1632365).

Differential Revision: https://phabricator.services.mozilla.com/D153669
2022-08-04 13:59:50 +00:00
Fabrice Desré c50cb528fc Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-03 16:39:41 +00:00
Andreea Pavel 3ccd75af8d Backed out changeset b9d2965591b9 (bug 1761040) for landing with wrong author CLOSED TREE DONTBUILD 2022-08-03 18:55:00 +03:00
Andreea Pavel fdb7cb2ecd Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-03 15:27:43 +00:00
Bob Owen f29f23d58b Bug 1682520 p2: Register the WER Runtime Exception Module very early in process start up. r=gsvelto,glandium
Depends on D152198

Differential Revision: https://phabricator.services.mozilla.com/D152199
2022-08-02 10:41:14 +00:00
Bob Owen d6333678d8 Bug 1682520 p1: Move GeckoProcessType and implementation of get and set into mozglue. r=glandium
This means we can set and use the process type earlier in process startup.

Differential Revision: https://phabricator.services.mozilla.com/D152198
2022-08-02 10:41:14 +00:00
Andreea Pavel 89d63c91e6 Backed out changeset a907159a482f (bug 1761040) for causing build bustages on a CLOSED TREE 2022-08-02 04:59:08 +03:00
Fabrice Desré 0f4ac7ad97 Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-02 00:49:41 +00:00
Doug Thayer 3190cfbe61 Bug 1782141 - Replace explicit unaligned load with implicit r=iain
This should result in the same binary. Tested on Godbolt and both Clang
and GCC produced identical code here.

Differential Revision: https://phabricator.services.mozilla.com/D153265
2022-08-01 16:40:57 +00:00
Doug Thayer a104274600 Bug 1782141 - Move SIMD/SSE files to mozglue r=iain
Differential Revision: https://phabricator.services.mozilla.com/D153264
2022-08-01 16:40:57 +00:00
Cristian Tuns c555cec677 Backed out 2 changesets (bug 1782141) for causing spidermonkey bustages on dependent.js CLOSED TREE
Backed out changeset 81b72f893608 (bug 1782141)
Backed out changeset bd07c6d3d9fe (bug 1782141)
2022-07-29 23:52:46 -04:00
Doug Thayer 5118e12c14 Bug 1782141 - Replace explicit unaligned load with implicit r=iain
This should result in the same binary. Tested on Godbolt and both Clang
and GCC produced identical code here.

Differential Revision: https://phabricator.services.mozilla.com/D153265
2022-07-30 03:26:45 +00:00
Doug Thayer 2f04b79528 Bug 1782141 - Move SIMD/SSE files to mozglue r=iain
Differential Revision: https://phabricator.services.mozilla.com/D153264
2022-07-30 03:26:44 +00:00
Cristian Tuns 85e845a6dc Backed out 2 changesets (bug 1682520) for causing build bustages on ProcessType.h CLOSED TREE
Backed out changeset 679e19334225 (bug 1682520)
Backed out changeset dad72c7e0d7b (bug 1682520)
2022-07-29 17:04:49 -04:00
Bob Owen edb40ba976 Bug 1682520 p2: Register the WER Runtime Exception Module very early in process start up. r=gsvelto,glandium
Depends on D152198

Differential Revision: https://phabricator.services.mozilla.com/D152199
2022-07-29 18:10:54 +00:00
Bob Owen cf59d0973b Bug 1682520 p1: Move GeckoProcessType and implementation of get and set into separate files. r=glandium
This means we can include these files in other binaries when we need earlier
access to the process type and use consistent code.

Differential Revision: https://phabricator.services.mozilla.com/D152198
2022-07-29 18:10:53 +00:00
Gerald Squelart ad5e9a2a05 Bug 1774329 - Remove JSONWriter style specifications from profiler code - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D152609
2022-07-28 12:41:57 +00:00
Gerald Squelart 6c8084d9e7 Bug 1774329 - Remove now-ignored style parameters in ProfileJSONWriter functions - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D152608
2022-07-28 12:41:56 +00:00
Gerald Squelart d4726a9eca Bug 1774329 - If SingleLineStyle is set at construction, also remove spaces after colons and commas - r=florian
These were the last remaining JSON whitespace characters, so we can now our
regression tests can check that there are non of these left.

Differential Revision: https://phabricator.services.mozilla.com/D152607
2022-07-28 12:41:56 +00:00
Gerald Squelart dab57bac1d Bug 1774329 - Make BaseProfileJSONWriter single-lined - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D152603
2022-07-28 12:41:54 +00:00
Jan de Mooij 4606b0a55c Bug 1780383 - Add profiler sub-category for Wasm frames. r=gerald,rhunt
Differential Revision: https://phabricator.services.mozilla.com/D152272
2022-07-21 06:52:44 +00:00
Jan de Mooij f18ab02529 Bug 1780091 - Use LR register value in the profiler in Mac/Windows ARM64 builds. r=mstange
The Wasm profiling frame iterator uses the return address in the LR register when
interrupting during the prologue. The Linux/Android code was correctly initializing it,
but on Mac and Windows we always used 0.

Differential Revision: https://phabricator.services.mozilla.com/D152268
2022-07-21 06:12:36 +00:00
Gerald Squelart 65ed91b027 Bug 1779685 - Factor ChunkedJSONWriteFunc::Length() out of CopyDataIntoLazilyAllocatedBuffer() - r=florian
This will be useful to see how big profiles get during gathering, and
potentially to avoid making them too big if possible.

Differential Revision: https://phabricator.services.mozilla.com/D151901
2022-07-20 12:52:57 +00:00
Doug Thayer 67331b011d Bug 1776013 - Add SIMD memchr-like implementations to MFBT r=iain
Differential Revision: https://phabricator.services.mozilla.com/D150067
2022-07-14 18:30:27 +00:00
Norisz Fay 9112cf321e Backed out 2 changesets (bug 1776013) for causing spidermonkey bustages on SIMD.cpp CLOSED TREE
Backed out changeset bb467568da37 (bug 1776013)
Backed out changeset 9669cd465518 (bug 1776013)
2022-07-14 03:53:22 +03:00