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

711 Коммитов

Автор SHA1 Сообщение Дата
Nazım Can Altınova ee86610605 Bug 1803751 - Make some marker fields searchable and bump the profile version r=julienw
Differential Revision: https://phabricator.services.mozilla.com/D163714
2022-12-13 14:19:07 +00:00
Iulian Moraru e7e2922cb1 Backed out changeset 27f8690ebc50 (bug 1803751) for causing xpcshell failures on test_feature_mainthreadio.js. CLOSED TREE 2022-12-12 17:43:23 +02:00
Nazım Can Altınova 0d5987410a Bug 1803751 - Make some marker fields searchable and bump the profile version r=julienw
Differential Revision: https://phabricator.services.mozilla.com/D163714
2022-12-12 13:11:56 +00:00
Marco Castelluccio 535e7144d1 Bug 1790816 - Reformat mozglue/ with isort. r=linter-reviewers,Standard8 DONTBUILD
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D162663
2022-11-23 13:01:33 +00:00
alwu cb93cefdcc Bug 1800547 - add some profiler markers for media engine playback. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D162055
2022-11-15 18:45:56 +00:00
Michael Comella 10a0137f2e Bug 1798388 - add Accessibility profiler category; convert existing code. r=canaltinova,eeejay
We use profiler categories to separate out the profiler markers for major
components, such as DOM or Layout, to quickly understand what is happening in
each of them: this will also be helpful for accessibility. One might be
concerned that we're adding too many categories but I think it's fine: the
accessibility category shouldn't appear if accessibility services aren't in use.
Furthermore, if accessibility code is running when it's unexpected, having the
accessibility category appear will only highlight that fact.

Differential Revision: https://phabricator.services.mozilla.com/D160846
2022-11-02 16:23:24 +00:00
Nika Layzell f8e46f7fb5 Bug 1797354 - Allow specifying capability type in thread-safety macros, r=jesup,media-playback-reviewers,alwu
It is possible to specify full names for capabilities when using the clang
thread-safety analysis which will be used in error messages. We should use that
form of the attribute rather than the legacy lockable attribute.

Differential Revision: https://phabricator.services.mozilla.com/D160531
2022-10-28 19:55:30 +00:00
Florian Quèze baad7da439 Bug 1795047 - Power use feature string should clarify what's available on each platform, r=canaltinova,dlrobertson.
Differential Revision: https://phabricator.services.mozilla.com/D159685
2022-10-20 16:01:51 +00:00
Cristian Tuns 68f6550eb9 Backed out changeset 94963e082433 (bug 1795047) for causing mochitest failures on performance-new/utils.js CLOSED TREE 2022-10-20 10:40:59 -04:00
Florian Quèze d167696f69 Bug 1795047 - Power use feature string should clarify what's available on each platform, r=canaltinova,dlrobertson.
Differential Revision: https://phabricator.services.mozilla.com/D159685
2022-10-20 13:40:33 +00:00
Paul Adenot 6cd95831a0 Bug 1795840 - Add various markers around video frame scheduling. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D159580
2022-10-20 07:37:54 +00:00
Butkovits Atila fea1444858 Backed out changeset d7d5dd2cdd78 (bug 1795840) for causing cppunit failures. CLOSED TREE 2022-10-19 21:28:11 +03:00
Paul Adenot deeed27a1f Bug 1795840 - Add various markers around video frame scheduling. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D159580
2022-10-19 13:35:57 +00:00
Marian Laza ee334b4183 Backed out changeset 0a01bc98928c (bug 1795840) for causing GTest failures on GeckoProfiler.cpp. CLOSED TREE 2022-10-19 13:55:58 +03:00
Paul Adenot 3e51c5282b Bug 1795840 - Add various markers around video frame scheduling. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D159580
2022-10-19 09:38:16 +00:00
Mike Hommey cbd2293129 Bug 1791481 - Avoid tail-call optimization of call to GetAndCheckStackTrace. r=mstange
While here, change the gtest to display how many tests passed.

Differential Revision: https://phabricator.services.mozilla.com/D157888
2022-10-04 05:16:06 +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
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
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
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 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