Commit Graph

1719 Commits

Author SHA1 Message Date
Gerald Squelart
36b452b4ba Bug 1654128 - Added missing #includes in baseprofiler/lul - r=canaltinova
The build would fail in non-unified mode and/or when adding/removing other files.

Differential Revision: https://phabricator.services.mozilla.com/D84272
2020-07-21 08:20:20 +00:00
Tyson Smith
d478a0fb18 Bug 1651446 - Suppress TSan FFMpeg false positives. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D84048
2020-07-20 22:34:45 +00:00
Gerald Squelart
126afc3ab4 Bug 1653181 - Profiler feature 'audiocallbacktracing' controls Start/StopAudioCallbackTracing(), off by default - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D83749
2020-07-17 11:22:23 +00:00
Byron Campen [:bwc]
d1af59c9fe Bug 1652174: Suppress TSan race error in libevent's event_debug_mode_too_late r=dminor
See https://github.com/libevent/libevent/issues/777

Depends on D83794

Differential Revision: https://phabricator.services.mozilla.com/D83825
2020-07-16 18:22:49 +00:00
Byron Campen [:bwc]
9b9dac6d1c Bug 1652499: Suppress TSan race detection in webrtc.org's Loggable. r=dminor
Differential Revision: https://phabricator.services.mozilla.com/D83794
2020-07-16 18:23:09 +00:00
Randell Jesup
fa153eb95d Bug 1642772: name processes in the profiler with eTLD+1 r=gerald,dveditz
Differential Revision: https://phabricator.services.mozilla.com/D77926
2020-07-15 18:00:54 +00:00
Sylvestre Ledru
1dbb63db2b Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D83258
2020-07-14 09:34:19 +00:00
Gerald Squelart
8049dc9c3e Bug 1651086 - Allow profiler_register_thread from thread with already-registered id - r=canaltinova
It is possible that some threads fail/forget to unregister themselves, in which case a registered thread id could get recycled by a later thread, which was not allowed before this patch.

Note: The thread name cannot currently be changed. We record a special marker with the new name, so the frontend could process it to split the thread track at that point.

We also record a marker when profiler_unregister_thread is called from an already-unregistered thread, this could help find reg/unreg mismatches or nesting in Firefox threads.

Differential Revision: https://phabricator.services.mozilla.com/D83293
2020-07-13 13:18:29 +00:00
Gerald Squelart
7610ff4326 Bug 1651086 - Handle tgkill failure - r=canaltinova
On Linux (including Android), it was assumed that a registered thread could always be suspended through `tgkill`.
However in some cases a thread may not be correctly unregistered, in which case this would trigger `MOZ_ASSERT` or wait forever in the following loop.

This will especially be needed when `profiler_{,un}register_thread()` are made less strict in the following patch.

Windows and Mac already handle suspension failures.

Differential Revision: https://phabricator.services.mozilla.com/D83292
2020-07-13 13:14:32 +00:00
Dana Keeler
24db0c88fc Bug 1629002 - unblock asepkcs.dll r=tkikuchi
When the osclientcerts module attempts to use client certificates and keys from
certain tokens, the Windows APIs will attempt to load asepkcs.dll. If Firefox
blocks this library, the keys won't be available. Thus, it needs to be
unblocked.

Due to the architecture of osclientcerts (namely, its dedicated single thread),
using asepkcs.dll via the Windows APIs shouldn't cause the crashes that led to
this module being blocked.

Differential Revision: https://phabricator.services.mozilla.com/D82788
2020-07-10 22:39:38 +00:00
Mike Hommey
e2151e9228 Bug 1651903 - Stop preprocessing mozglue.def. r=froydnj
The file defines symbol renames to perform when linking. The list of
symbols to rename varies between an empty list and a full list depending
whether MOZ_MEMORY is set. Practically speaking, the variant with an
empty list is equivalent to not using a def-file at all.

This means we don't need to preprocess it any more, and we can just not
use a def-file when MOZ_MEMORY is not set.

