Commit Graph

2439 Commits

Author SHA1 Message Date
Nazım Can Altınova
02f9877e83 Bug 1654413 - Add add_untyped_marker Rust API r=emilio,gerald
This is the first and simplest API for the markers. There will be two more
APIs in the following patches (add_text_marker and add_marker). You can see the
PROFILER_MARKER_UNTYPED macro for the C++ counterpart.

Differential Revision: https://phabricator.services.mozilla.com/D124022
2021-09-21 11:08:10 +00:00
Nazım Can Altınova
7ec023dfe3 Bug 1654413 - Add a MarkerTiming and MarkerOptions Rust structs for the marker API r=emilio,gerald
These structs are needed for the marker APIs. We also have the same structs as
the C++ classes. See `mozilla::MarkerTiming` and `mozilla::MarkerOptions`.

Differential Revision: https://phabricator.services.mozilla.com/D124020
2021-09-21 11:08:09 +00:00
Bob Owen
972b41f513 Bug 1546154 p3: Explicitly load COM functions from combase.dll to prevent ole32 loading. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D124931
2021-09-20 10:09:01 +00:00
Marian-Vasile Laza
1cf4af94e5 Backed out 7 changesets (bug 1546154) for causing build bustages on ContentProcess.cpp. CLOSED TREE
Backed out changeset 0bd777eee249 (bug 1546154)
Backed out changeset 611812ee62a2 (bug 1546154)
Backed out changeset cef0aa18a3ab (bug 1546154)
Backed out changeset cfda47fb0a46 (bug 1546154)
Backed out changeset f3e005f5fedc (bug 1546154)
Backed out changeset 7f50fca0c2cd (bug 1546154)
Backed out changeset bbb0b25450f5 (bug 1546154)
2021-09-15 14:12:55 +03:00
Bob Owen
8b6ae95727 Bug 1546154 p3: Explicitly load COM functions from combase.dll to prevent ole32 loading. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D124931
2021-09-15 10:21:04 +00:00
Gerald Squelart
b3c424f6d7 Bug 1663382 - Optimize Deserializer<ProfilerStringView> to reference in-buffer data when possible - r=canaltinova
Because string contents could be split in two separate chunks, the default ProfilerStringView deserializer needed to concatenate it together in an off-chunk buffer.
But now thanks to ProfileBufferEntryReader::ReadSpans, it is possible to know if the contents are in a single memory area inside one chunk (which should be the vast majority of cases), in which case the ProfilerStringView can just reference it using its internal std::string_view, which saves managing a separate buffer and copying data into it.
However this can only be done safely when the span is correctly aligned for the character type, which may not be the case for char16_t strings that must be even-aligned.

Differential Revision: https://phabricator.services.mozilla.com/D124430
2021-09-10 11:43:48 +00:00
Gerald Squelart
997a0ba46c Bug 1663382 - ProfileBufferEntryReader::{Peek,Read}Spans return pointers to entry bytes - r=canaltinova
Instead of always having to use `ReadBytes` to copy bytes out of the profile buffer into an external buffer, these functions provide one or two spans (pointer+size) pointing at the area, which can be used to look at the data without copying it, especially in the majority of cases where areas are fully inside one chunk and only need one span to address.

Differential Revision: https://phabricator.services.mozilla.com/D124429
2021-09-10 11:43:48 +00:00
Gerald Squelart
c4a6f1bac7 Bug 1663382 - Remove dangerous ProfilerStringView::Data() - r=florian
`ProfilerStringView::Data()` would return a pointer to the start of the string, but there may not be a null terminator at the end!
To reduce the likelihood of misuses, that function has now been removed.
Instead, callers must now access the data through `AsSpan` or the `Span` conversion operator (which makes it easy to use with `NS_ConvertUTF16toUTF8` for example).

It was not an issue until now, because deserialized string would always be terminated when copied out of the profile buffer, but a following patch will add optimized code where the non-terminated string inside the buffer will be directly pointed at.

Differential Revision: https://phabricator.services.mozilla.com/D125027
2021-09-10 11:43:47 +00:00
Mike Hommey
9c0f04e547 Bug 1730030 - Replace some assembly with corresponding compiler builtins. r=gerald
This has the side-effect of adding the missing arm64 mac support for PHC.

Differential Revision: https://phabricator.services.mozilla.com/D125139
2021-09-10 00:58:34 +00:00
Mike Hommey
2f75037f7a Bug 1727470 - Update builders to rustc 1.55. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D124735
2021-09-09 21:02:28 +00:00
Doug Thayer
ef2740f793 Bug 1728653 - Allow a silent start mode r=bytesized,nalexander,application-update-reviewers,mossop
This will allow starting Firefox in the background, and on Windows will allow
closing the last browser window without killing the main process. There is no
plan for actually using this by default in Firefox proper, but it's needed for
some explorations.

There's more to this work that we'll need - this is just the first step. For
instance, we'll need a real way to actually kill firefox on Windows other than
through the task manager (we'll be putting something in the system tray to
allow this.)

The patch wasn't particularly large, so I didn't split out the rename of
MOZ_APP_SILENT_START to MOZ_APP_SILENT_RESTART - let me know if you'd like me
to do that though and I can.

Differential Revision: https://phabricator.services.mozilla.com/D124249
2021-09-09 18:09:25 +00:00
Byron Campen
f48b2388ae Bug 1683417: Remove tsan suppression and fix race. r=ng,decoder
Also add a thread assertion.

