Commit Graph

6985 Commits

Author SHA1 Message Date
Gerald Squelart
8364b4ebdb Bug 1576555 - Don't store temporary ProfilerMarkerPayloads in UniquePtrs - r=gregtatum
Since payloads are not kept alive long after they have been serialized, we can
just create them on the stack and pass a reference to their base (or pointer,
`nullptr` representing "no payloads") to `profiler_add_marker()`.

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

--HG--
extra : moz-landing-system : lando
2019-09-17 02:32:21 +00:00
Gerald Squelart
b48590ff79 Bug 1576555 - Store markers directly into BlocksRingBuffer - r=gregtatum
Markers and their payloads can now be serialized straight into the profiler's
`BlocksRingBuffer`, which is now thread-safe to allow such concurrent accesses
(even when gPSMutex is not locked).
This already saves us from having to allocate a `PayloadMarker` on the heap, and
from having to manage it in different lists.

The now-thread-safe `BlocksRingBuffer` in `CorePS` cannot be used inside the
critical section of `SamplerThread::Run`, because any mutex function could hang
because of the suspended thread (even though they functionally don't appear to
interact). So the sampler now uses a local `BlocksRingBuffer` without mutex.
As a bonus, the separate buffer helps reduce the number of concurrent locking
operations needed when capturing the stack.

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

--HG--
extra : moz-landing-system : lando
2019-09-17 01:52:16 +00:00
Gerald Squelart
5b86107991 Bug 1575448 - De/serialize ProfilerMarkerPayload derived objects - r=gregtatum
Payloads will serialize themselves into a `BlocksRingBuffer` entry when first
captured.
Later they will be deserialized, to stream JSON for the output profile.

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

--HG--
extra : moz-landing-system : lando
2019-09-17 01:51:41 +00:00
Gerald Squelart
64f0dcdf95 Bug 1575448 - ProfilerMarkerPayload::CommonProps - r=gregtatum
The common data members stored in the ProfilerMarkerPayload base class can be
gathered into a struct, which will make it easier to pass around, especially
when a derived object is constructed with these common properties.

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

--HG--
extra : moz-landing-system : lando
2019-09-17 01:51:18 +00:00
Gerald Squelart
a14e2c944d Bug 1576554 - {S,Des}erializer<ProfilerBacktrace> - r=gregtatum
Markers may contain backtraces, so we need to be able to de/serialize them.
This involves de/serializing the underyling `BlocksRingBuffer`.

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

--HG--
extra : moz-landing-system : lando
2019-09-17 02:16:04 +00:00
Gerald Squelart
003cded47d Bug 1576551 - Store BlocksRingBuffer outside of ProfileBuffer - r=gregtatum
The main `BlocksRingBuffer`s will be stored in `CorePS` (outside of
`ProfileBuffer`s), as we need to be able to safely access the underlying buffers
when profilers are not enabled.

Also `ProfilerBacktrace` will own the `BlocksRingBuffer` that its captured
`ProfileBuffer` uses.

Taking this opportunity to rename the different `mBuffer`s to more useful names.

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

--HG--
extra : moz-landing-system : lando
2019-09-17 02:12:42 +00:00
Gerald Squelart
c538807a81 Bug 1576551 - Assume capacity is in 8-byte entries - r=gregtatum
Now that we are using a byte-oriented `BlocksRingBuffer` instead of an array of
9-byte `ProfileBufferEntry`'s, internally the profiler sets the buffer size in
bytes. However all external users (popup, tests, etc.) still assume that the
requested capacity is in entries!

To limit the amount of changes, we will keep assuming externally-visible
capacities are in entries, and convert them to bytes.
Even though entries used to be 9 bytes each, and `BlocksRingBuffer` adds 1 byte
for the entry size, some entries actually need less space (e.g., 32-bit numbers
now take 6 bytes instead of 9), so converting to less than 9 bytes per entry is
acceptable.
We are settling on 8 bytes per entry: It's close to 9, and it's a power of two;
since the effective number of entries was a power of two, and `BlocksRingBuffer`
also uses a power of two size in bytes, this convertion keeps sizes in powers of
two.

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

--HG--
extra : moz-landing-system : lando
2019-09-17 01:50:19 +00:00
Gerald Squelart
71e4f99d21 Bug 1576551 - Use BlocksRingBuffer in ProfileBuffer - r=gregtatum
This just replaces `ProfileBuffer`'s self-managed circular buffer with a
`BlocksRingBuffer`.

That `BlocksRingBuffer` does not need its own mutex (yet), because all uses go
through gPSMutex-guarded code.

`ProfileBuffer` now also pre-allocates a small buffer for use in
`DuplicateLastSample()`, this avoids multiple mallocs at each sleeping thread
stack duplication.