As a side effect, this removes a rule from a Makefile.in.

Differential Revision: https://phabricator.services.mozilla.com/D83034
2020-07-10 15:27:10 +00:00
Csoregi Natalia
c275f8f4bb Backed out changeset e106c60b7be4 (bug 1607212) for tsan fails on CacheEntry.cpp. CLOSED TREE 2020-07-09 20:43:30 +03:00
Christian Holler
2c66728ad6 Bug 1642906 - Updating TSan suppressions for performance counter fix. r=perry
Differential Revision: https://phabricator.services.mozilla.com/D82898
2020-07-09 15:06:45 +00:00
Christian Holler
baf7486d56 Bug 1607212 - Update TSan suppressions for fixed Necko cache race. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D82899
2020-07-09 14:13:27 +00:00
Nick Alexander
1b75555dc7 Bug 1651136 - Part 1: Allow (and mark) certain xpcom/ headers as non-XPCOM. r=froydnj,bytesized
`nscore.h` includes `xpcom-config.h` which need not be generated for
non-XPCOM consumers.  In additon, `nullptr` and `bool` are C++
keywords, so at least some of the comments were dated.

The added include lines address transitive consumers of `nscore.h`.

Differential Revision: https://phabricator.services.mozilla.com/D82640
2020-07-08 22:57:26 +00:00
Mike Hommey
69fef46cab Bug 1651079 - Add necessary LOCAL_INCLUDES for StackWalk.cpp in memory/replace/logalloc/replay. r=rstewart
This requires a workaround for the use of __wrap_dladdr, which can't be
used in logalloc-replay. The workaround involves making __wrap_dladdr
expand to dladdr, but that makes the definition ElfLinker.h conflict
with the one in the Android system headers, so we change it to match,
and adjust ElfLinker.cpp accordingly.

And while here, fix the condition in mozglue/misc to match the condition
around including Linker.h in StackWalk.cpp itself.

Differential Revision: https://phabricator.services.mozilla.com/D82648
2020-07-08 21:37:24 +00:00
Gerald Squelart
f9612141f1 Bug 1649776 - Use a separate mutex to access ProfileBufferChunkManagerWithLocalLimit::mUpdateCallback - r=canaltinova
To avoid deadlocks between the buffer main mutex and the externally-provided update callback code, the callback storage is now using a separate mutex, and both mutexes are never held at the same time.

Differential Revision: https://phabricator.services.mozilla.com/D82141
2020-07-06 12:38:06 +00:00
Mike Hommey
6b2fc90663 Bug 689178 - Remove crash-reporter hooks to externally provide library mappings. r=gsvelto
This is a rebase of a 7-year-old patch that was r=ted. The hooks are not
used as of bug 725231.

Differential Revision: https://phabricator.services.mozilla.com/D81026
2020-06-25 08:43:23 +00:00
Mike Hommey
200194bccd Bug 725231 - Stop reporting library mappings to the crash reporter. r=snorp
This is a rebase of a 7-year-old patch that was r=taras. Back then it
was waiting for breakpad changes that never were reviewed. However,
since then, bug 1486524 made the linker always map uncompressed files
directly, making it less necessary to report the library mappings to
the crash reporter, and bug 1291377 disabled the linker altogether on
Android 6.0+, which makes report_mapping unused at all in that case.

Differential Revision: https://phabricator.services.mozilla.com/D81025
2020-07-06 14:38:29 +00:00
Sylvestre Ledru
caf785c695 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D82178
2020-07-04 09:38:43 +00:00
Toshihito Kikuchi
b80c6d24b1 Bug 1642626 - Part3: Handle a detour pattern of multple jumps. r=handyman
AVG AntiVirus hooks ntdll!NtMapViewOfSection by planting two JMP instructions,
jumping to a trampoline area first, then jumping to aswhook.dll.