Differential Revision: https://phabricator.services.mozilla.com/D124993
2021-09-09 17:13:36 +00:00
Narcis Beleuzu
d1008ea8e7 Backed out 2 changesets (bug 1663382) for bc failures on browser_test_marker_network_serviceworker_synthetized_response.js . CLOSED TREE
Backed out changeset f3a453eb5700 (bug 1663382)
Backed out changeset 2fd6d02ad407 (bug 1663382)
2021-09-07 03:28:41 +03:00
Gerald Squelart
dceb658042 Bug 1663382 - Optimize Deserializer<ProfilerStringView> to reference in-buffer data when possible - r=canaltinova
Because string contents could be split in two separate chunks, the default ProfilerStringView deserializer needed to concatenate it together in an off-chunk buffer.
But now thanks to ProfileBufferEntryReader::ReadSpans, it is possible to know if the contents are in a single memory area inside one chunk (which should be the vast majority of cases), in which case the ProfilerStringView can just reference it using its internal std::string_view, which saves managing a separate buffer and copying data into it.
However this can only be done safely when the span is correctly aligned for the character type, which may not be the case for char16_t strings that must be even-aligned.

Differential Revision: https://phabricator.services.mozilla.com/D124430
2021-09-06 22:18:03 +00:00
Gerald Squelart
6076a5b8de Bug 1663382 - ProfileBufferEntryReader::{Peek,Read}Spans return pointers to entry bytes - r=canaltinova
Instead of always having to use `ReadBytes` to copy bytes out of the profile buffer into an external buffer, these functions provide one or two spans (pointer+size) pointing at the area, which can be used to look at the data without copying it, especially in the majority of cases where areas are fully inside one chunk and only need one span to address.

Differential Revision: https://phabricator.services.mozilla.com/D124429
2021-09-06 22:18:02 +00:00
Iulian Moraru
c701e5f6e9 Backed out 2 changesets (bug 1663382) for causing multiple mochitest crashes. CLOSED TREE
Backed out changeset bac8ae20a8af (bug 1663382)
Backed out changeset 0b3495e23e77 (bug 1663382)
2021-09-06 06:50:02 +03:00
Gerald Squelart
108a906e53 Bug 1663382 - Optimize Deserializer<ProfilerStringView> to reference in-buffer data when possible - r=canaltinova
Because string contents could be split in two separate chunks, the default ProfilerStringView deserializer needed to concatenate it together in an off-chunk buffer.
But now thanks to ProfileBufferEntryReader::ReadSpans, it is possible to know if the contents are in a single memory area inside one chunk (which should be the vast majority of cases), in which case the ProfilerStringView can just reference it using its internal std::string_view, which saves managing a separate buffer and copying data into it.

Differential Revision: https://phabricator.services.mozilla.com/D124430
2021-09-06 02:40:08 +00:00
Gerald Squelart
af8c9a770f Bug 1663382 - ProfileBufferEntryReader::{Peek,Read}Spans return pointers to entry bytes - r=canaltinova
Instead of always having to use `ReadBytes` to copy bytes out of the profile buffer into an external buffer, these functions provide one or two spans (pointer+size) pointing at the area, which can be used to look at the data without copying it, especially in the majority of cases where areas are fully inside one chunk and only need one span to address.

Differential Revision: https://phabricator.services.mozilla.com/D124429
2021-09-06 02:40:08 +00:00
Nazım Can Altınova
0f657df07f Bug 1728544 - Make the MarkerSchema::Searchable enum class values CamelCased r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D124242
2021-09-03 14:30:10 +00:00
Nazım Can Altınova
a38b25b295 Bug 1728544 - Make the MarkerSchema::Format enum class values CamelCased r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D124241
2021-09-03 14:30:10 +00:00
Nazım Can Altınova
ddae0f7cd6 Bug 1728544 - Make the MarkerSchema::Location enum class values CamelCased r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D124240
2021-09-03 14:30:09 +00:00
Botond Ballo
78ddb2abb6 Bug 1723170 - Remove sAsyncPanZoomControllerCount. r=tnikkel,decoder
All the code that uses it was conditioned on ShouldUseProgressivePaint(),
which was changed to always return false in the previous commit.

This also fixes a racy access to this static variable.

Depends on D123712

Differential Revision: https://phabricator.services.mozilla.com/D123713
2021-09-01 19:36:35 +00:00
Botond Ballo
bfe08d4f96 Bug 1723142 - Acquire the APZC lock in SetTestAsyncZoom(). r=tnikkel,decoder
Differential Revision: https://phabricator.services.mozilla.com/D123706
2021-09-01 19:30:22 +00:00
Botond Ballo
2ff758e8ee Bug 1723176 - Protect access to AsyncPanZoomController::mZoomAnimationId with the APZC lock. r=tnikkel,decoder
Differential Revision: https://phabricator.services.mozilla.com/D123710
2021-09-01 19:11:21 +00:00
Christopher Winter
7acf6d224b Bug 1604914 - Make ShouldProfileThread more efficient r=gerald
When starting the profiler, also make a copy of the filter strings
converted to lower-case. This allows caseless comparisons to be made
against thread names without repeatedly converting the filters to
lower-case for each thread.

Differential Revision: https://phabricator.services.mozilla.com/D123302
2021-08-26 01:31:25 +00:00
Andi-Bogdan Postelnicu
2fc4f70e9b Bug 1725145 - Preparation for the hybrid build env. r=necko-reviewers,firefox-build-system-reviewers,valentin,glandium
Automatically generated path that adds flag `REQUIRES_UNIFIED_BUILD = True` to `moz.build`
when the module governed by the build config file is not buildable outside on the unified environment.

