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

2322 Коммитов

Автор SHA1 Сообщение Дата
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
Alexandru Michis 8fbcd44dc4 Backed out 9 changesets (bug 1695817) for causing bc failures in content/aboutThirdParty.js
CLOSED TREE

Backed out changeset 6b7f451e911e (bug 1695817)
Backed out changeset ad3ea67b3d70 (bug 1695817)
Backed out changeset b4f971059f3f (bug 1695817)
Backed out changeset 9c9a928d4a70 (bug 1695817)
Backed out changeset 4a9bcb38fddf (bug 1695817)
Backed out changeset 48c0eed38628 (bug 1695817)
Backed out changeset 7583675dccb1 (bug 1695817)
Backed out changeset e3f2bed63c33 (bug 1695817)
Backed out changeset 1c45ba4fba61 (bug 1695817)
2021-05-28 21:53:41 +03:00
Toshihito Kikuchi 9672ed9057 Bug 1695817 - Part 1: Make nt::GetLeafName accept nsAString r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D109302
2021-05-28 15:32:29 +00:00
Butkovits Atila 3735a33d14 Backed out 9 changesets (bug 1695817) for causing build bustages. CLOSED TREE
Backed out changeset 49be1caf6501 (bug 1695817)
Backed out changeset 30f1382d6058 (bug 1695817)
Backed out changeset ab9fa7f3b633 (bug 1695817)
Backed out changeset b03b122438cc (bug 1695817)
Backed out changeset 812a6bbfbe0e (bug 1695817)
Backed out changeset 3551230a7522 (bug 1695817)
Backed out changeset c7354b48fbee (bug 1695817)
Backed out changeset 4860450c2e23 (bug 1695817)
Backed out changeset 29dee289f866 (bug 1695817)
2021-05-28 07:52:30 +03:00
Toshihito Kikuchi ccf62d7b68 Bug 1695817 - Part 1: Make nt::GetLeafName accept nsAString r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D109302
2021-05-28 04:19:05 +00:00
Butkovits Atila 711401ea39 Backed out 9 changesets (bug 1695817) for causing failures at browser_all_files_referenced.js. CLOSED TREE
Backed out changeset df4086427aaf (bug 1695817)
Backed out changeset 119a24f8be08 (bug 1695817)
Backed out changeset fd277ae2a7b8 (bug 1695817)
Backed out changeset a2c86a645fa8 (bug 1695817)
Backed out changeset c73705233fc4 (bug 1695817)
Backed out changeset 0a80eea3c0fa (bug 1695817)
Backed out changeset 9af42c7a3ca7 (bug 1695817)
Backed out changeset a2d11a0849d5 (bug 1695817)
Backed out changeset ba3ddcc28cbf (bug 1695817)
2021-05-28 03:05:09 +03:00
Toshihito Kikuchi 82431c81c9 Bug 1695817 - Part 1: Make nt::GetLeafName accept nsAString r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D109302
2021-05-27 21:14:12 +00:00
Joel Maher 3ad9f06697 Bug 1710923 - migrate windows 7x32 debug tests to windows 10x32. r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D115017
2021-05-24 20:06:43 +00:00
Agi Sferro 5e28045dd6 Bug 1701269 - Remove unused MinidumpAnalyzer. r=owlish
Differential Revision: https://phabricator.services.mozilla.com/D109919
2021-05-20 22:03:03 +00:00
Gerald Squelart 098790a8eb Bug 1703410 - Only change Windows timer resolution if PROFILER_ADJUST_TIMER_RESOLUTION is set - r=florian
On Windows, the profiler changes the timer resolution when the sampling interval is less than 10ms.
However this change affects all of Firefox, which can change other behaviors, sometimes causing confusion when refresh-rate issues magically disappear when the profiler is running.

So now by default the profiler will not change the timer resolution. This should rarely affect the profiler's effective sampling rate, unless all threads in a process are in a waiting state, in which case there is nothing new to sample anyway! The front-end is investigating ways to make sampling gaps more obvious, see https://github.com/firefox-devtools/profiler/issues/2962

If some power users really need the added sampling precision in some profiling sessions, the timer resolution change may be requested before running Firefox, by setting the environment variable "PROFILER_ADJUST_TIMER_RESOLUTION" to any value.