```
ntdll!NtMapViewOfSection:
00007ffa`6d77c560 e9d33cfebf      jmp     00007ffa`2d760238

00007ffa`2d760238 ff25f2ffffff    jmp     qword ptr [00007ffa`2d760230] --> 00007ffa`541e2ad0

aswhook+0x2ad0:
00007ffa`541e2ad0 4055            push    rbp
00007ffa`541e2ad2 53              push    rbx
00007ffa`541e2ad3 56              push    rsi
```

With this patch, our detour can detour on top of that pattern.  The first part is
to remove the MEM_IMAGE check from IsPageAccessible.  The second part is to introduce
a loop in ResolveRedirectedAddress to resolve a chain of jumps.

Differential Revision: https://phabricator.services.mozilla.com/D81582
2020-07-02 16:43:14 +00:00
Toshihito Kikuchi
fd9eb542c9 Bug 1642626 - Part2: Handle JAE and Opcode83 on x64 without REX Prefix. r=handyman
Depends on D81580

Differential Revision: https://phabricator.services.mozilla.com/D81581
2020-07-02 16:43:01 +00:00
Toshihito Kikuchi
31a3cc0614 Bug 1642626 - Part1: Take out jump detection from ReadOnlyTargetFunction. r=handyman
This patch moves the logics of jump detection from ResolveRedirectedAddress to
ReadOnlyTargetFunction to simplify ReadOnlyTargetFunction.

Differential Revision: https://phabricator.services.mozilla.com/D81580
2020-07-02 16:42:54 +00:00
Gerald Squelart
56736f31c3 Bug 1648507 - Distinguish pausing sampling only from pausing the whole profiler - r=canaltinova,perftest-reviewers,geckoview-reviewers,agi
The profiler can be "paused", which stops sampling, and since bug 1578329 stops markers as well.

Some test suites use pausing between tests (to better differentiate the tests, to keep the profiler ready to run, and to lower the amount of recorded data). But this causes problems with some tracing markers, as their matching ends have not been recorded (e.g., an end marker is missing), which show up as very loooong markers.
To solve this, we need to be able to pause sampling only, but keep recording markers.
But we still need to be able to pause the whole profiler, in particular before capturing, to avoid recording anything around that time.

This big patch is mostly mechanical changes: Wherever there are "Pause" and "Unpause/Resume" profiler functions, we add matching "PauseSampling" and "UnpauseSampling/ResumeSampling" functions that only impact the periodic sampling loop; And existing "Pause/Unpause/Resume" imply pausing sampling as well.
Exceptions and extra work:
- nsIProfiler (the JS API) already had `Pause/ResumeSampling()`, which misleadingly paused everything! Now they do the right thing, and we have `Pause/Resume()` as well.
- All tests using `Pause/ResumeSampling()` now use `Pause/Resume()`, except for Talos tests that only pause sampling between tests; Added some extra `Pause()` calls to pause everything before capturing profiles.
- GeckoJavaSampler doesn't handle pausing/resuming everything, this should be done in a follow-up bug.
- Sampling-only pauses are not streamed into JSON. If needed, we should follow-up, with potential work on the front-end to deal with these.

Differential Revision: https://phabricator.services.mozilla.com/D81492
2020-07-02 01:36:27 +00:00
Nathan Froyd
7c8d2e7c35 Bug 1649261 - stop cargo-culting mfbt headers in MmapFaultHandler.h; r=glandium
This header is using `MOZ_RAII` and `MFBT_ABI` from `Attributes.h` and
`Types.h`, respectively, so it should include those headers.

Differential Revision: https://phabricator.services.mozilla.com/D81600
2020-07-01 13:39:34 +00:00
Simon Giesecke
9364b353d4 Bug 1648010 - Remove NS_NAMED_LITERAL_CSTRING and NS_NAMED_LITERAL_STRING macros. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80631
2020-07-01 08:42:31 +00:00
Simon Giesecke
cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Cameron Kaiser
1c860a4d74 Bug 1649653 - fix compilation on non-profiler platforms. r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D81803
2020-07-01 03:03:56 +00:00
Jon Coppeard
15c4eee6dc Bug 1647702 - Broaden the race supression for compacting race between updating ObjectGroups and Shapes r=sfink
This is a data race, but I don't think it is causing problems at the moment.  It will go away when we get rid of ObjectGroups and is not trivial to fix, hence the decision to suppress it.

Differential Revision: https://phabricator.services.mozilla.com/D81327
2020-06-26 16:25:03 +00:00
Mike Hommey
77976c2cc1 Bug 1463035 - Remove MOZ_SIGNAL_TRAMPOLINE. r=gerald
This was previously r=jchen and landed, but was backed out because some
Android tests were running on an unrealistically old Linux kernel. These
tests have been retired, so this can reland.

Differential Revision: https://phabricator.services.mozilla.com/D81278
2020-06-26 03:48:49 +00:00
Mike Hommey
219d10e7ce Bug 1648654 - Remove AutoObjectMapperFaultyLib. r=gerald
Bug 1486524 disabled the features from the custom linker that required
AutoObjectMapperFaultyLib. We can now rely on AutoObjectMapperPOSIX
instead.

Differential Revision: https://phabricator.services.mozilla.com/D81264
2020-06-26 01:26:56 +00:00
Mike Hommey
3a241e8832 Bug 1648340 - Only call GetAndroidSDKVersion() on Android. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D81024
2020-06-25 10:59:19 +00:00
Mike Hommey
a1386ca439 Bug 1648340 - Set LOCAL_INCLUDES properly for AutoObjectMapper.h. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D81023
2020-06-25 10:59:32 +00:00
Simon Giesecke
0378cc49f9 Bug 1648384 - Make use of Result::propagateErr. r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D81031
2020-06-25 16:07:28 +00:00
Gerald Squelart
665b0d71d2 Bug 1630448 - MOZ_PROFILER_STARTUP_NO_BASE=1 prevents Base Profiler from running when MOZ_PROFILER_STARTUP is set - r=canaltinova
The Base Profiler is still recent and barely used, so it may contain some bugs.
With bug 1586939, the Base Profiler is now used more often because it is controlled the same way as the Gecko Profiler.
This has surfaced some intermittent issues, which pollute existing tests.

Until the root cause is found (see bug 1648325), setting `MOZ_PROFILER_STARTUP_NO_BASE=1` prevents the Base Profiler from running. This may be used where problems are visible, to diagnostic them and/or reduce them where needed.

Differential Revision: https://phabricator.services.mozilla.com/D81018
2020-06-25 07:13:43 +00:00
Gerald Squelart
8c64fc6990 Bug 1642726 - maybelocked_profiler_add_marker_for_thread - r=gregtatum
This function can be called whether the profiler mutex is locked or not. If locked, the provided pointer to the profiler mutex is used internally, otherwise the mutex will be locked as needed.

Differential Revision: https://phabricator.services.mozilla.com/D79412
2020-06-22 14:36:18 +00:00
Gerald Squelart
b834db3337 Bug 1642726 - locked_profiler_get_backtrace - r=gregtatum
`locked_profiler_get_backtrace` can be used internally from places that already hold the profiler lock.

Differential Revision: https://phabricator.services.mozilla.com/D79411
2020-06-22 14:36:16 +00:00
Gerald Squelart
ddbeeb188c Bug 1642726 - PSAutoTryLock - r=gregtatum
PSAutoTryLock attempts to lock the mutex, but gives up immediately if it's already locked.
This can be used in profiler functions that may be called from unknown code, to avoid deadlocks involving the profiler mutex and another mutex that could be indirectly used by the profiler itself.

Differential Revision: https://phabricator.services.mozilla.com/D79410
2020-06-22 21:30:06 +00:00
Ted Campbell
5f98fae13b Bug 1645469 - Add profiler subcategories for SpiderMonkey JITs. r=jandem,gerald
In the JIT frame sampler, we apply the appropriate category in addition to
the "implementation" field. For JS frames (IS_JS_FRAME), we identify as
either BaselineInterpreter or Interpreter. Note that JS_Other still applies
to various places we enter SpiderMonkey outside of RunScript.

Differential Revision: https://phabricator.services.mozilla.com/D79524
2020-06-15 14:56:50 +00:00
Ted Campbell
6aa5132146 Bug 1645464 - Use a shared ProfilingCategoryList.h r=gerald,froydnj
Replace the duplicate lists in mozglue/baseprofiler/public and js/public with
a shared list. Add this list to both moz.build files so it is published twice
which simplifies supporting different standalone configurations.

Differential Revision: https://phabricator.services.mozilla.com/D79520
2020-06-15 13:59:55 +00:00
Paul Adenot
bdfef650d8 Bug 1626918 - Add categories for real-time media tracing. r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D78509
2020-06-12 13:13:53 +00:00
Toshihito Kikuchi
5002a0f0f7 Bug 1407712 - Block more versions of guard64.dll of Comodo Firewall. r=gcp
Differential Revision: https://phabricator.services.mozilla.com/D79238
2020-06-11 14:36:44 +00:00
Ted Campbell
b3e185db5d Bug 1644218 - Add blinterp implementation tracking to profiler r=jandem,gerald
Introduce an IS_BLINTERP_FRAME flag to ProfilingStackFrame to distinguish C++
and Baseline interpreter frames. In the profile data this sets the
"implementation" to "blinterp".

Differential Revision: https://phabricator.services.mozilla.com/D78725
2020-06-09 12:27:15 +00:00
Ted Campbell
393ca29b50 Bug 1644218 - Cleanup ProfilingStackFrame flags r=gerald
Round the number of reserved flag bits up to 16. This leaves 16-bits for the
category (so 64k subcategories). Also make the baseprofiler consistent.

Differential Revision: https://phabricator.services.mozilla.com/D78724
2020-06-08 23:46:16 +00:00
Toshihito Kikuchi
b0d58c5da3 Bug 1637984 - Part 2: Block PavLspHook64.dll on Win7 and older. r=gcp
Depends on D78414

Differential Revision: https://phabricator.services.mozilla.com/D78415
2020-06-08 15:43:30 +00:00
Toshihito Kikuchi
686269d213 Bug 1637984 - Part 1: Introduce a new blocklist flag BLOCK_WIN7_AND_OLDER. r=mhowell
This patch introduces a new flag `BLOCK_WIN7_AND_OLDER` with which the blocklist
blocks a module on Win7 or older.

Differential Revision: https://phabricator.services.mozilla.com/D78414
2020-06-05 16:50:51 +00:00
Botond Ballo
e49f09d719 Bug 1642884 - Protect all access to Axis::mVelocity with a mutex. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D78556
2020-06-08 16:14:29 +00:00
Toshihito Kikuchi
411136143a Bug 1643200 - Rename BLOCK_WIN8_ONLY into BLOCK_WIN8_AND_OLDER. r=mhowell
`BLOCK_WIN8_ONLY` was introduced by bug 1268470 to block klsihk64.dll only on
Win8.  However, a new blocklist (bug 1445025) does wrong comparison on the OS
version, thus `BLOCK_WIN8_ONLY` has blocked modules on all platforms older than
Win10 including Win7 and Win8.1.

This patch corrects OS comparison and changes the flag to `BLOCK_WIN8_AND_OLDER`
to make it more handy.  We also remove `BLOCK_WIN8PLUS_ONLY` which is never used.

Differential Revision: https://phabricator.services.mozilla.com/D78411
2020-06-05 17:12:57 +00:00
Botond Ballo
117ae10a93 Bug 1642884 - Temporarily suppress data race in Axis::UpdateWithTouchAtDevicePoint. r=fix CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D78176
2020-06-03 23:51:28 +00:00
Kevin Jacobs
e11c127de7 Bug 1643087 - Extend TSAN false-positive suppression to BadCertAndPinningServer. r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D78116
2020-06-03 18:16:36 +00:00