This needs to be done in order to have a hybrid build system that adds the possibility of combing
unified build components with ones that are built outside of the unified eco system.

Differential Revision: https://phabricator.services.mozilla.com/D122345
2021-08-25 10:46:17 +00:00
Gerald Squelart
7f3c9eb118 Bug 1727036 - SpliceableJSONWriter::Time... functions output milliseconds with nanosecond precision - r=mstange
Instead of blindly outputting floating-point numbers of milliseconds, which leads to things like 363.03499999999997, times in ms are now converted to integer number of nanoseconds, stringified, and then manually adjusted to milliseconds again, so we get smaller and friendlier outputs like 363.035.

Eventually, bug 1726675 may change all times to integer number of nanoseconds anyway, but this patch is already helpful in reducing the output, and paves the way by separating the time-output functions from other number outputs.

Differential Revision: https://phabricator.services.mozilla.com/D123329
2021-08-24 21:33:05 +00:00
Gerald Squelart
1cf3bc392a Bug 1726657 - Only record sampling overheads if MOZ_PROFILER_RECORD_OVERHEADS is set - r=florian
Sampling overheads are very rarely useful, but they occupy some space during profiling, but also a lot of space in the final JSON profile.
So now they will only be recorded if the environment variable "MOZ_PROFILER_RECORD_OVERHEADS" is set to any non-empty value.

Differential Revision: https://phabricator.services.mozilla.com/D123303
2021-08-23 22:23:34 +00:00
Julien Wajsberg
2a42e8a50e Bug 1697901 - [network markers] Bump the profile version to 24 r=gerald
This ensures our users will use the latest version of the frontend when
capturing 'cancel' network markers.

Depends on D123254

Differential Revision: https://phabricator.services.mozilla.com/D123255
2021-08-23 08:56:53 +00:00
Gerald Squelart
9c1ed025c1 Bug 1633572 - New small buffer entry to indicate an indentical sample instead of a copy - r=canaltinova
Instead of copying the full stack from the previous sample when identical, the new ProfileBufferEntryKind::TimeBeforeSameSample + SameSample entry pair indicates that this is an identical sample. Later when producing the final JSON profile, we can just re-use the same sample identifier as before.

This effectively lowers the size of this kind of entry from hundreds of bytes, down to 20-30 bytes, which should help with capturing more samples in the same buffer size. And it also uses less CPU resources, since we don't need to find the previous stack and copy it.

We still need to perform a full copy at the start of a buffer chunk, to make sure there is always a full stack available in case older previous chunks have been destroyed.

Differential Revision: https://phabricator.services.mozilla.com/D122679
2021-08-18 01:47:41 +00:00
Gerald Squelart
aaee7d55b0 Bug 1633572 - ProfileChunkedBuffer::IsIndexInCurrentChunk - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D122678
2021-08-18 01:47:41 +00:00
Gerald Squelart
2be7cfed4b Bug 1633572 - Fix PROFILER_RUNTIME_STATS - r=canaltinova
PROFILER_RUNTIME_STATS was broken recently. It's only used during development (mostly to benchmark new code), so it's not critical and no tests are needed.

Differential Revision: https://phabricator.services.mozilla.com/D122677
2021-08-18 01:47:40 +00:00
Aaron Klotz
ac6454a0ed Bug 1724749: Consolidate all dllservices code; r=tkikuchi
Per the discussion on governance, the new DLL services module will live in
`toolkit/xre/dllservices`.

Mozglue code will live in `toolkit/xre/dllservices/mozglue` and will be linked
in with `mozglue.dll`.

Differential Revision: https://phabricator.services.mozilla.com/D122384
2021-08-12 20:57:12 +00:00
Gerald Squelart
adfaf6a929 Bug 1725089 - Add support for WASI in ProfilerUtils - r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D122313
2021-08-12 12:27:25 +00:00
Alexandru Michis
15f1bc73d2 Backed out changeset b81da25293ad (bug 1724749) for causing bustages due to UntrustedModulesData.h not being found.
CLOSED TREE
2021-08-12 02:49:40 +03:00
Aaron Klotz
cdc3b69555 Bug 1724749: Consolidate all dllservices code; r=tkikuchi
Per the discussion on governance, the new DLL services module will live in
`toolkit/xre/dllservices`.

Mozglue code will live in `toolkit/xre/dllservices/mozglue` and will be linked
in with `mozglue.dll`.

Differential Revision: https://phabricator.services.mozilla.com/D122384
2021-08-11 23:08:52 +00:00
Gerald Squelart
056d185383 Bug 1721569 - Use std::this_thread::get_id() on other platforms - r=florian
Now `profiler_current_thread_id()` is available on all platforms, at all tier levels.

Differential Revision: https://phabricator.services.mozilla.com/D121053
2021-08-11 03:27:52 +00:00
Gerald Squelart
032f23b189 Bug 1721569 - Change id native types to reflect what each platform really provides - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D121052
2021-08-11 03:27:51 +00:00
Gerald Squelart
1f76b47543 Bug 1721569 - Move main-thread id functions to cpp files - r=florian
This hides the scProfilerMainThreadId detail, and makes for a safer API.
Also, ::profiler_init_main_thread_id() calls ::mozilla::baseprofiler::profiler_init_main_thread_id().
And in non-MOZ_GECKO_PROFILER builds, AUTO_PROFILER_INIT calls profiler_init_main_thread_id(), which makes other main-thread functions usable there (assuming profiler_current_thread_id works).

