Commit Graph

2439 Commits

Author SHA1 Message Date
Gerald Squelart
0aab2ce513 Bug 1745071 - Add IPCMessages to StartupExtraDefaultFeatures() - r=florian
Depends on D133301

Differential Revision: https://phabricator.services.mozilla.com/D133302
2021-12-09 11:48:22 +00:00
Gerald Squelart
9fef9b8f00 Bug 1745071 - Make DefaultFeatures() and StartupExtraDefaultFeatures() constexpr - r=florian
Small optimization.

Note that unfortunately AvailableFeatures() cannot be made constexpr because it uses getenv().

Differential Revision: https://phabricator.services.mozilla.com/D133301
2021-12-09 11:48:22 +00:00
Kershaw Chang
6bc0b53d81 Bug 1744996 - Remove tsan suppression, r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D133207
2021-12-08 19:47:12 +00:00
Mike Hommey
b1a0e8915c Bug 1742749 - Update builders to rustc 1.57. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D132534
2021-12-02 21:07:37 +00:00
Gerald Squelart
a1bb77b57e Bug 1742522 - New profiler feature to discover unregistered threads and capture some data - r=florian
The profiler uses GetProcInfoSync to discover unregistered threads, and record their CPU utilization. This data is captured in markers on the main thread track.
On Windows, because this work takes much longer than the usual sampling interval, it is done on its own thread.

Differential Revision: https://phabricator.services.mozilla.com/D132213
2021-12-02 08:52:40 +00:00
Gerald Squelart
7d2479ce99 Bug 1742522 - Pass full feature set to SamplerThread instead of individual features bools - r=florian
When constructing the SamplerThread object, individual features were extracted from the feature set (a uint32_t), and passed as bools. This could be error-prone, wasteful, and a maintenance burden when more features are needed in some/all platform implementations (like the next patch adding a new feature with a Windows-specific impact).
So now the full feature set is given to the SamplerThread, which can then extract the features it requires on each platform.

Differential Revision: https://phabricator.services.mozilla.com/D132523
2021-12-02 08:52:40 +00:00
Toshihito Kikuchi
bdceca20fa Bug 1742692 - Add some modules to mozglue's delayload list. r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D131968
2021-12-02 04:31:14 +00:00
Chris Peterson
f6fdbf028a Bug 1738401 - Remove -Wno-shadow warning suppressions. r=firefox-build-system-reviewers,glandium
-Wshadow warnings are not enabled globally, so these -Wno-shadow suppressions have no effect. I had intended to enable -Wshadow globally along with these suppressions in some directories (in bug 1272513), but that was blocked by other issues.

There are too many -Wshadow warnings (now over 2000) to realistically fix them all. We should remove all these unnecessary -Wno-shadow flags cluttering many moz.build files.

Differential Revision: https://phabricator.services.mozilla.com/D132289
2021-12-01 06:40:04 +00:00
Mike Hommey
43fbd70541 Bug 1743550 - Remove outdated use of -bind_at_load. r=firefox-build-system-reviewers,mhentges
-bind_at_load was added in bug 1139036 because of a dead-lock on startup
in jemalloc3 when a) we used jemalloc3 by default on nightly b) macOS
10.10.3 was released.

Since then we upgraded to jemalloc 4, and eventually ... removed
jemalloc 4 in bug 1363992, which makes the -bind_at_load flag leftover
from this removal.

Differential Revision: https://phabricator.services.mozilla.com/D132453
2021-11-30 21:52:49 +00:00
Marian-Vasile Laza
bf27ab5fab Backed out changeset 1ff449af979d (bug 1742692) for causing cppunit test failures. CLOSED TREE 2021-11-30 22:19:47 +02:00
Toshihito Kikuchi
18c35bbe88 Bug 1742692 - Add some modules to mozglue's delayload list. r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D131968
2021-11-30 16:40:45 +00:00
Florian Queze
5373598e93 Bug 1742472 - Use QueryProcessCycleTime on Windows to report total CPU time spent when the CPU has a constant TSC, r=gerald,jrmuizel.
Differential Revision: https://phabricator.services.mozilla.com/D131834
2021-11-24 10:46:45 +00:00
Florian Queze
a2e85fcc9f Bug 1742472 - fix the clang implementation of has_cpuid_bits for the levels in the 0x80000000 range, r=jrmuizel.
Differential Revision: https://phabricator.services.mozilla.com/D131946
2021-11-24 10:46:44 +00:00
Butkovits Atila
ee77dc4fe8 Backed out changeset 8c47ea741114 (bug 1742111) for causing Bug 1742237. a=backout 2021-11-21 12:15:20 +02:00
Dão Gottwald
5e8698ee04 Bug 1742111 - Rename internal accentcolor and textcolor properties to be more consistent with the webext theme API. r=harry
Differential Revision: https://phabricator.services.mozilla.com/D131634
2021-11-19 20:00:07 +00:00
Neel Chauhan
f11cb7b33f Bug 1643637: Make MOZ_PROFILER_STARTUP_ENTRIES understand sizes with units r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D131022
2021-11-12 11:38:12 +00:00
Gerald Squelart
cacfb45508 Bug 1738627 - MOZ_PROFILER_STARTUP_FEATURES {cpu,stacks,markers}allthreads - r=canaltinova
New features cpuallthreads, stacksallthreads, and markersallthreads now allow the user to selectively profile non-selected threads for more information.