Note: Internal "magic" sizes have been multiplied by 8 (and tweaked upwards, to
handle bigger stacks), because they originally were the number of 9-byte
entries, but now it's the buffer size in bytes. (And entries can now be smaller
than 9 bytes, so overall the capacity in entries should be similar or better.)
However, external calls still think they are giving a number of "entries", this
will be handled in the next patch.

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

--HG--
extra : moz-landing-system : lando
2019-09-17 01:49:59 +00:00
Gerald Squelart
e8ea7f331e Bug 1576551 - AUTO_PROFILER_STATS(locked_profiler_stream_json_for_this_process) - r=gregtatum
Add some stats (off by default) around streaming JSON, as the following patches
may affect it.

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

--HG--
extra : moz-landing-system : lando
2019-09-17 01:49:37 +00:00
Gerald Squelart
d20384e398 Bug 1580091 - Use BaseProfilerMaybeMutex in BlocksRingBuffer - r=gregtatum
In some situations we will *need* to use a `BlocksRingBuffer` that absolutely
does not use a mutex -- In particular in the critical section of
`SamplerThread::Run()`, when a thread is suspended, because any action on any
mutex (even a private one that no-one else interacts with) can result in a hang.

As a bonus, `BlocksRingBuffer`s that are known not to be used in multi-thread
situations (e.g., backtraces, extracted stacks for duplication, etc.) will waste
less resources trying to lock/unlock their mutex.

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

--HG--
extra : moz-landing-system : lando
2019-09-17 01:49:24 +00:00
Andrew Halberstadt
f72360bce1 Bug 1580280 - [lint] Support Python 3 in the eslint integration r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D45438

--HG--
extra : moz-landing-system : lando
2019-09-11 19:52:08 +00:00
Andrew Halberstadt
5b5dc5542a Bug 1580280 - [lint] Support Python 3 in the flake8 integration r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D45436

--HG--
extra : moz-landing-system : lando
2019-09-11 10:00:58 +00:00
Tarek Ziadé
5dd9d5bcd0 Bug 1562870 - generate conditioned profiles r=gbrown,bc,aerickson
Generates "conditioned" profiles.

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

--HG--
extra : moz-landing-system : lando
2019-09-16 19:44:35 +00:00
Cosmin Sabou
d0f1b2cacf Backed out changeset d8091d350d7c (bug 1579845) for linting opt failures on foobar.js. CLOSED TREE 2019-09-16 19:56:01 +03:00
Sylvestre Ledru
601dddbceb Bug 1579845 - Add a test to the mozlint check: license r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D45873

--HG--
extra : moz-landing-system : lando
2019-09-16 16:19:55 +00:00
arthur.iakab
5b17baab22 Backed out changeset f698c4b34515 (bug 1579845) for causing lint failure on foobar.js CLOSED TREE 2019-09-16 18:16:35 +03:00
Sylvestre Ledru
31eae04236 Bug 1579845 - Add a test to the mozlint check: license r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D45873

--HG--
extra : moz-landing-system : lando
2019-09-16 14:06:21 +00:00
Bas Schouten
7b4d55d375 Bug 1548373: Report Open stacks for XHR responses. r=mayhemer,julienw
Differential Revision: https://phabricator.services.mozilla.com/D42831

--HG--
extra : moz-landing-system : lando
2019-09-11 15:33:00 +00:00
Ryan Alderete
862aa4197f Bug 1579506 - Remove OpenAES source code and references r=bryce,mhoye
With NSS now being used to do the decryption in the Clearkey CDM, remove the
source and licensing information related to OpenAES.

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

--HG--
extra : moz-landing-system : lando
2019-09-12 23:27:08 +00:00
Andi-Bogdan Postelnicu
1b886ecee7 Bug 1576659 - Update infer to 0.17.0. r=bastien
Differential Revision: https://phabricator.services.mozilla.com/D43471

--HG--
extra : moz-landing-system : lando
2019-09-13 14:25:32 +00:00
Sylvestre Ledru
d55c5ff35a Bug 1581065 - Update to codespell 1.16 r=andi
Depends on D45818

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

--HG--
extra : moz-landing-system : lando
2019-09-13 11:31:49 +00:00
Edwin Takahashi
c481d253a3 Bug 1559975 - remove tools/profiler from python2 and python3 linter exclusion list r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D36435

--HG--
extra : moz-landing-system : lando
2019-09-13 09:04:26 +00:00
Bastien Orivel
18971959d6 Bug 1580908 - Part 3: Deduplicate memmap by updating it to 0.7 in profiler_helper. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D45712

--HG--
extra : moz-landing-system : lando
2019-09-12 21:46:06 +00:00
Sylvestre Ledru
6963a42813 Bug 1579845 - ride along: Strip codespell results r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D45449