Differential Revision: https://phabricator.services.mozilla.com/D121695
2021-08-11 03:27:51 +00:00
Gerald Squelart
84d1ba4229 Bug 1721569 - Moved implementations of {,Base}ProfilerUtils.h declarations to ProfilerUtils.cpp - r=florian
This patch only shuffles source code around, so that all declarations in {,Base}ProfilerUtils.h are now implemented only in ProfilerUtils.cpp (instead of the different platform-*.cpp), the final generated code should be the same in MOZ_GECKO_PROFILER builds (the default on all our supported platforms).
This simplifies the headers and makes further changes easier.

In non-MOZ_GECKO_PROFILER builds: On supported platforms these functions are now fully defined; Unsupported platforms should all had `getpid()`, but thread ids are null.
So now `profiler_current_process_id()` is available on all platforms, at all tier levels.

Differential Revision: https://phabricator.services.mozilla.com/D121051
2021-08-11 03:27:50 +00:00
Gerald Squelart
5d1937d55a Bug 1721569 - Handle different sizes of Profiler{Process,Thread}Id - r=florian
Since ProfilerProcessId and ProfilerThreadId (and their NumberTypes) will potentially grow to 64 bits on some platforms (in a later patch), all code that uses them must be able to handle bigger types.

Differential Revision: https://phabricator.services.mozilla.com/D121049
2021-08-11 03:27:50 +00:00
Gerald Squelart
c469a8f0be Bug 1721569 - Add gtest checks comparing Base and Gecko profiler process/thread APIs - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D121048
2021-08-11 03:27:49 +00:00
Toshihito Kikuchi
07dfbc6b36 Bug 1723868 - Skip msvp9dec_store.dll in GetInfoForSelf(). r=gerald
When mfplat.dll loads msvp9dec_store.dll, it posts a task
to unload the module to the work queue even if msvp9dec_store.dll
is already loaded and mfplat.dll skips LoadLibrary.  Therefore,
we cannot safely lock msvp9dec_store.dll by loading it as data.

The proposed fix is to skip processing the module.

Differential Revision: https://phabricator.services.mozilla.com/D121777
2021-08-05 02:36:27 +00:00
Harry Twyford
2d4da45cce Bug 1698814 - Part 1 - Consolidate toolbar-field background color variables. r=desktop-theme-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D117028
2021-08-04 18:01:09 +00:00
Kris Wright
abdb25382e Bug 1723730 - Add temporary TSan suppression. r=mccr8,decoder
Differential Revision: https://phabricator.services.mozilla.com/D121664
2021-08-03 20:39:06 +00:00
Kris Wright
58839f2d2e Bug 1723176 - Add temporary TSan suppression. r=decoder,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D121549
2021-08-03 20:39:05 +00:00
Kris Wright
53b36691dc Bug 1723170 - Add temporary TSan suppression. r=decoder,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D121548
2021-08-03 20:39:05 +00:00
Kris Wright
dd75f68ef7 Bug 1723142 - Add temporary TSan suppression. r=decoder,mccr8
This call appears in the top frames of 2 different stacks (Bug 1723351 and Bug 1723142) so from my understanding it will suppress both test fails. I included both bug numbers for reference.

Differential Revision: https://phabricator.services.mozilla.com/D121546
2021-08-03 20:39:05 +00:00
Kris Wright
7b5275067f Bug 1723321 - Add temporary TSan suppression. r=decoder,mccr8
This commit also adds a newline to the entry directly above the new suppression, since it was missing one.

Differential Revision: https://phabricator.services.mozilla.com/D121545
2021-08-03 20:39:04 +00:00
Doug Thayer
5667e3b2a9 Bug 1722515 - Only build ActivationContext.cpp in mozglue if a11y r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D121547
2021-08-03 14:40:38 +00:00
Mike Hommey
c4d65ab921 Bug 1723016 - Update builders to rustc 1.54. r=firefox-build-system-reviewers,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D121247
2021-08-03 02:03:32 +00:00
Nazım Can Altınova
4302cd6058 Bug 1652560 - Autogenerate profiling_categories.rs with profiling_categories.yaml r=gerald,emilio
Generate the user friendly Rust enums and their impls for profiling categories.

Differential Revision: https://phabricator.services.mozilla.com/D120792
2021-07-30 21:49:21 +00:00
Nazım Can Altınova
0b9f9eb6a9 Bug 1652560 - Autogenerate ProfilingCategoryList.h with profiling_categories.yaml r=emilio,gerald
Previously ProfilingCategoryList.h was a central place for profiling
categories. But with this patch, profiling_categories.yaml becomes the
canonical place for it and the macro header file is being generated
automatically. This is needed to make the profiling categories in sync with
Rust and C++.

Differential Revision: https://phabricator.services.mozilla.com/D120791
2021-07-30 21:49:21 +00:00
Brindusan Cristian
7e15fd89b7 Backed out 3 changesets (bug 1723016) for causing valgrind bustages. CLOSED TREE
Backed out changeset 1b03bb0c42e4 (bug 1723016)
Backed out changeset 66ea8fed0c30 (bug 1723016)
Backed out changeset d43d97354163 (bug 1723016)
2021-07-30 17:54:40 +03:00
Andrew Osmond
6f3d06c7cb Bug 1722726 - Move Linux tsan tests to WebRender. r=jmaher
autoland