Differential Revision: https://phabricator.services.mozilla.com/D115451
2021-05-19 22:29:17 +00:00
Mike Hommey e5c65130a4 Bug 1711838 - Avoid GCC warning about %s argument possibly being null. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D115450
2021-05-19 22:19:03 +00:00
Toshihito Kikuchi d8fe2ac176 Bug 1702086 - Part4: Use PEHeaders::GetBounds instead of GetModuleInformation. r=gerald
`SharedLibraryInfo::GetInfoForSelf()` can use `PEHeaders::GetBounds` instead of
`GetModuleInformation` to get the start/end address of a module's mapped region
in the local process.  It's roughly 100x faster because `GetModuleInformation`
invokes two system calls `NtQueryInformationProcess` and `NtReadVirtualMemory`
while `nt::PEHeaders` does not.

Depends on D115254

Differential Revision: https://phabricator.services.mozilla.com/D115255
2021-05-19 18:01:49 +00:00
Toshihito Kikuchi 2755a48956 Bug 1702086 - Part3: Use PEHeaders::GetVersionInfo. r=gerald
This patch replaces two versions of `GetVersion` in Gecko profiler and
baseprofiler with `PEHeaders::GetVersionInfo`.

Depends on D115253

Differential Revision: https://phabricator.services.mozilla.com/D115254
2021-05-19 18:01:48 +00:00
Toshihito Kikuchi 4e1b4037be Bug 1702086 - Part2: Get PDB information from the new handle. r=gerald
This patch is the actual fix for Bug 1702086.  The problem of Bug 1702086 is that
`LoadLibraryExW` loaded the module onto an address different from the original
mapped addresss because it was unloaded after we started enumeration.  Calling
`GetPdbInfo` with the original address `module.lpBaseOfDll` caused a crash.

The proposed fix consists of three parts.

The first part is to get PDB information from `handleLock`, which is always valid
even if the original address was unloaded.  With this, we don't need a check
of `VirtualQuery`.

The second part is to add `LOAD_LIBRARY_AS_IMAGE_RESOURCE` along with
`LOAD_LIBRARY_AS_DATAFILE` to the call to `LoadLibraryEx`.  This is needed
to read information from the sections outside the PE headers because
RVA (= relative virtual address) is an address after relocation.
Without `LOAD_LIBRARY_AS_IMAGE_RESOURCE`, a module is mapped without relocation,
so `GetPdbInfo()` accesses wrong memory resulting in a crash.

The third part is to introduce `PEHeaders::GetPdbInfo`, replacing two versions
of `GetPdbInfo` in Gecko profiler and baseprofiler.

Depends on D115252

Differential Revision: https://phabricator.services.mozilla.com/D115253
2021-05-19 18:01:48 +00:00
Toshihito Kikuchi d64610fed5 Bug 1702086 - Part1: Introduce EnumerateProcessModules. r=gerald
This patch introduces `EnumerateProcessModules` to enumerate all loaded modules
in the local process so that Gecko profiler and baseprofiler can use it.

Differential Revision: https://phabricator.services.mozilla.com/D115252
2021-05-19 18:01:47 +00:00
Gerald Squelart 8b96edfb80 Bug 1710757 - Fix baseprofiler native-frame output - r=florian
SprintfLiteral doesn't support "%#llx" anymore.
So this patch switches to an explicit "0x%llx" to output addresses as the symbolicator expects.

Differential Revision: https://phabricator.services.mozilla.com/D114914
2021-05-12 10:22:55 +00:00
Andi-Bogdan Postelnicu eab549fd19 Bug 1519636 - Initial reformat of C/C++ code with clang-format version 12.0.0. r=sylvestre
clang-format version 12.0.0 (taskcluster-KEgO7qdgQ8uaewA6NkRnRA)

Differential Revision: https://phabricator.services.mozilla.com/D114211
2021-05-10 07:15:07 +00:00
Toshihito Kikuchi 3abb99c8e2 Bug 1706041 - Reset gDllServices when DllServices is destroyed. r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D113524
2021-05-07 19:11:48 +00:00