Commit Graph

1291 Commits

Author SHA1 Message Date
Gerald Squelart
a07a9b2250 Bug 1574825 - Make ModuloBuffer::Iterator a proper random-access iterator - r=gregtatum
This allows its use in std algorithms and types that require a real iterator
(like `template <typename InputIt> std::string::string(InputIt, InputIt)`).

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

--HG--
extra : moz-landing-system : lando
2019-08-20 12:51:31 +00:00
Gerald Squelart
ed60590cee Bug 1574824 - BlocksRingBuffer:SizeOf{Ex,In}cludingThis - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D42451

--HG--
extra : moz-landing-system : lando
2019-08-20 12:49:50 +00:00
Gerald Squelart
0a514cb1ca Bug 1574824 - ModuloBuffer:SizeOf{Ex,In}cludingThis - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D42450

--HG--
extra : moz-landing-system : lando
2019-08-20 12:49:32 +00:00
Gerald Squelart
50443e7037 Bug 1574822 - BlocksRingBuffer::Reader::At() - r=gregtatum
`Reader::At()` can be used to get a `BlockIterator` at a given `BlockIndex`,
clamped between `begin()` and `end()`.

This will be useful when we want to iterate starting at a given index, e.g.,
when duplicating stacks.

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

--HG--
extra : moz-landing-system : lando
2019-08-20 14:26:07 +00:00
Gerald Squelart
46f5e181ee Bug 1574821 - TestBaseProfiler generates more labels and markers - r=gregtatum
The main goal of these bugs is to move markers to a new storage, so I'm adding
lots of markers to TestBaseProfiler.
Also adding labels, easier to read unsymbolicated profiles, and gives a bit more
coverage too.
And adding a separate "fibonacci canceller" thread, which is needed on some
slower platforms (e.g., Linux 64 ASAN times out otherwise); as a bonus, this
tests AUTO_BASE_PROFILER_REGISTER_THREAD.

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

--HG--
extra : moz-landing-system : lando
2019-08-20 03:29:53 +00:00
Gerald Squelart
16f6820be1 Bug 1569871 - MOZ_PROFILER_STARTUP set to ''/'0'/'N'/'n' does not start the profiler - r=canaltinova
(Also MOZ_BASE_PROFILER_STARTUP.)

This makes it easier to keep that variable setup in the environment, and change
its value to switch between enabling and disabling the profiler.

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

--HG--
extra : moz-landing-system : lando
2019-08-19 08:36:28 +00:00
Nazım Can Altınova
a35427a236 Bug 1574187 - Stabilize profilerOverhead data in profile json. r=gerald
Depends on D42285

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

--HG--
extra : moz-landing-system : lando
2019-08-16 12:18:01 +00:00
Nazım Can Altınova
6eb786c0d4 Bug 1574187 - Add a samples object that contains all the samples in profilerOverhead. r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D42285

--HG--
extra : moz-landing-system : lando
2019-08-16 12:17:29 +00:00
Gerald Squelart
e99e0cc6db Bug 1574143 - Make BlocksRingBuffer::Reader RAII - r=gregtatum
In practice the Reader doesn't need to be copied/moved/reassign.
BlocksRingBuffer::Read() can just instantiate one on the stack, and pass it by
reference to callbacks.

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

--HG--
extra : moz-landing-system : lando
2019-08-16 03:55:08 +00:00
Gerald Squelart
ac3d39c7f3 Bug 1574143 - Remove BlocksRingBuffer::EntryReserver - r=gregtatum
The point of the EntryReserver was mainly to have an object that represented a
writing lock on BlocksRingBuffer, so potentially perform multiple consecutive
writes.
After some experience implementing bug 1562604, there's actually no need for it.

So instead of having `Put()` create an `EntryReserver`, we now have
`ReserveAndPut()` that does the whole work in one function.

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

--HG--
extra : moz-landing-system : lando
2019-08-16 03:54:49 +00:00
Gerald Squelart
11b3a5f66e Bug 1574143 - Make BlocksRingBuffer::EntryWriter RAII - r=gregtatum
EntryWriter doesn't even need to be moveable, as BlocksRingBuffer can just
create one on the stack, and pass it by reference to callbacks.
This removes risks, and potential data copies.

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