--- target_task_set@32af9322f9bf
+++ target_task_set@ao_ci_linux_tsan
-test-linux1804-64-tsan/opt-crashtest-e10s
-test-linux1804-64-tsan/opt-mochitest-a11y-1proc
-test-linux1804-64-tsan/opt-mochitest-browser-chrome-e10s
-test-linux1804-64-tsan/opt-mochitest-media-e10s
-test-linux1804-64-tsan/opt-mochitest-media-fis-e10s
-test-linux1804-64-tsan/opt-mochitest-media-fis-gli-e10s
-test-linux1804-64-tsan/opt-mochitest-media-gli-e10s
-test-linux1804-64-tsan/opt-mochitest-media-spi-e10s
-test-linux1804-64-tsan/opt-mochitest-plain-e10s
-test-linux1804-64-tsan/opt-mochitest-plain-fis-e10s
-test-linux1804-64-tsan/opt-reftest-e10s
-test-linux1804-64-tsan/opt-web-platform-tests-e10s
-test-linux1804-64-tsan/opt-web-platform-tests-fis-e10s
-test-linux1804-64-tsan/opt-web-platform-tests-reftest-e10s
-test-linux1804-64-tsan/opt-web-platform-tests-reftest-fis-e10s
-test-linux1804-64-tsan/opt-xpcshell-e10s
+test-linux1804-64-tsan-qr/opt-crashtest-e10s
+test-linux1804-64-tsan-qr/opt-crashtest-noqr-e10s
+test-linux1804-64-tsan-qr/opt-crashtest-swr-e10s
+test-linux1804-64-tsan-qr/opt-mochitest-a11y-1proc
+test-linux1804-64-tsan-qr/opt-mochitest-browser-chrome-swr-e10s
+test-linux1804-64-tsan-qr/opt-mochitest-media-e10s
+test-linux1804-64-tsan-qr/opt-mochitest-media-fis-e10s
+test-linux1804-64-tsan-qr/opt-mochitest-media-fis-gli-e10s
+test-linux1804-64-tsan-qr/opt-mochitest-media-gli-e10s
+test-linux1804-64-tsan-qr/opt-mochitest-media-spi-e10s
+test-linux1804-64-tsan-qr/opt-mochitest-plain-e10s
+test-linux1804-64-tsan-qr/opt-mochitest-plain-fis-e10s
+test-linux1804-64-tsan-qr/opt-reftest-e10s
+test-linux1804-64-tsan-qr/opt-reftest-noqr-e10s
+test-linux1804-64-tsan-qr/opt-reftest-swr-e10s
+test-linux1804-64-tsan-qr/opt-web-platform-tests-e10s
+test-linux1804-64-tsan-qr/opt-web-platform-tests-fis-e10s
+test-linux1804-64-tsan-qr/opt-web-platform-tests-reftest-e10s
+test-linux1804-64-tsan-qr/opt-web-platform-tests-reftest-fis-e10s
+test-linux1804-64-tsan-qr/opt-xpcshell-e10s

mozilla-central

--- target_task_set@32af9322f9bf
+++ target_task_set@ao_ci_linux_tsan
-test-linux1804-64-tsan/opt-crashtest-e10s
-test-linux1804-64-tsan/opt-mochitest-a11y-1proc
-test-linux1804-64-tsan/opt-mochitest-browser-chrome-e10s
-test-linux1804-64-tsan/opt-mochitest-media-e10s
-test-linux1804-64-tsan/opt-mochitest-media-fis-e10s
-test-linux1804-64-tsan/opt-mochitest-media-fis-gli-e10s
-test-linux1804-64-tsan/opt-mochitest-media-gli-e10s
-test-linux1804-64-tsan/opt-mochitest-media-spi-e10s
-test-linux1804-64-tsan/opt-mochitest-plain-e10s
-test-linux1804-64-tsan/opt-mochitest-plain-fis-e10s
-test-linux1804-64-tsan/opt-reftest-e10s
-test-linux1804-64-tsan/opt-web-platform-tests-e10s
-test-linux1804-64-tsan/opt-web-platform-tests-fis-e10s
-test-linux1804-64-tsan/opt-web-platform-tests-reftest-e10s
-test-linux1804-64-tsan/opt-web-platform-tests-reftest-fis-e10s
-test-linux1804-64-tsan/opt-xpcshell-e10s
+test-linux1804-64-tsan-qr/opt-crashtest-e10s
+test-linux1804-64-tsan-qr/opt-crashtest-noqr-e10s
+test-linux1804-64-tsan-qr/opt-crashtest-swr-e10s
+test-linux1804-64-tsan-qr/opt-mochitest-a11y-1proc
+test-linux1804-64-tsan-qr/opt-mochitest-browser-chrome-swr-e10s
+test-linux1804-64-tsan-qr/opt-mochitest-media-e10s
+test-linux1804-64-tsan-qr/opt-mochitest-media-fis-e10s
+test-linux1804-64-tsan-qr/opt-mochitest-media-fis-gli-e10s
+test-linux1804-64-tsan-qr/opt-mochitest-media-gli-e10s
+test-linux1804-64-tsan-qr/opt-mochitest-media-spi-e10s
+test-linux1804-64-tsan-qr/opt-mochitest-plain-e10s
+test-linux1804-64-tsan-qr/opt-mochitest-plain-fis-e10s
+test-linux1804-64-tsan-qr/opt-reftest-e10s
+test-linux1804-64-tsan-qr/opt-reftest-noqr-e10s
+test-linux1804-64-tsan-qr/opt-reftest-swr-e10s
+test-linux1804-64-tsan-qr/opt-web-platform-tests-e10s
+test-linux1804-64-tsan-qr/opt-web-platform-tests-fis-e10s
+test-linux1804-64-tsan-qr/opt-web-platform-tests-reftest-e10s
+test-linux1804-64-tsan-qr/opt-web-platform-tests-reftest-fis-e10s
+test-linux1804-64-tsan-qr/opt-xpcshell-e10s