--HG--
extra : moz-landing-system : lando
2019-09-12 07:01:46 +00:00
Sylvestre Ledru
e613c24777 Bug 1579845 - Ride along: Add the line number in the file whitespace lint r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D45447

--HG--
extra : moz-landing-system : lando
2019-09-12 07:01:50 +00:00
Sylvestre Ledru
d20870ad98 Bug 1579845 - Add a test to the mozlint check: file-whitespace r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D45445

--HG--
extra : moz-landing-system : lando
2019-09-11 20:59:32 +00:00
Sylvestre Ledru
e3b92571a9 Bug 1579845 - Add a test to the mozlint check: file-perm r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D45444

--HG--
extra : moz-landing-system : lando
2019-09-11 20:58:07 +00:00
Edwin Takahashi
485156be18 Bug 1559975 - fix python2 and python3 linter errors for client.py r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D40523

--HG--
extra : moz-landing-system : lando
2019-09-11 21:06:34 +00:00
Christian Holler
6223028546 Bug 1580128 - Simplify required env variables for fuzzing interface. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D45318

--HG--
extra : moz-landing-system : lando
2019-09-10 14:33:58 +00:00
Sylvestre Ledru
4675edcd33 Bug 1577726 - Reorder tools/rewriting/ThirdPartyPaths.txt r=andi
Depends on D45158

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

--HG--
extra : moz-landing-system : lando
2019-09-09 08:33:43 +00:00
Sylvestre Ledru
ed0812da79 Bug 1577726 - Move a path from tools/rewriting/ThirdPartyPaths.txt to tools/rewriting/Generated.txt r=andi
Differential Revision: https://phabricator.services.mozilla.com/D45158

--HG--
extra : moz-landing-system : lando
2019-09-09 08:34:58 +00:00
Edwin Takahashi
e40edba52f Bug 1565332 - add option to toggle linux desktop tests to run on debian 10 r=ahal
Adds command line option for developers to run tests against experimental debian 10 image (from D42597).

This is an experimental flag and will be removed once debian 10 image is used for production CI tests.

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

--HG--
extra : moz-landing-system : lando
2019-09-07 01:07:23 +00:00
Bastien Orivel
3799c3a86f Bug 1579425 - Part 1: Update goblin and object. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D45046

--HG--
extra : moz-landing-system : lando
2019-09-06 17:49:51 +00:00
Sylvestre Ledru
20b343675a Bug 1577726 - Move generated directories into a dedicated file (Generated.txt) from ThirdPartyPaths.txt r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D44147

--HG--
extra : moz-landing-system : lando
2019-09-05 14:24:21 +00:00
Sylvestre Ledru
fa8b298b59 Bug 1577726 - Ride along: Remove third_party from the clang tidy configuration as it isn't used r=andi
Differential Revision: https://phabricator.services.mozilla.com/D44163

--HG--
extra : moz-landing-system : lando
2019-09-05 13:52:22 +00:00
Andrew Halberstadt
7945602d9f Bug 1577826 - [eslint] Ensure setup runs subprocess with byte strings in env r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D44482

--HG--
extra : moz-landing-system : lando
2019-09-04 23:50:26 +00:00
Nick Thomas
407462408c Bug 1577634 - suppress warnings about comment changes in channel-prefs.js, r=bhearsum
Update verify noticed the new comments in channel-prefs.js from bug 1576546, and thought they were significant. This change suppresses that by ignoring all lines starting with '//'. Since we can't match on the significant new line but not on the existing one we swallow a rat and comment the new whitespace.

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

--HG--
extra : moz-landing-system : lando
2019-09-04 21:01:28 +00:00
Geoff Brown
be67d46e14 Bug 1577037 - Stop running all Fennec functional tests; r=bc
Stop running all Fennec functional (non-performance) tests:
 - stop running all Android 4.3 tests
 - switch android-em-7 cppunit and android-hw jittest from the Fennec apk to the
   geckoview apk (no difference in behavior expected)
 - stop running Android 7.0 marionette tests, since they also run against Fennec
 - remove android-em-4.* references from taskcluster configs
 - remove android instance: extra-large references from taskcluster configs,
   since they only affect aws, which is no longer used for Android

Android-hw raptor tests running against Fennec remain; I will prepare a separate
patch for those.

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

--HG--
extra : moz-landing-system : lando
2019-09-04 15:58:36 +00:00
Kershaw Chang
64b7f325a6 Bug 1577428 - Not allow nsICertOverrideService to be implemented in js r=keeler,ato
Differential Revision: https://phabricator.services.mozilla.com/D43931