--HG--
extra : moz-landing-system : lando
2019-08-16 04:02:18 +00:00
Makoto Kato
c4cb964c8e Bug 1572613 - Use frame pointer based stack walker even if Android/x86 and Android/x86-64. r=jseward
Actually, we use clang for all Linux and Android platform, so it is no reason to use frame pointer based stack walker for LUL on Android/x86 and Android/x86-64 if no DWARF rule.

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

--HG--
extra : moz-landing-system : lando
2019-08-13 07:34:29 +00:00
Aaron Klotz
a69086ea54 Bug 1573273: Add ProfilerLabelBegin and ProfilerLabelEnd to mozglue; r=gerald
While mozglue continues to be the correct location for calling the affected
code in this patch, the calls requiring profiler labels will soon be
originating from firefox.exe via the launcher process.

mozglue will be supplying the launcher process with an interface that consists
of what are effectively "OnBeginDllLoad" and "OnEndDllLoad" callback
notifications; obviously an RAII class is not going to be useful for that case.

We still want to keep the RAII stuff around, however, since we still need it
for cases where we need to fall back to using the legacy DLL blocklist.

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

--HG--
extra : moz-landing-system : lando
2019-08-14 03:46:41 +00:00
Aaron Klotz
6e2191877a Bug 1573274: Add mozglue-only SuppressStackWalking and DesuppressStackWalking functions to StackWalk on Windows; r=glandium
While mozglue continues to be the correct location for calling the affected
code in this patch, the calls requiring stackwalk suppression will soon be
originating from firefox.exe via the launcher process.

mozglue will be supplying the launcher process with an interface that consists
of what are effectively "OnBeginDllLoad" and "OnEndDllLoad" callback
notifications; obviously an RAII class is not going to be useful for that case.

We still want to keep the RAII stuff around, however, since we still need it
for cases where we need to fall back to using the legacy DLL blocklist.

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

--HG--
extra : moz-landing-system : lando
2019-08-14 03:34:52 +00:00
Gerald Squelart
86c0b62678 Bug 1573111 - BlocksRingBuffer can switch underlying buffer - r=gregtatum
`BlocksRingBuffer` will be used both inside and outside `ProfileBuffer`:
- Inside to serve as `ProfileBuffer`'s main storage for stack traces,
- Outside to allow marker storage even when `ProfileBuffer` is locked during
  stack sampling.

`ProfileBuffer` only exists while `ActivePS` is alive, but because of the
potential outside accesses above (due to small races between ProfileBuffer
shutdown, and thread-local IsBeingProfiled() flags), we cannot just do the same
for BlocksRingBuffer, and it must remain alive to gracefully deny these accesses
around the profiler startup and shutdown times.

To accomplish this, `BlocksRingBuffer` may be in different states:
- "In-session", we have a real buffer to write to and read from,
- "Out-of-session", without buffer so reads&writes do nothing.
This is implemented by enclosing the underlying `ModuloBuffer` and the entry
deleter in a `Maybe`, which may be `Nothing` when the profiler is not running
and the `ProfileBuffer`'s `BlocksRingBuffer` is out-of-session.

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

--HG--
extra : moz-landing-system : lando
2019-08-13 12:06:40 +00:00
Emilio Cobos Álvarez
c3ee3ac3a8 Bug 1418624 - Allow mozilla::Result to be moved, make unwrap{,Err}() move, and add inspect() APIs that return references. r=froydnj
Also adjust some of the callers that were either calling unwrap() repeatedly on
the same result, or were doing silly copies, to use inspect().

We could try to use stuff like:

https://clang.llvm.org/docs/AttributeReference.html#consumed-annotation-checking

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

--HG--
extra : moz-landing-system : lando
2019-08-13 08:26:18 +00:00
Sylvestre Ledru
645f2d5773 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-08-13 07:15:25 +00:00
Brindusan Cristian
a8a9f04996 Backed out changeset 58dd47c5aa51 (bug 1573111) for build bustages at TestBaseProfiler.cpp:875:51. CLOSED TREE 2019-08-13 06:21:16 +03:00
Gerald Squelart
b2274966d4 Bug 1573111 - BlocksRingBuffer can switch underlying buffer - r=gregtatum
`BlocksRingBuffer` will be used both inside and outside `ProfileBuffer`:
- Inside to serve as `ProfileBuffer`'s main storage for stack traces,
- Outside to allow marker storage even when `ProfileBuffer` is locked during
  stack sampling.