mozilla-release

--- target_task_set@32af9322f9bf
+++ target_task_set@ao_ci_linux_tsan
-test-linux1804-64-tsan/opt-crashtest-e10s
-test-linux1804-64-tsan/opt-reftest-e10s
+test-linux1804-64-tsan-qr/opt-crashtest-e10s
+test-linux1804-64-tsan-qr/opt-crashtest-noqr-e10s
+test-linux1804-64-tsan-qr/opt-crashtest-swr-e10s
+test-linux1804-64-tsan-qr/opt-reftest-e10s
+test-linux1804-64-tsan-qr/opt-reftest-noqr-e10s
+test-linux1804-64-tsan-qr/opt-reftest-swr-e10s

Differential Revision: https://phabricator.services.mozilla.com/D121099
2021-07-30 12:23:36 +00:00
Mike Hommey
2a73240e1f Bug 1723016 - Update builders to rustc 1.54. r=firefox-build-system-reviewers,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D121247
2021-07-30 11:11:28 +00:00
Mike Hommey
023ce9967d Bug 1582382 - Move rust malloc and oom hook to mozglue. r=firefox-build-system-reviewers,andi
This is similar to what was done in bug 1594998 for the panic hook.

Differential Revision: https://phabricator.services.mozilla.com/D121032
2021-07-28 20:33:08 +00:00
Toshihito Kikuchi
2fafdd4a72 Bug 1722566 - Add null checks in PEHeaders::FindResourceLeaf. r=mhowell
We had crashes in `PEHeaders::FindResourceLeaf` where `idDir` was nullptr.  This can
happen when the resource table is modified by a third-party application and an entry
in the table points to somewhere outside the executable.

Differential Revision: https://phabricator.services.mozilla.com/D121093
2021-07-28 19:11:43 +00:00
Andrew Osmond
1ec8367419 Bug 1722721 - Suppress new TSAN failures for WebRender. r=gfx-reviewers,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D121090
2021-07-28 14:33:11 +00:00
Mike Hommey
2979d0b082 Bug 1635327 - Disable __tls_get_addr interception in sanitizer builds. r=firefox-build-system-reviewers,emilio,andi
Sanitizers try to intercept __tls_get_addr to find DTLS blocks. In some
cases, they fail miserably with a crash. And in the cases they don't
crash, they don't seem to actually work properly anyways.

This affects both build time when running host programs compiled with
sanitizer flags (this only actually affects rust build
scripts/procedural macros on non-cross builds, not C/C++ host programs),
and execution time, e.g. when running tests.

Differential Revision: https://phabricator.services.mozilla.com/D120574
2021-07-22 22:00:59 +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
Gerald Squelart
7bc3116790 Bug 1721110 - baseprofiler::profiler_current_thread_id() now returns BaseProfilerThreadId - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D120224
2021-07-21 04:16:59 +00:00
Gerald Squelart
723be2ec1e Bug 1721110 - baseprofiler::profiler_current_process_id() now returns BaseProfilerProcessId - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D120222
2021-07-21 04:16:58 +00:00
Gerald Squelart
72f0855bfa Bug 1721110 - Introduce BaseProfilerProcessId and BaseProfilerThreadId - r=florian
These classes should replace the `int` type that is currently used to store process and thread ids. The next patches will start using them. Advantages:
- Prevent type mismatches, e.g., giving a process id (or other number) to a function expecting a thread id.
- Prevent nonsensical arithmetic operations.
- Make the unspecified id more abstract, so it's more obvious and portable.
- Make conversions to/from numbers (for display or storage) more visible.
- Allow future changes of APIs using them less risky.
- Allow future changes of the ids themselves (e.g., to be able to use bigger underlying types on some platforms, or even the opaque std:🧵:id type.)

Differential Revision: https://phabricator.services.mozilla.com/D120221
2021-07-21 04:16:57 +00:00
Gerald Squelart
a966352bcd Bug 1721110 - {,Base}ProfilerUtils.h with process&thread functions taken from {,Base}ProfilerState.h - r=florian
This new header isolates the process and thread functions that should be available in all builds, and in most other profiler headers.
Non-MOZ_GECKO_PROFILER implementations return ids 0 (unspecified process/thread). `profiler_is_main_thread()` returns false, it's arbitrary but consistent with `0` (it makes little sense to use it there anyway.)

Differential Revision: https://phabricator.services.mozilla.com/D120220
2021-07-21 04:16:57 +00:00
Gerald Squelart
171c2eed5f Bug 1721110 - {,Base}ProfilerState.h improvements: Sprinkle nodiscard's and more - r=florian
The next patch will extract parts of these headers into a separate file, so it's best to do this clean-up now, to best preserve history.
- Add [[nodiscard]] to all functions that return something. (There are no cases where that returned value could really be ignored.)
- Hide scProfilerMainThreadId in a "detail" namespace, to emphasize that it's an implementation detail that the user shouldn't access directly.
- Combine tightly-nested namespaces start/end into single lines, it's more readable.

