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

34 Коммитов

Автор SHA1 Сообщение Дата
Gerald Squelart 29f190e9e6 Bug 1722261 - Use AUTO_PROFILER_REGISTER_THREAD where possible - r=canaltinova
With the new ThreadRegistration classes, it becomes more important to properly balance registrations with unregistrations. Though mismatches are safely handled when they happen, in particular missing unregistrations can lead to leaks that make tests fail.

This patch changes `PROFILER_REGISTER_THREAD` in TaskController.cpp to `AUTO_PROFILER_REGISTER_THREAD`, to ensure that TaskController threads get unregistered when they're finished.

In AsyncLogger.h, a pair of `PROFILER_REGISTER_THREAD` and `PROFILER_UNREGISTER_THREAD` is converted to a single `AUTO_PROFILER_REGISTER_THREAD`. This is equivalent, but the latter is safer, in case the code in-between later changes to include early breaks or returns.

Differential Revision: https://phabricator.services.mozilla.com/D123228
2021-08-24 04:47:12 +00:00
Gerald Squelart 9127fdc730 Bug 1721569 - Make TracePayload easier to modify, and use maximum space for name - r=padenot
An upcoming patch will change the size of ProfilerThreadId, which causes troubles with TracePayload.
Trying to move members around didn't help, I'm guessing some padding remains, which cannot be accounted for by just enumerating member sizes.