`ProfileBuffer` only exists while `ActivePS` is alive, but because of the
potential outside accesses above (due to small races between ProfileBuffer
shutdown, and thread-local IsBeingProfiled() flags), we cannot just do the same
for BlocksRingBuffer, and it must remain alive to gracefully deny these accesses
around the profiler startup and shutdown times.

To accomplish this, `BlocksRingBuffer` may be in different states:
- "In-session", we have a real buffer to write to and read from,
- "Out-of-session", without buffer so reads&writes do nothing.
This is implemented by enclosing the underlying `ModuloBuffer` and the entry
deleter in a `Maybe`, which may be `Nothing` when the profiler is not running
and the `ProfileBuffer`'s `BlocksRingBuffer` is out-of-session.

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

--HG--
extra : moz-landing-system : lando
2019-08-13 03:11:53 +00:00
Gerald Squelart
41c580344f Bug 1572027 - Make BlocksRingBuffer::EntryReader move-only - r=gregtatum
After some bad experiences, I think EntryReader should be move-only:
- It needs to be moveable so it can be created from a function, and move-
  constructed into a Maybe<> if needed.
- It can be passed around as a reference.

Previously, it could be passed by value, but it was too easy to create bugs,
e.g.: A function delegates to a sub-function to read something at the beginning,
then the first function wants to read more past that, but if the reader was
passed by value the first function would not see past what the sub-function did
read.

As a bonus, `mRing` can now be a reference instead of a pointer, and other
members can be const.

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

--HG--
extra : moz-landing-system : lando
2019-08-07 21:33:09 +00:00
Aaron Klotz
fb977a3526 Bug 1571875: Part 2 - Change over all existing static local uses of DynamicallyLinkedFunctionPtr to use StaticDynamicallyLinkedFunctionPtr instead; r=mhowell
Depends on D40885

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

--HG--
extra : moz-landing-system : lando
2019-08-07 15:58:09 +00:00
Aaron Klotz
d46e27a5ed Bug 1571875: Part 1 - Refactor DynamicallyLinkedFunctionPtr into static local and normal variants; r=mhowell
This patch does two things:

1. We refactor the resolution of function pointer and return type so that we
may support additional calling conventions besides just __stdcall;

2. We refactor DynamicallyLinkedFunctionPtr into a base class, and create
StaticDynamicallyLinkedFunctionPtr to specifically handle the static local
use case.

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

--HG--
extra : moz-landing-system : lando
2019-08-07 15:57:23 +00:00
Gerald Squelart
5d6dbb3289 Bug 1571392 - Make BlocksRingBuffer::EntryWriter move-only - r=gregtatum
It makes little sense to copy a writer (also an output iterator).

We're keeping it move-constructible (so it can be passed around for construction
purposes), but not move-assignable to help make more members `const`.

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

--HG--
extra : moz-landing-system : lando
2019-08-07 01:54:45 +00:00
Gerald Squelart
c05de0f147 Bug 1571390 - BlocksRingBuffer::GetState() takes a snapshot of the current state - r=gregtatum
This makes it easier to grab all BlocksRingBuffer state variables:
- Range start and end.
- Number of pushed blocks/entries, number of cleared blocks/entries.

The function is thread-safe, and the returned values are consistent with each
other, but they may become stale straight after the function returns (and the
lock is released).
They are still valuable to statistics, and to know how far the range has at
least reached (but may go further soon).

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

--HG--
extra : moz-landing-system : lando
2019-08-07 01:54:31 +00:00
Gerald Squelart
f2af619bd3 Bug 1571355 - Base Profiler mutex tweaks - r=gregtatum
Renamed `BPAutoLock` to `BaseProfilerAutoLock`.
DEBUG-build `~BaseProfilerMutex()` checks that it is unlocked.
Prevent `BaseProfilerMutex` and `BaseProfilerAutoLock` copies&moves.
DEBUG-build check that `Lock()` sees `mOwningThreadId`==0 (because that is the
initial value, and the value after a previous `Unlock()`).
Don't preserve atomic `mOwningThreadId` in JS recording.

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