Differential Revision: https://phabricator.services.mozilla.com/D120219
2021-07-21 04:16:56 +00:00
Gerald Squelart
02a156fe92 Bug 1720846 - Fix non-unified build by adding missing #includes - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D120301
2021-07-20 09:31:17 +00:00
Florian Quèze
292c1a1f60 Bug 1720368 - Remove MOZ_GECKO_PROFILER ifdefs around profiler_init and profiler_shutdown calls, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D119809
2021-07-15 22:04:23 +00:00
Mike Kaply
4ed207b4a1 Bug 1717676 - Unblock McAfee DLP > 11.6.300.2 r=tkikuchi
Differential Revision: https://phabricator.services.mozilla.com/D118515
2021-07-15 19:27:24 +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
Tom Ritter
42c0ec86b4 Bug 1666222: Rip fuzzyfox out of the timestamp classes 2/5 r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D119637
2021-07-14 18:18:16 +00:00
Doug Thayer
2571ca6323 Bug 1719849 - Include ProcessRuntime.cpp and friends if not SM build r=aklotz
Originally these includes were wrapped in an ACCESSIBILITY define because the
bug that manifested only affected screen readers. However, theoretically
speaking other things *could* cause us to initialize COM early and run into
troubles, so this is not *strictly* an a11y issue from that perspective. It
wasn't wrapped around ACCESSIBILITY defines inside PreXULSkeletonUI.cpp for
this reason, but there was still lingering inconsistency inside the moz.build
file. This corrects that.

Differential Revision: https://phabricator.services.mozilla.com/D119541
2021-07-14 18:09:32 +00:00
Kris Wright
3dc0547cf8 Bug 1671574 - Add perma TSan suppression to StartupCache r=decoder
It looks like this suppression was removed downstream, but StartupCache's behavior still exists so it most likely stopped causing failures because of some other suppression interacting with it. I decided the best course of action was to put it back as a perma suppression in gecko in case we run into it again.

Differential Revision: https://phabricator.services.mozilla.com/D119783
2021-07-13 21:13:28 +00:00
Gerald Squelart
9b0d666eda Bug 1719240 - Rework PSMutex into PSAutoLock - r=canaltinova
This prevents unwanted direct access to the mutex, and removes duplicated code.

And make the Base Profiler mutex&lock consistent.

Differential Revision: https://phabricator.services.mozilla.com/D119147
2021-07-13 12:20:49 +00:00
Markus Stange
e440698c82 Bug 1673755 - Strip pointer authentication hashes during stack walking on macOS arm64. r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D117168
2021-07-09 17:41:46 +00:00
Doug Thayer
b5f7314e3e Bug 1714212 - Ensure COM initialized prior to showing skeleton UI r=Jamie,aklotz,tkikuchi
This implements Jamie's suggested fixes for a screenreader issue when the
skeleton UI is enabled. Most of the work here is just pulling out pieces from the
files we needed to include in mozglue so that any references to, say, nsString
or other pieces from libxul either no longer exist or are only included when
building libxul. In a few cases this meant creating whole files to house single
functions, which isn't so pretty, but it was the best I could come up with to
get the job done.

Differential Revision: https://phabricator.services.mozilla.com/D117663
2021-07-07 22:37:14 +00:00
Narcis Beleuzu
1ff027d763 Backed out changeset acf2d74efbbc (bug 1714212) for SM bustages on NativeNt.h 2021-07-07 23:13:42 +03:00
Doug Thayer
dc9c284076 Bug 1714212 - Ensure COM initialized prior to showing skeleton UI r=Jamie,aklotz,tkikuchi
This implements Jamie's suggested fixes for a screenreader issue when the
skeleton UI is enabled. Most of the work here is just pulling out pieces from the
files we needed to include in mozglue so that any references to, say, nsString
or other pieces from libxul either no longer exist or are only included when
building libxul. In a few cases this meant creating whole files to house single
functions, which isn't so pretty, but it was the best I could come up with to
get the job done.

Differential Revision: https://phabricator.services.mozilla.com/D117663
2021-07-07 18:17:36 +00:00
Dorel Luca
bc6f2486e2 Backed out changeset 11d1710e481f (bug 1714212) for Browser-chrome failures in toolkit/xre/test/browser_checkdllblockliststate.js. CLOSED TREE 2021-06-26 09:45:29 +03:00
Doug Thayer
c3702a9447 Bug 1714212 - Ensure COM initialized prior to showing skeleton UI r=Jamie,aklotz,tkikuchi
This implements Jamie's suggested fixes for a screenreader issue when the
skeleton UI is enabled. Most of the work here is just pulling out pieces from the
files we needed to include in mozglue so that any references to, say, nsString
or other pieces from libxul either no longer exist or are only included when
building libxul. In a few cases this meant creating whole files to house single
functions, which isn't so pretty, but it was the best I could come up with to
get the job done.

Differential Revision: https://phabricator.services.mozilla.com/D117663
2021-06-26 04:10:50 +00:00
Mike Hommey
4ca3fd9016 Bug 1718131 - Add LSan suppressions for intentional leaks that somehow LSan didn't catch before. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D118828
2021-06-25 13:28:27 +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
Florian Quèze
c87b4eb7b7 Bug 1717991 - Profiler headers should declare all the marker related functions even when MOZ_GECKO_PROFILER is not defined, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D118679
2021-06-25 13:28:01 +00:00
Chris Martin
38d538c966 Bug 1701770 - Defer Windows DPI Awareness from load time to run time r=bobowen,aklotz
Currently, we set DPI awareness in the manifest files for firefox.exe.

Unfortunately, that causes DPI-related Win32k calls when user32.dll
is loaded.

This changes things to wait until we are sure we're not running in a
Win32k Lockdown Content Process before we attempt to initialize DPI scaling.