The proposed solution is to wrap all members in a macro (so they don't need to be repeated), and create a private struct with these members and a character, in order to find the exact offset at which the name will actually start.
This is uglier, but more flexible, and allows future changes (internal or external) more easily, without having to modify the name-size formula.

Differential Revision: https://phabricator.services.mozilla.com/D121050
2021-08-11 03:27:50 +00:00
Gerald Squelart e7e9ae90ae Bug 1721110 - profiler_current_thread_id() now returns ProfilerThreadId - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D120225
2021-07-21 04:16:59 +00:00
Tom Ritter 1b9b6b72db Bug 1666222: Cut over a ton of NowUnfuzzed calls -> Now 4/5 r=smaug,extension-reviewers,zombie
With Fuzzyfox removed, Now() does what NowUnfuzzed() did.

Differential Revision: https://phabricator.services.mozilla.com/D119639
2021-07-14 18:18:17 +00:00
Florian Quèze cd399a71a2 Bug 1717991 - Remove ifdefs around code that adds profiler markers with custom marker schemas, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D118680
2021-06-25 13:28:01 +00:00
Gerald Squelart 96f3fabfcb Bug 1693037 - Fix non-MOZ_GECKO_PROFILER builds - r=florian
No code changes.

Build issues were found by renaming `MOZ_GECKO_PROFILER` to something else in toolkit/moz.configure, in both unified and non-unified builds, on all supported platforms.

Also updated some profiler-related comments.

Differential Revision: https://phabricator.services.mozilla.com/D105375
2021-02-17 22:36:28 +00:00
Gerald Squelart 2893c11987 Bug 1676079 - For consistency and clarity, add Marker suffix to all marker types - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D98123
2020-11-30 22:52:44 +00:00
Gerald Squelart 67510d8def Bug 1675409 - Migrated (media) Budget to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96030
2020-11-18 21:43:50 +00:00
Razvan Maries b7eeb731df Backed out 23 changesets (bug 1675409) for build bustages on Preferences.cpp. CLOSED TREE
Backed out changeset c1a131a55767 (bug 1675409)
Backed out changeset 47d210802a5d (bug 1675409)
Backed out changeset e8ebb1c58d30 (bug 1675409)
Backed out changeset 69a1e9aeff2a (bug 1675409)
Backed out changeset 68f330b387a8 (bug 1675409)
Backed out changeset e4750d9ef5a1 (bug 1675409)
Backed out changeset bb6bb71e5ab3 (bug 1675409)
Backed out changeset 988d7f4716df (bug 1675409)
Backed out changeset ca41382e891c (bug 1675409)
Backed out changeset 90f3fbbbbeda (bug 1675409)
Backed out changeset 9b109d61a6f6 (bug 1675409)
Backed out changeset 3dd66abfdaa2 (bug 1675409)
Backed out changeset 44181df5f0db (bug 1675409)
Backed out changeset bb2603d947fc (bug 1675409)
Backed out changeset 97055cf20a56 (bug 1675409)
Backed out changeset f88fcf09de0d (bug 1675409)
Backed out changeset 7963e1c49786 (bug 1675409)
Backed out changeset 4c379c1061c3 (bug 1675409)
Backed out changeset b8be8ae7da63 (bug 1675409)
Backed out changeset 0b90aa89421e (bug 1675409)
Backed out changeset c10fb46467c9 (bug 1675409)
Backed out changeset 894ac233b290 (bug 1675409)
Backed out changeset 075d1d8e34c2 (bug 1675409)
2020-11-18 20:06:28 +02:00
Gerald Squelart dce087cdef Bug 1675409 - Migrated (media) Budget to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96030
2020-11-17 22:13:05 +00:00
Mihai Alexandru Michis c0d25b01b2 Backed out 24 changesets (bug 1666566, bug 1675409) for causing hazard failures in profiler/core/platform.cpp
CLOSED TREE

Backed out changeset 4d8af8533fd4 (bug 1666566)
Backed out changeset f031a3a8a20f (bug 1675409)
Backed out changeset 2b7e1a031921 (bug 1675409)
Backed out changeset bda5a24b2d0a (bug 1675409)
Backed out changeset 4282e2284314 (bug 1675409)
Backed out changeset 0637f1b26e9f (bug 1675409)
Backed out changeset 67ae04c8f607 (bug 1675409)
Backed out changeset 6c7b3f3618ef (bug 1675409)
Backed out changeset 2f325c22d169 (bug 1675409)
Backed out changeset 1e48ff70ad8f (bug 1675409)
Backed out changeset 1dfc32d6871d (bug 1675409)
Backed out changeset 4f1f218a777b (bug 1675409)
Backed out changeset e6ac8722b38e (bug 1675409)
Backed out changeset cf132e15fb57 (bug 1675409)
Backed out changeset a126e6b00ba9 (bug 1675409)
Backed out changeset fbc7fbb04f33 (bug 1675409)
Backed out changeset 554c69681474 (bug 1675409)
Backed out changeset 44d0521c701f (bug 1675409)
Backed out changeset 04653dfe4720 (bug 1675409)
Backed out changeset 41ca2c043a00 (bug 1675409)
Backed out changeset 264ae4c805d4 (bug 1675409)
Backed out changeset 5f3bbdac0d52 (bug 1675409)
Backed out changeset 11311c11a6e8 (bug 1675409)
Backed out changeset 0355fbc44baf (bug 1675409)
2020-11-17 19:31:28 +02:00
Gerald Squelart 2d090a48b1 Bug 1675409 - Migrated (media) Budget to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96030
2020-11-17 11:27:55 +00:00
Mike Hommey 48e8e82173 Bug 1667007 - Fix AsyncLogger::TracePayload's mName size calculation. r=padenot
such that it accounts for alignment of TracePayload itself in MPSCQueue
correctly.

Differential Revision: https://phabricator.services.mozilla.com/D91238
2020-09-24 08:20:17 +00:00
Paul Adenot 1684c22031 Bug 1649691 - Make static assert less strict in MPSCQueue.h. r=achronop
Differential Revision: https://phabricator.services.mozilla.com/D81818
2020-07-03 12:24:37 +00:00
Paul Adenot aa36b57271 Bug 1649233 - When profiling, record the theoretical budget with a single payload. r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D81593
2020-06-30 14:25:27 +00:00
Narcis Beleuzu 3de598d4a7 Backed out 2 changesets (bug 1649233) for bustages on ProfilerMarkerPayload.h . CLOSED TREE
Backed out changeset 399e54895a75 (bug 1649233)
Backed out changeset 3955edb371cf (bug 1649233)
2020-06-30 16:36:06 +03:00
Paul Adenot 76b771b47c Bug 1649233 - When profiling, record the theoretical budget with a single payload. r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D81593
2020-06-30 09:05:00 +00:00
Paul Adenot 39504b3094 Bug 1645416 - Fix the TracePayload layout on 32bits and re-enable the static assert that check the struct has a size that is a power of two. r=achronop
Differential Revision: https://phabricator.services.mozilla.com/D80696
2020-06-25 12:33:31 +00:00
Noemi Erli fa3b2d4906 Backed out changeset 4ae7220cf7d8 (bug 1645416) for causing Linux build bustages a=backout 2020-06-25 02:08:43 +03:00
Paul Adenot 25c8980495 Bug 1645416 - Fix the TracePayload layout on 32bits and re-enable the static assert that check the struct has a size that is a power of two. r=achronop
Differential Revision: https://phabricator.services.mozilla.com/D80696
2020-06-24 14:31:07 +00:00
Razvan Maries 15c6376141 Backed out changeset 3a956cf3b8d3 (bug 1645416) for build bustages on MPSCQueue.h. CLOSED TREE 2020-06-24 15:31:34 +03:00
Paul Adenot 1a80554253 Bug 1645416 - Fix the TracePayload layout on 32bits and re-enable the static assert that check the struct has a size that is a power of two. r=achronop
Differential Revision: https://phabricator.services.mozilla.com/D80696
2020-06-24 12:05:04 +00:00
Paul Adenot 1d21042226 Bug 1645766 - Fix build failure in AsyncLogger.h on ppc64le. r=achronop
Thanks to Dan Horák <dan@danny.cz> for the report and fix suggestion.

Differential Revision: https://phabricator.services.mozilla.com/D79683
2020-06-15 13:45:08 +00:00
Paul Adenot 52ebdcabd2 Bug 1626918 - Teach AsyncLogger to output profiler markers. r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D78501
2020-06-12 13:12:59 +00:00
Paul Adenot 3b72f1fb2f Bug 1626918 - Split the MPSC queue in its own file, and generalize it for any type. r=achronop
The allocation still needs to be a power of two so the ergonomics are not
amazing, but this will do until we replace with a buffer-based MPSC ringbuffer.

Differential Revision: https://phabricator.services.mozilla.com/D78499
2020-06-12 13:12:55 +00:00
Paul Adenot 14a4e78f84 Bug 1626918 - Push PID and TIP gathering to AsyncLogger. r=achronop
Differential Revision: https://phabricator.services.mozilla.com/D78498
2020-06-12 13:12:50 +00:00
Paul Adenot 7f0910f11a Bug 1626918 - Push the JSON serialization logic for MOZ_LOG output in AsyncLogger, prepare for another mode. r=achronop
Differential Revision: https://phabricator.services.mozilla.com/D78496
2020-06-12 13:11:47 +00:00
Paul Adenot bbea791d3f Bug 1590135 - Don't call stop in AsyncLogger destructor. r=pehrsons
It does not achieve anything and crashes if the log module manager hasn't been
initialized.

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

--HG--
extra : moz-landing-system : lando
2019-10-22 14:02:53 +00:00
Sylvestre Ledru 804b8b8883 Bug 1204606 - Reformat of dom/media r=jya
# skip-blame

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

--HG--
extra : moz-landing-system : lando
2018-11-19 13:25:37 +00:00
Paul Adenot 683f9406da Bug 1444976 - Implement a lock-free asynchronous logging system to be used from real-time audio and video code. r=froydnj
This outputs to MOZ_LOG and using an MPSC lock-free queue so we can log to a
particular module from any thread.

MozReview-Commit-ID: INtlki4PEJs

--HG--
extra : rebase_source : c1d488fdd65bfa7ede12c12004921415aaaa1d55
extra : source : f9482471bbd83882f8da3f0ce929f72858abfa04
2018-03-20 18:14:47 +01:00
Andreea Pavel 14ac5e554d Backed out 3 changesets (bug 1444976) for failing android at dom/media/tests/mochitest/test_getUserMedia_mediaStreamTrackClone.html a=backout
Backed out changeset 79b7ee8b01ee (bug 1444976)
Backed out changeset 35ca96cabe3c (bug 1444976)
Backed out changeset 2512c9c24244 (bug 1444976)
2018-04-18 21:25:14 +03:00
Paul Adenot 5e0440d951 Bug 1444976 - Implement a lock-free asynchronous logging system to be used from real-time audio and video code. r=froydnj
This outputs to MOZ_LOG and using an MPSC lock-free queue so we can log to a
particular module from any thread.

MozReview-Commit-ID: INtlki4PEJs

--HG--
extra : rebase_source : c1d488fdd65bfa7ede12c12004921415aaaa1d55
extra : source : f9482471bbd83882f8da3f0ce929f72858abfa04
2018-03-20 18:14:47 +01:00
Cosmin Sabou 2680ecadac Backed out 3 changesets (bug 1444976) for build bustages on dom/media/AsyncLogger. CLOSED TREE
Backed out changeset b021b33ddf74 (bug 1444976)
Backed out changeset 822a57090d84 (bug 1444976)
Backed out changeset 0fa5f7cfee1d (bug 1444976)
2018-04-17 13:07:12 +03:00
Paul Adenot df3ccd19c4 Bug 1444976 - Implement a lock-free asynchronous logging system to be used from real-time audio and video code. r=froydnj
This outputs to MOZ_LOG and using an MPSC lock-free queue so we can log to a
particular module from any thread.

MozReview-Commit-ID: INtlki4PEJs

--HG--
extra : rebase_source : 54436bafb6ef463b8de503e7fcf5a79b5949b4cd
extra : source : f9482471bbd83882f8da3f0ce929f72858abfa04
2018-03-20 18:14:47 +01:00