--HG--
extra : moz-landing-system : lando
2019-08-07 01:54:09 +00:00
Gerald Squelart
a2e0f9390e Bug 1571348 - ProfilerMarkerPayload::Set...() can be replaced with constructor arguments - r=gregtatum
`ProfilerMarkerPayload::Set...()` functions are only used by derived classes in
the same files, and these values could just be set during construction.

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

--HG--
extra : moz-landing-system : lando
2019-08-07 01:53:55 +00:00
Toshihito Kikuchi
82aae30d17 Bug 1568610 - Delete the definition of IATThunks structure. r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D40703

--HG--
extra : moz-landing-system : lando
2019-08-06 22:58:20 +00:00
Greg Tatum
cf59c7c0d7 Bug 1521929 - Remove RSS and USS measurements from the profiler; r=gerald,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D40287

--HG--
extra : moz-landing-system : lando
2019-08-05 15:37:18 +00:00
Sylvestre Ledru
a34ae8d650 Bug 1571292 - -Wbool-operation: fix a warning (! instead of ~) r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D40574

--HG--
extra : moz-landing-system : lando
2019-08-04 22:00:40 +00:00
Gerald Squelart
a8ae8a7a30 Bug 1569515 - Show overhead stats in Profiler tests - r=canaltinova
cppunittest TestBaseProfiler and gtest GeckoProfiler.Markers now show overhead
stats.
(Separate patch, because we may want to remove them after a while.)

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

--HG--
extra : moz-landing-system : lando
2019-07-31 01:28:53 +00:00
Gerald Squelart
ce889db273 Bug 1569515 - Collect overhead stats in ProfileBuffer - r=canaltinova
`ProfileBuffer` is now responsible for collecting overhead stats, and adding
them to the struct returned by `profiler_get_buffer_info()`.

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

--HG--
extra : moz-landing-system : lando
2019-07-31 01:28:51 +00:00
Gerald Squelart
68db1b82de Bug 1569506 - SamplerThread can own a Sampler instead of being one - r=canaltinova
`SamplerThread` inheriting from `Sampler` was a bit confusing, and scary with no
virtual destructor&functions.
`SamplerThread` only uses `Sampler`'s `Disable()` and
`SuspendAndSampleAndResumeThread()` functions, and `SamplerThread` is never
accessed through a `Sampler` reference/pointer.
So `SamplerThread` can just own a `Sampler` to make that relationship clearer.

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

--HG--
extra : moz-landing-system : lando
2019-07-31 01:28:49 +00:00
Gerald Squelart
6abdf8f681 Bug 1569458 - Use mMutex.AssertCurrentThreadOwns() in BlocksRingBuffer - r=gregtatum
This of course checks that the mutex is locked as expected in non-public APIs.
It also checks that user callbacks will not keep readers/writers longer than
they should.

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