Differential Revision: https://phabricator.services.mozilla.com/D116433
2021-06-21 13:50:31 +00:00
Gerald Squelart
c83e6a0508 Bug 1715922 - Windows timer resolution is enhanced by default, except if notimerresolutionchange feature is set - r=canaltinova
This reverses bug 1703410: By default the profiler now changes the timer resolution (normally 64Hz) when the requested sampling interval is lower than 10ms, to allow fast-enough sampling for most uses.

But since this can influence other timers in Firefox, it makes debugging some types of issues more difficult. To help with this, there is now a "No Timer Resolution change" on Windows, which prevents the profiler from changing the timer resolution, at a risk of slowing down sampling in some processes.

Differential Revision: https://phabricator.services.mozilla.com/D117626
2021-06-21 11:48:23 +00:00
Narcis Beleuzu
192a45a34e Backed out 2 changesets (bug 1701770) for causing tp5n crashes.
Backed out changeset 2351f158ef88 (bug 1701770)
Backed out changeset 4af044ed9208 (bug 1701770)
2021-06-19 07:06:41 +03:00
Chris Martin
59f6230bef Bug 1701770 - Defer Windows DPI Awareness from load time to run time r=bobowen,aklotz
Currently, we set DPI awareness in the manifest files for firefox.exe.

Unfortunately, that causes DPI-related Win32k calls when user32.dll
is loaded.

This changes things to wait until we are sure we're not running in a
Win32k Lockdown Content Process before we attempt to initialize DPI scaling.

Differential Revision: https://phabricator.services.mozilla.com/D116433
2021-06-17 15:53:23 +00:00
Kris Wright
d669e4ca82 Bug 1683404 - Remove tsan suppressions for nsTimerImpl. r=Gankra
Try push shows that the issue is fixed with the above patch in the stack: https://treeherder.mozilla.org/jobs?repo=try&revision=a9e9135464b2750a8b6fd2a19408e3537b39dbe2

Differential Revision: https://phabricator.services.mozilla.com/D115776
2021-06-17 15:36:00 +00:00
Florian Quèze
dfeb53e219 Bug 1715257 - Remove Task Tracer code from the profiler, r=gerald,necko-reviewers.
Differential Revision: https://phabricator.services.mozilla.com/D117996
2021-06-17 09:33:00 +00:00
Iulian Moraru
b02492de66 Backed out changeset 617a466d0cce (bug 1715257) for causing build bustages. CLOSED TREE 2021-06-17 10:58:16 +03:00
Florian Quèze
7b4906a6bd Bug 1715257 - Remove Task Tracer code from the profiler, r=gerald,necko-reviewers.
Differential Revision: https://phabricator.services.mozilla.com/D117996
2021-06-17 06:12:10 +00:00
Noemi Erli
6fcc995a0a Backed out 2 changesets (bug 1701770) for causing failures in browser_checkdllblockliststate.js CLOSED TREE
Backed out changeset a6f46b0a30e9 (bug 1701770)
Backed out changeset 263591537722 (bug 1701770)
2021-06-15 04:09:49 +03:00
Chris Martin
d909ca765f Bug 1701770 - Defer Windows DPI Awareness from load time to run time r=bobowen,aklotz
Currently, we set DPI awareness in the manifest files for firefox.exe.

Unfortunately, that causes DPI-related Win32k calls when user32.dll
is loaded.

This changes things to wait until we are sure we're not running in a
Win32k Lockdown Content Process before we attempt to initialize DPI scaling.

Differential Revision: https://phabricator.services.mozilla.com/D116433
2021-06-14 20:55:33 +00:00
Toshihito Kikuchi
a0c3a4c847 Bug 1702717 - Skip blocklisting if the mappad region is not executable. r=mhowell
When a module is loaded with `LOAD_LIBRARY_AS_IMAGE_RESOURCE`, the mapped region
is `MEM_IMAGE`, but it's not executable.  We don't have to check the blocklist
in such a case.

Differential Revision: https://phabricator.services.mozilla.com/D117573
2021-06-11 22:45:46 +00:00
surajeet310
76bf30f3f0 Bug 1714688 - Removed 'if PY2' logic from mozglue r=mhentges
mozglue is no longer used with Python 2

Differential Revision: https://phabricator.services.mozilla.com/D117510
2021-06-11 20:37:44 +00:00
Alexandru Michis
c152381556 Backed out changeset 49f8a4acd649 (bug 1712674) for stack walking crashes on older Windows versions (bug 1715633).
CLOSED TREE
2021-06-10 11:39:30 +03:00
Gerald Squelart
ec93a05700 Bug 1712674 -- If RtlLookupFunctionEntry fails, attempt to unwind from BP - r=glandium
BP may contain the stack address where the caller's BP was pushed after the function call, in which case it's possible to carefully unwind from it.

This can get past JIT code, so there is no need to give up in this case.

mozglue was already linked with ntdll, but now that we use it directly (for `NtQueryInformationThread`), ntdll needed to be added to some other users of MozStackWalkThread.

Differential Revision: https://phabricator.services.mozilla.com/D115962
2021-06-09 00:28:03 +00:00
Gijs Kruitbosch
feb380e741 Bug 1711519 - remove tabbrowser non-proton code and gProton global browser window property, r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D116632
2021-06-03 11:41:55 +00:00
Dmitry Bezhetskov
3218df0314 Bug 1710358 - Fix compilation warnings for WASI. r=jandem.
kNsPerUs is unused and fputwc return's type is wint_t.

Differential Revision: https://phabricator.services.mozilla.com/D116578
2021-06-03 05:08:33 +00:00
Toshihito Kikuchi
f77b225313 Bug 1695817 - Part 1: Make nt::GetLeafName accept nsAString r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D109302
2021-05-28 22:35:57 +00:00