The gtest GeckoProfiler.FeatureCombinations is modified to test combinations of up to 3 of a set of features, to lower its cost, which allows adding the new features.

Differential Revision: https://phabricator.services.mozilla.com/D130011
2021-11-08 23:59:37 +00:00
Gerald Squelart
b3ef8bb344 Bug 1738627 - Better Synchronize profiler features lists - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D130563
2021-11-08 23:59:36 +00:00
Cristian Tuns
1aeac93d23 Backed out 5 changesets (bug 1738627) for causing xpcshell failures on test_ext_geckoProfiler_schema.js CLOSED TREE
Backed out changeset 42d385d7da97 (bug 1738627)
Backed out changeset edeb3a338954 (bug 1738627)
Backed out changeset 98f02e35134d (bug 1738627)
Backed out changeset 711daa6dd24b (bug 1738627)
Backed out changeset 49e12753a40c (bug 1738627)
2021-11-05 05:12:28 -04:00
Gerald Squelart
ea92e5ea81 Bug 1738627 - MOZ_PROFILER_STARTUP_FEATURES {cpu,stacks,markers}allthreads - r=canaltinova
New features cpuallthreads, stacksallthreads, and markersallthreads now allow the user to selectively profile non-selected threads for more information.

The gtest GeckoProfiler.FeatureCombinations is modified to test combinations of up to 3 of a set of features, to lower its cost, which allows adding the new features.

Differential Revision: https://phabricator.services.mozilla.com/D130011
2021-11-05 05:52:29 +00:00
Mike Hommey
7fa0a01f14 Bug 1736459 - Update builders to rustc 1.56. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D128808
2021-10-27 22:35:57 +00:00
Norisz Fay
51e8153e60 Backed out 5 changesets (bug 1736459) for causing Windows crashes (bug 1738034) a=backout
Backed out changeset c934eeb21692 (bug 1736459)
Backed out changeset 0b2da7db414c (bug 1736459)
Backed out changeset 798893f69a02 (bug 1736459)
Backed out changeset 2a8f412c4d08 (bug 1736459)
Backed out changeset 59eeaeafdf67 (bug 1736459)
2021-10-27 16:02:24 +03:00
Mike Hommey
8b2faec239 Bug 1736459 - Update builders to rustc 1.56. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D128808
2021-10-26 23:11:40 +00:00
Noemi Erli
34988f27ab Backed out 2 changesets (bug 1736459) for causing SM bustage CLOSED TREE
Backed out changeset 1548d79706bb (bug 1736459)
Backed out changeset cb0bd4552c26 (bug 1736459)
2021-10-23 00:26:49 +03:00
Mike Hommey
0611e1d9e5 Bug 1736459 - Update builders to rustc 1.56. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D128808
2021-10-22 20:33:54 +00:00
Gerald Squelart
8ff93952a4 Bug 1737058 - Empty MOZ_PROFILER_SHUTDOWN in child processes, so they don't needlessly and dangerously write their profile to the same file - r=canaltinova
The user shouldn't set MOZ_PROFILER_SHUTDOWN to an empty string, it wouldn't work anyway.
So now there is an extra check for that, to avoid even attempting to write a profile when there is no actual filename.

Thanks to this, the parent process can now just re-set MOZ_PROFILER_SHUTDOWN to "" in its children, so that they won't try to output their own profile into the same file. (This used to mostly work, because the parent process was the last to write its profile; but anecdotal data shows this may not alwaybe be true.)

As a bonus optimization, this means that child processes don't waste time needlessly saving their profile to disk.