--HG--
extra : moz-landing-system : lando
2019-07-30 12:19:55 +00:00
Gerald Squelart
d5ac2c3154 Bug 1569458 - Unify Base Profiler mutexes into one class - r=gregtatum
`BaeProfilerMutex` is a concrete mutex based on MutexImpl, which was previously
implemented twice in both platform.h and BlocksRingBuffer.h.
This combined mutex has some DEBUG code (when MOZ_BASE_PROFILER is #defined) to
catch recursive locking, and to assert that the mutex is held (for code that
cannot easily use the "proof of lock" pattern; e.g., going through user-provided
callbacks).

This class needs to be public (because it is used in public headers), but is an
implementation detail, so it is located in a new header
"mozilla/BaseProfilerDetail.h" that will collect `mozilla::baseprofiler::detail`
code that may be useful to a few files in Base Profiler.

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

--HG--
extra : moz-landing-system : lando
2019-07-30 12:19:54 +00:00
Gerald Squelart
ce8cf3d633 Bug 1567861 - Fix BlocksRingBuffer::ClearBefore() with past-the-end BlockIndex - r=gregtatum
`ClearBefore()` with a past-the-end `BlockIndex` was calling `Clear()`, which
tried to take the lock again! Also we didn't return after that.
Fixed, and added corresponding test.

Also: Removed ambiguous "delete" word, now using more precise "destroy" or
"entry destructor".

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

--HG--
extra : moz-landing-system : lando
2019-07-30 07:24:20 +00:00
Gerald Squelart
f5ca1ba02d Bug 1567465 - Default BlockIndex used as empty value index before any valid entry - r=gregtatum
This is a similar concept as `nullptr` is to a pointer.

`BlocksRingBuffer` now skips the first byte in the buffer, so that no entries
start at 0 (the internal default `BlockIndex` value).
All `BlocksRingBuffer` public APIs handle this default value, and do nothing
and/or return Nothing (as if it pointed at an already-deleted entry).

Added tests for this, and for all BlockIndex operations.

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

--HG--
extra : moz-landing-system : lando
2019-07-19 16:10:30 +00:00
Gerald Squelart
dd5708c6dc Bug 1567461 - Ensure ModuloBuffer can be properly move-constructed - r=gregtatum
Without declaring them, ModuloBuffer had its copy&move constructor&assignments
defaulted. This means it could have been copied, and then both objects would now
own the same resource and attempt to free it on destruction!

So now:
- Copy construction&assignment are now explicitly disallowed.
- Move assignment is disallowed, to keep some members `const`.
- Move construction is allowed (so a function can return a ModuloBuffer), and
  ensures that the moved-from object won't free the resource anymore.

Bonus: `mBuffer` is now `const`, to ensure that it cannot point at something
else, but note the pointed-at bytes are *not* const.
So ModuloBuffer is like an unchanging resource, but it allows to be moved-from
as an xvalue that should not be used after the move.

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

--HG--
extra : moz-landing-system : lando
2019-07-20 00:13:59 +00:00
Gerald Squelart
6ea0a33e9a Bug 1566706 - ModuloBuffer and BlocksRingBuffer can be given a external underlying buffer - r=gregtatum
By default `ModuloBuffer` allocates its own buffer on the heap.
Now `ModuloBuffer` adds two alternatives:
- Take ownership of a pre-allocated `UniquePtr<uint8_t>` buffer.
- Work over an unowned `uint8_t*` array. The caller is responsible for
  ownership, and ensuring that the array lives at least as long as the
  `ModuloBuffer`/`BlocksRingBuffer`.

`BlocksRingBuffer` can pass along these new options to its underlying
`ModuloBuffer`.

The main use will be for small on-stack `BlocksRingBuffer` that can store a
stack trace, or to more easily collect data (without allocating anything on the
heap) that can then go into the upcoming `ProfileBuffer`'s `BlocksRingBuffer`.

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

--HG--
extra : moz-landing-system : lando
2019-07-19 00:56:18 +00:00
Aaron Klotz
e95bbdcbd0 Bug 1567013: Change gen_dll_blocklist_defs.py to use the DLL name for dupe detection; r=bytesized
Differential Revision: https://phabricator.services.mozilla.com/D38423

--HG--
extra : moz-landing-system : lando
2019-07-18 03:29:45 +00:00
Gerald Squelart
2af2523782 Bug 1565137 - BlocksRingBuffer is a thread-safe variable-sized circular buffer - r=gregtatum
This adds to the byte-oriented ModuloBuffer from bug 1563425:
- Thread-safety: All APIs may be called at any time from any thread.
- Structure: The buffer will be divided in "blocks" of different size, with some
  block meta-data and space for the user "entry".
- Capable of handling user resources: The user may provide a "deleter" that will
  be informed about soon-to-be-destroyed entries; so if some entries reference
  outside resources, these references may be properly released.

Note: This first implementation still only allows the user to manipulate bytes
and trivially-copyable objects (same as with the ModuloBuffer iterators). A
follow-up bug will introduce better serialization capabilities, with the aim to
eventually store everything that current Profiler Markers and their payloads
contain.

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

--HG--
extra : moz-landing-system : lando
2019-07-16 07:57:24 +00:00
Aaron Klotz
8f1d66c29a Bug 1483687: Part 5 - Update the legacy DLL blocklist to support the revised data structure format; r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D36999

--HG--
extra : moz-landing-system : lando
2019-07-16 18:02:42 +00:00
Aaron Klotz
206fc29ac7 Bug 1483687: Part 3 - Update DLL blocklist gtests to support the revised blocklist data structures; r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D36997

--HG--
extra : moz-landing-system : lando
2019-07-16 18:02:13 +00:00
Aaron Klotz
5e011338b2 Bug 1483687: Part 2 - Updates to WindowsDllBlocklistCommon.h macros; r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D36994

--HG--
extra : moz-landing-system : lando
2019-07-16 18:01:53 +00:00
Aaron Klotz
41e787ef1a Bug 1483687: Part 1 - Use a build script to generate various DLL blocklist headers; r=bytesized
As we are increasingly moving toward enabling new types of DLL blocking across
our various process types, we need to be able to generate various headers in
various distinct formats.

This script enables us to use a unified DLL blocklist input that generates
these distinct headers. From WindowsDllBlocklistDefs.in, we generate:

WindowsDllBlocklistA11yDefs.h - definitions for a11y
WindowsDllBlocklistLauncherDefs.h - definitions for the launcher process
WindowsDllBlocklistLegacyDefs.h - definitions for the legacy mozglue blocklist
WindowsDllBlocklistTestDefs.h - test-only definitions

These headers are then exported to mozilla.

Note that not all headers use the same format, as not all consumers of these
headers have identical workings. There will be additional header types added
in the future which diverge even more from the standard blocklist format. While
this work may seem a bit pointless at the moment, it will become more necessary
in the future. In particular, this work is a prerequisite for bug 1238735.

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

--HG--
extra : moz-landing-system : lando
2019-07-16 18:01:40 +00:00
Sylvestre Ledru
ddf2513ea7 Bug 1519636 - Ride along: Move to the unix CR type r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-07-16 07:34:18 +00:00
James Teh
07f7390618 Bug 1536227: Block safemon64.dll (360 Safeguard/360 Total Security) for causing a11y crashes. r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D27203

--HG--
extra : moz-landing-system : lando
2019-07-12 23:39:15 +00:00
Aaron Klotz
38d143880e Bug 1564106: Reorder interceptor tests so that lower-level APIs are hooked before higher-level APIs; r=handyman
Since higher-level APIs that we test may depend on lower-level APIs that we
also test, and since those higher-level APIs may spin up background threads
that call those lower-level APIs, we should ensure that tests are ordered
such that the lower-level APIs are hooked first, thus preventing races where
higher-level background threads call lower-level APIs while the test's main
thread is in the midst of hooking a lower-level API.

I also added some fflush calls to the test so that, the next time we see lots
of crashes in this test, the log output is more complete.

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

--HG--
extra : moz-landing-system : lando
2019-07-10 18:26:40 +00:00
Aaron Klotz
579b3f8116 Bug 1553776: Add DLL blocklist entries for injected Ivanti Security Endpoint DLLs; r=dmajor
Differential Revision: https://phabricator.services.mozilla.com/D37483

--HG--
extra : moz-landing-system : lando
2019-07-10 13:52:27 +00:00
Razvan Maries
76724ce338 Backed out changeset 1ccaad832c1d (bug 1557564) for causing bug 1531789. 2019-07-10 13:19:27 +03:00
Gerald Squelart
20f9546725 Bug 1563425 - ModuloBuffer is a basic circular byte buffer with iterator and LEB128 helpers - r=gregtatum
Basic usage:
- Create buffer: `ModuloBuffer mb(PowerOfTwo);`
- Get iterator: `auto writer = mb.WriterAt(Index);` (or `ReaderAt()`)
- Basic iterator functions on bytes: `*++writer = 'x';`
- Write: `writer.WriteULEB128(sizeof(int)); writer.WriteObject<int>(42);`
- Comparisons, move: `while (writer > reader) { --writer; }`
- Read: `size_t s = reader.ReadULEB128<size_t>(); int i = ReadObject<int>();`

There are no safety checks, it will be up to the caller to ensure thread-safety,
and data safety when wrapping around the buffer.

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

--HG--
extra : moz-landing-system : lando
2019-07-09 04:46:19 +00:00