--HG--
rename : security/manager/ssl/tests/unit/test_js_cert_override_service.js => security/manager/ssl/tests/unit/test_allow_all_cert_errors.js
extra : moz-landing-system : lando
2019-09-04 17:17:44 +00:00
Barret Rennie
a9de9d21e2 Bug 1563090 - Fetch visual metrics task definition from a template r=nalexander,tomprince,ahal
The `./mach try {fuzzy,chooser}` commands now support a `--visual-metrics-jobs`
option which can be used to pass the job descriptions to the visual-metrics
task.

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

--HG--
extra : moz-landing-system : lando
2019-09-04 16:42:45 +00:00
Barret Rennie
1ab6ec337d Bug 1563090 - Add a visual metrics treeherder task r=nalexander,tomprince
This new task fetches the visualmetrics.py script from the
github.com/mozilla/browsertime repository and runs it in parallel for the
specified jobs. Jobs are specified in a JSON blob passed through to the task in
an environment variable. A follow up patch specifies a command line argument to
make this configuration available to `./mach try {fuzzy|chooser}`

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

--HG--
extra : moz-landing-system : lando
2019-09-04 16:42:31 +00:00
Narcis Beleuzu
3fca079bae Backed out 2 changesets (bug 1563090) for Linting failure on run-visual-metrics.py . CLOSED TREE
Backed out changeset 1b2389663474 (bug 1563090)
Backed out changeset 9071c90b2e84 (bug 1563090)
2019-09-04 19:03:58 +03:00
Barret Rennie
08de8af0da Bug 1563090 - Fetch visual metrics task definition from a template r=nalexander,tomprince,ahal
The `./mach try {fuzzy,chooser}` commands now support a `--visual-metrics-jobs`
option which can be used to pass the job descriptions to the visual-metrics
task.

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

--HG--
extra : moz-landing-system : lando
2019-09-04 13:16:57 +00:00
Barret Rennie
df8c6f79f1 Bug 1563090 - Add a visual metrics treeherder task r=nalexander,tomprince
This new task fetches the visualmetrics.py script from the
github.com/mozilla/browsertime repository and runs it in parallel for the
specified jobs. Jobs are specified in a JSON blob passed through to the task in
an environment variable. A follow up patch specifies a command line argument to
make this configuration available to `./mach try {fuzzy|chooser}`

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

--HG--
extra : moz-landing-system : lando
2019-09-03 22:05:26 +00:00
Sylvestre Ledru
4203206dd6 Bug 1578673 - [mozlint] Skip the file-perm linter on Windows r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D44635

--HG--
extra : moz-landing-system : lando
2019-09-04 13:06:29 +00:00
Gerald Squelart
e1481bf4bb Bug 1576550 - AUTO_PROFILER_STATS(add_marker...) - r=gregtatum
Gather stats for most calls to `profiler_add_marker()`, including the time to
allocate payloads if any.

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

--HG--
extra : moz-landing-system : lando
2019-09-04 07:58:21 +00:00
Gerald Squelart
95f77c2409 Bug 1576819 - Use PROFILER_ADD_MARKER{,_WITH_PAYLOAD} everywhere - r=gregtatum
All calls to `profiler_add_marker()` (outside of the profilers code) are
now replaced by either:
- `PROFILER_ADD_MARKER(name, categoryPair)`
- `PROFILER_ADD_MARKER_WITH_PAYLOAD(name, categoryPair, TypeOfMarkerPayload,
                                    (payload, ..., arguments))`

This makes all calls consistent, and they won't need to prefix the category pair
with `JS::ProfilingCategoryPair::`.

Also it will make it easier to add (and later remove) internal-profiling
instrumentation (bug 1576550), and to replace heap-allocated payloads with
stack-allocated ones (bug 1576555).

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

--HG--
extra : moz-landing-system : lando
2019-09-04 07:56:51 +00:00
Tom Ritter
d922064696 Bug 1547519 - Rename NS_STRINGIFY to MOZ_STRINGIFY, move to mfbt, and unify stragglers r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D39961

--HG--
extra : moz-landing-system : lando
2019-09-04 02:40:32 +00:00
Emilio Cobos Álvarez
7cd233a725 Bug 1578391 - Fix various races during profiler shutdown. r=mstange
I'm trying to make shutdown wait for the style system threads. This uncovers an
intermittent race where one of the unregistering functions get called before the
profiler has shot down, checks CorePS::Exists(), which returns true, but by the
time it acquires the lock the profiler has shot down already.

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

--HG--
extra : moz-landing-system : lando
2019-09-03 13:24:23 +00:00
monikamaheshwari
836c33084c Bug 1578190 - Add a rule to ensure 'if(foo.length)' instead of 'foo.length>0'. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D33011

--HG--
extra : moz-landing-system : lando
2019-09-02 11:09:44 +00:00