Differential Revision: https://phabricator.services.mozilla.com/D129237
2021-10-22 08:41:27 +00:00
Marian-Vasile Laza
99d489acd7 Backed out changeset 47fdc6711870 (bug 1736459) for causing build bustages. CLOSED TREE 2021-10-22 01:40:07 +03:00
Mike Hommey
e4e9aed5d8 Bug 1736459 - Update builders to rustc 1.56. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D128808
2021-10-21 20:46:59 +00:00
Gerald Squelart
302a5711fa Bug 1577658 - DeserializeAfterKindAndStream takes a lambda: (tid) -> writer - r=canaltinova
Previously, DeserializeAfterKindAndStream would take a JSON writer and a thread id, using the thread id (if specified) to only output markers from that thread to the given writer.

Now, DeserializeAfterKindAndStream takes a lambda, which will be called with the thread id found in the marker, that lambda can either return null (nothing to output) or a pointer to a writer, in which case the marker is read and output to the given writer.
This makes DeserializeAfterKindAndStream more flexible, and will allow handling markers from different threads, each possibly being output to different writers.

Also, for simplicity the entry is now always fully read, so there is no need for the caller to do anything. The return bool is therefore unnecessary, and has been removed.

Differential Revision: https://phabricator.services.mozilla.com/D128433
2021-10-21 05:47:21 +00:00
Andi-Bogdan Postelnicu
0d12e234b2 Bug 1731582 - Move to clang-13 r=firefox-build-system-reviewers,mhentges,decoder
Join work with glandium.

Differential Revision: https://phabricator.services.mozilla.com/D126208
2021-10-20 12:03:20 +00:00
Butkovits Atila
c56f15eca0 Backed out changeset 7de44eaecb13 (bug 1731582) as requested by Andi. CLOSED TREE 2021-10-19 20:52:08 +03:00
Andi-Bogdan Postelnicu
151c81623a Bug 1731582 - Move to clang-13 r=firefox-build-system-reviewers,mhentges,decoder
Join work with glandium.

Differential Revision: https://phabricator.services.mozilla.com/D126208
2021-10-19 14:45:59 +00:00
Gerald Squelart
df50ece611 Bug 1735697 - Remove profiler_can_accept_markers(), use profiler_thread_is_being_profiled() instead - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D128577
2021-10-18 23:11:30 +00:00
Gerald Squelart
424aac2b72 Bug 1735697 - Only record markers from actually-profiled threads - r=florian
`profiler_add_marker()` now checks if the marker's target thread is actively being profiled. This is to prevent adding markers that would be discarded anyway, from taking CPU time to process, and from using space in the profile buffer.

This means that `profiler_thread_is_being_profiled(ProfilerThreadId)` must be used when a marker is intended for another thread, i.e., when it uses the MarkerThreadId option.

(Note: since baseprofiler::profiler_thread_is_being_profiled(ProfilerThreadId) is not available, baseprofiler::AddMarker cannot prevent markers targetted at non-profiled thread; There are none yet anyway.)

Differential Revision: https://phabricator.services.mozilla.com/D128576
2021-10-18 23:11:30 +00:00
Gerald Squelart
8bf5fd4b34 Bug 1735697 - profiler_is_being_profiled checks for pauses, and can check another thread - r=florian
If the profiler is paused, then really, threads are not *being* profiled.

profiler_is_active_and_unpaused() was added, to help with non-MOZ_GECKO_PROFILER builds.

(Note: baseprofiler::profiler_thread_is_being_profiled(ProfilerThreadId) is not possible to implement, but it's not needed anyway.)

Differential Revision: https://phabricator.services.mozilla.com/D128707
2021-10-18 23:11:29 +00:00
Valentin Gosu
01dbf4259f Bug 1606864 - Make mDoNotRetryToConnect atomic r=necko-reviewers,decoder,dragana
Fixes race between nsSocketTransport::Close and
nsSocketTransport::RecoverFromError called from OnSocketDetached.

Depends on D128183

Differential Revision: https://phabricator.services.mozilla.com/D128364
2021-10-18 13:53:16 +00:00
Valentin Gosu
db56571b13 Bug 1712671 - Make nsSocketTransport2::m{Input/Output}StreamClosed atomic r=necko-reviewers,kershaw,decoder
Fixes race between nsSocketTransport::OnInputClosed and nsSocketTransport::OpenInputStream.
Same for output streams.

Differential Revision: https://phabricator.services.mozilla.com/D128183
2021-10-18 13:53:15 +00:00
Bobby Holley
041a1558be Bug 1734262 - Suppress thread leak reports for the monitor thread. r=decoder
For the same reasons discussed in the previous commit, it's impractical
to join these threads on shutdown, and so we should suppress thread leak
reports for them.

Differential Revision: https://phabricator.services.mozilla.com/D128651
2021-10-16 16:29:32 +00:00
stransky
427342d2ea Bug 1735539 [Linux\EGL] Don't report mem leaks from libEGL_mesa.so r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D128371
2021-10-13 13:56:50 +00:00
Kris Wright
aa245e4e37 Bug 1733908 - Add one more js::wasm::Code suppression to TSan r=decoder
Try pushes are showing one more data race that I didn't catch.

Differential Revision: https://phabricator.services.mozilla.com/D128271
2021-10-13 05:12:48 +00:00
Kris Wright
998548ca0d Bug 1733908 - Add temporary TSan suppressions r=decoder
Looks like there are a couple of impacted sites - these temporary suppressions should clear up the tests until they can be addressed.

Differential Revision: https://phabricator.services.mozilla.com/D128222
2021-10-12 14:43:53 +00:00
Nazım Can Altınova
146befbbdb Bug 1733335 - Add tracing marker type for the Rust side r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D127112
2021-10-11 07:59:09 +00:00
Sandor Molnar
ac87f8501e Backed out 4 changesets (bug 1733335) for causing multiple dt failures. CLOSED TREE
Backed out changeset 8c14ac28d042 (bug 1733335)
Backed out changeset 066819ce0e86 (bug 1733335)
Backed out changeset c44e1bb6d9ff (bug 1733335)
Backed out changeset 4cd1efb42295 (bug 1733335)
2021-10-06 17:49:47 +03:00
Nazım Can Altınova
9651c20007 Bug 1733335 - Add tracing marker type for the Rust side r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D127112
2021-10-06 11:35:15 +00:00
Marian-Vasile Laza
6c22452994 Backed out 4 changesets (bug 1733335) for causing build bustages. CLOSED TREE
Backed out changeset 45a3ae02f837 (bug 1733335)
Backed out changeset 41c62acfb5a6 (bug 1733335)
Backed out changeset cf3b6b6cc6c6 (bug 1733335)
Backed out changeset b919d9cfb8e5 (bug 1733335)
2021-10-05 15:07:44 +03:00
Nazım Can Altınova
aae1952697 Bug 1733335 - Add tracing marker type for the Rust side r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D127112
2021-10-05 11:34:27 +00:00
Mike Hommey
49ee506e32 Bug 1732208 - Silence the unused-but-set-variable warning in platform-linux-android.cpp. r=gerald
platform-linux-android.cpp:199:9: error: variable 'r' set but not used [-Werror,-Wunused-but-set-variable]
    int r = sem_init(&mMessage2, /* pshared */ 0, 0);
        ^
platform-linux-android.cpp:206:9: error: variable 'r' set but not used [-Werror,-Wunused-but-set-variable]
 not used [-Werror,-Wunused-but-set-variable]
    int r = sem_destroy(&mMessage2);
        ^

Differential Revision: https://phabricator.services.mozilla.com/D126459
2021-09-28 00:02:47 +00:00
Nazım Can Altınova
a15be90d61 Bug 1654413 - Deserialize and stream the markers and marker schemas r=emilio,gerald
Now we can deserialize and stream everything to the JSON.

Differential Revision: https://phabricator.services.mozilla.com/D124027
2021-09-21 11:08:12 +00:00
Nazım Can Altınova
ca180f8629 Bug 1654413 - Add add_marker Rust profiler API and serialize the marker to the buffer r=emilio,gerald
This only adds the API and then adds the profiler payload to the buffer. The
deserialization and streaming will happen in the next patch.

Differential Revision: https://phabricator.services.mozilla.com/D124026
2021-09-21 11:08:11 +00:00
Nazım Can Altınova
a5b9cfdadb Bug 1654413 - Add MarkerSchema struct and its enums for marker API r=emilio,gerald
You can see the `mozilla::MarkerSchema` for the C++ counterpart. This Rust
struct simply wraps the C++ object and keeps the reference of it as RAII. This
heap allocates the inner C++ object but it's fine to do it here, because it's
we only create a MarkerSchema object at the end of a profiling session and it
happens once per marker type. It should be very rare.

Differential Revision: https://phabricator.services.mozilla.com/D124025
2021-09-21 11:08:11 +00:00