Commit Graph

4887 Commits

Author SHA1 Message Date
Sylvestre Ledru
4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Andrew Halberstadt
fbede0d83d Bug 1361972 - Add a pre-push and pre-commit mozlint hooks r=standard8
This adds pre-push and pre-commit hooks for both hg and git. All
four possibilities are implemented in the same file.

To enable a pre-push hg hook, add the following to hgrc:

    [hooks]
    pre-push.lint = python:/path/to/gecko/tools/lint/hooks.py:hg


To enable a pre-commit hg hook, add the following to hgrc:

    [hooks]
    pretxncommit.lint = python:/path/to/gecko/tools/lint/hooks.py:hg


To enable a pre-push git hook, run the following command:

    $ ln -s /path/to/gecko/tools/lint/hooks.py .git/hooks/pre-push


To enable a pre-commit git hook, run the following command:

    $ ln -s /path/to/gecko/tools/lint/hooks.py .git/hooks/pre-commit


MozReview-Commit-ID: DUxCKN2fiag

--HG--
extra : rebase_source : 67c97a3fd8adc50d6bb3c488345077065b63de7d
2017-06-30 18:29:42 -07:00
Sylvestre Ledru
7417414e45 Bug 1378737 - Add third_party/rust to the ignore list r=andi
MozReview-Commit-ID: 8bSAV29VY9F

--HG--
extra : rebase_source : 47d77b7da5b34aa00ea611b2d5039195f3f88769
2017-07-06 13:55:46 +02:00
David Major
8f2fab9547 Bug 1378442 - Move Win64 profiler hooks to profiler_start. r=mstange 2017-07-05 18:45:31 -04:00
Nicholas Nethercote
6dbd7251d0 Bug 1378055 (part 7) - Use "entry", not "frame" when talking about ProfileBufferEntry objects. r=mstange.
--HG--
extra : rebase_source : 291cc3af4f827b9fe0662b756634e61ee5937562
2017-07-04 16:54:06 +10:00
Nicholas Nethercote
ce36e6687b Bug 1378055 (part 6) - Use "entry", not "tag" when talking about ProfileBufferEntry objects. r=mstange.
The patch also changes ProfileBuffer::processEmbeddedString() to take the
readAheadPos, instead of recomputing it.

--HG--
extra : rebase_source : 62bacb4c7cc61f43d78ada342af0a813c307b96a
2017-07-04 16:53:21 +10:00
Nicholas Nethercote
b9f8d7e37f Bug 1378055 (part 5) - Make ProfileBufferEntry always store 8 chars. r=mstange.
The double variant is always 8 bytes, so the chars variant can be too. As well
as reducing memory usage on 32-bit platforms, this patch makes the code
clearer.

--HG--
extra : rebase_source : 8f3dd0a1e35c18ac812fa5db7c3f6e4626447c4c
2017-07-04 16:52:46 +10:00
Nicholas Nethercote
eaabbc455b Bug 1378055 (part 4) - Overhaul PROFILE_BUFFER_ENTRY_KIND_LIST. r=mstange.
This patch renames it, things around it, and fixes some formatting.

--HG--
extra : rebase_source : 03a189ab5fbe24613c66026bb7e550a5c4df5d42
2017-07-04 16:51:52 +10:00
Nicholas Nethercote
ac56cf9abe Bug 1378055 (part 3) - Overhaul names used within ProfilerBufferEntry.cpp. r=mstange.
- It's common for unions to be named |u|, because this makes it obvious that
  it's a union when you access it, which is good. This patch introduces that
  for the union in ProfilerBufferEntry. (This required move the union setting in
  each constructor from the initializer list to the constructor body.)

- Each union variant had the prefix "mTag". But that's a bad name, because
  |mKind| is actually the tag. So this patch removes the "Tag".

- |mTagData| was a poor name for the |const char*| variant, so this patch
  renames it |mString|.

- The patch moves |mKind| before |u|, because that's the normal way that tagged
  unions are done.

--HG--
extra : rebase_source : 563cbcf6414fa3c45abcdd5eafd99965bb842de5
2017-07-04 16:51:21 +10:00
Nicholas Nethercote
0e7b1b3bf7 Bug 1378055 (part 2) - Remove ProfilerBufferEntry::getMarker(). r=mstange.
If marker pointer is null the uses of it will immediately crash, so asserting
non-nullness doesn't add much. And removing the getter makes it more similar to
the other union variants.

--HG--
extra : rebase_source : a1066ef98ac5d2dae5303b465106b844937cfb73
2017-07-04 16:50:43 +10:00
Nicholas Nethercote
1ab1b92249 Bug 1378055 (part 1) - Remove unused ProfileBufferEntry union variants. r=mstange.
--HG--
extra : rebase_source : 9904601ff47e8ba19d61af1ddc377cad4be243f6
2017-07-04 16:49:42 +10:00
Nicholas Nethercote
fa0aab394a Bug 1375776 (part 7) - Add a comment to ThreadInfo. r=mstange.
--HG--
extra : rebase_source : f1b8bd5f9ba1db8ea67f10390c6dbedd0e9c4cb6
2017-07-03 13:46:48 +10:00
Nicholas Nethercote
26f8199a36 Bug 1375776 (part 5) - Pass in a TimeStamp to LayerTranslationMarkerPayload(). r=mstange.
This makes it more like all the other payload classes.

--HG--
extra : rebase_source : dd30741f487158ace8f9c0427a5c4b00f051ff7b
2017-06-23 16:24:21 +10:00
Nicholas Nethercote
5d446671a8 Bug 1375776 (part 4) - Allow ProfilerMarkerPayload.h to be #included unconditionally. r=mstange.
This requires:

- Moving the constructors of ProfilerMarkerPayload and its subclasses into the
  .h file so they are visible even when ProfilerMarkerPayload.cpp isn't
  compiled.

- Similarly, using a macro to make StreamPayload() a crashing no-op when the
  profiler isn't enabled. (It is never called in that case.)

--HG--
extra : rebase_source : 7aad2fdb1bd4e49782024dba6664e8f992771520
2017-06-23 16:24:15 +10:00
Nicholas Nethercote
d4e5f6709b Bug 1375776 (part 3) - Improve destructor of ProfilerMarkerPayload and its subclasses. r=mstange.
No point having all these explicit empty destructors.

Also, we can avoid IOMarkerPayload's constructor by using a UniqueFreePtr.

--HG--
extra : rebase_source : 0a2a5aecb66a2990c9188354c861f67633ed2fee
2017-06-23 15:58:11 +10:00
Nicholas Nethercote
ca8b2377bc Bug 1375776 (part 2) - Combine the two TracingMarkerPayload constructors. r=mstange.
--HG--
extra : rebase_source : 60ce2839cfebffbd2071b5821041fabc34c1ffe2
2017-06-23 14:29:03 +10:00
Michael Layzell
2eb92d98f1 Backout Bug 1365309 for test failures on a CLOSED TREE
MozReview-Commit-ID: 143ac9l7Goq
2017-07-04 17:31:13 -04:00
Florian Quèze
500a207037 Bug 1377916 - Include DOM workers in startup profiles, r=mstange. 2017-07-04 22:48:08 +02:00
Michael Layzell
b24bf46af6 Bug 1377344 - Record the name of the currently running Runnable on thread hangs for BHR, r=njn, r=froydnj
MozReview-Commit-ID: IYRHh6jiTeo
2017-07-04 15:16:19 -04:00
Michael Layzell
1fda892d36 Bug 1365309 - Part 1: Move LUL to a separate lock, and initialize it outside of both the profiler and BHR lock on the BHR thread, r=njn
Currently LUL is a member of CorePS, meaning that it is guarded by the PSMutex.
This mutex is grabbed by the main thread at random points during the execution
of the program. This is unfortunate, as initializing LUL can take a long
time (>1s on my local machine), and we definitely don't want to be blocking the
main thread waiting for it.

In addition, in the BHR case, we used to be grabbing LUL when we got our first
hang, while both the PSMutex and the BHR monitor were being held. This meant
that the main thread could make no progress during LUL initializaion, as the BHR
monitor is grabbed by the main thread on every spin of the event loop.

This patch moves that initialization to be behind a completely separate lock,
and makes BHR initialize it on the background thread before acquiring the BHR
lock, meaning that no locks other than the one guarding LUL should be held
during its initialization.

MozReview-Commit-ID: GwNYQaEAqJ1
2017-07-04 13:19:26 -04:00
Frederik Braun
92e797f912 Bug 1351608 - Add eslint-plugin-no-unsanitized to eslint-plugin-mozilla r=Standard8.
MozReview-Commit-ID: MLaU5REYF
2017-07-03 20:07:00 +01:00
Princi Vershwal
75404533d2 Bug 1369834 - Add Firefox Accounts Verify Login Push Notification. r=eoger 2017-06-23 02:34:07 +05:30
Bruce Sun
e5cd1bc4de Bug 1368948: [5/7] Suppress clang-plugin errors. r=Ehsan
MozReview-Commit-ID: 3uJHP2oerqK
2017-06-29 17:16:38 -07:00
Carsten "Tomcat" Book
5f00ae3a8b merge mozilla-inbound to mozilla-central a=merge 2017-06-29 15:47:04 +02:00
Nicholas Nethercote
c3ff586b09 Bug 1376993 (part 2) - Remove ProfilerJSEventMarker(). r=mstange.
It's needless indirection.

--HG--
extra : rebase_source : 063d242ea14bb3236cb53a5ade2923827060630e
2017-06-28 16:44:28 -07:00
Nicholas Nethercote
06487be99c Bug 1376993 (part 1) - Improve comment on profiler_add_marker(). r=mstange.
--HG--
extra : rebase_source : 5713b8aa59866f14fb90d114f6828b2ae6e5f093
2017-06-28 16:43:04 -07:00
Paolo Amadini
06de7cf6bf Bug 1374242 - Remove obsolete whitelisting of unhandled rejections. r=Mossop
The whitelisting function thisTestLeaksUncaughtRejectionsAndShouldBeFixed was replaced by expectUncaughtRejection, and existing calls did not take effect anymore.

MozReview-Commit-ID: 3uOxkgWYWEz

--HG--
extra : rebase_source : 6b27b77da78743880529adae7adf4ec2aa64dfea
extra : intermediate-source : 5809a30a0c4817509beb1078cf336d8367b8107a
extra : source : 6f0394b523a66dab444b8551deb8f3c6c81d8f31
2017-06-29 00:13:06 +01:00
Sebastian Hengst
43820d9e2a Backed out changeset d95016c5fc99 (bug 1351608) because eslint can't find the new plugin "eslint-plugin-no-unsanitized". r=backout 2017-06-29 01:02:26 +02:00
Christian Holler
428858f77b Bug 1376959 - Fix broken/missing LibFuzzerRegistry.h include. r=froydnj
MozReview-Commit-ID: WoHveMcQqt

--HG--
extra : rebase_source : 8da048c921f2aa2b248dce2ac646e67056ed4d8b
2017-06-28 15:20:11 -07:00
Sylvestre Ledru
f4688e5cdd Bug 1376809 - Add libfuzzer to the list of thirdparty code r=andi
MozReview-Commit-ID: KTOeH0teF2E

--HG--
extra : rebase_source : c2396a7e5aaf1077a629e5e4be3f92506fa7c472
2017-06-27 19:34:35 -07:00
Carsten "Tomcat" Book
7918eeee02 merge mozilla-inbound to mozilla-central a=merge 2017-06-28 13:23:29 +02:00
Jan Keromnes
01df6c73e3 Bug 1376488 - Remove some old paths from ThirdPartyPaths.txt. r=sylvestre, r=andi 2017-06-27 10:49:00 -04:00
Mark Banner
2991ef15bd Bug 1375418 - Add eslint 4 support to eslint-plugin-mozilla. r=mossop
Change how comments are handled due to ESLint's 4 reworked comment handling.

MozReview-Commit-ID: BG4cvbhy45Z

--HG--
extra : rebase_source : 8fc4d40bf2a8cb74be7964c9d308c056edf51058
2017-06-21 15:06:04 +01:00
Bill McCloskey
f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Frederik Braun
1310b12eff Bug 1351608 - Add eslint-plugin-no-unsanitized to eslint-plugin-mozilla. r=standard8
MozReview-Commit-ID: H7NaHioty7f

--HG--
extra : rebase_source : a2aaeea6ee2338206e9fe06679419847d76d1cae
2017-06-28 12:47:36 -07:00
Geoff Brown
f227d92d5a Bug 1375903 - Enable eslint on testing/talos - mechanical changes; r=jmaher
Most of these changes were made by 'mach eslint --fix'.
2017-06-28 06:58:01 -06:00
Carsten "Tomcat" Book
259377b6ab merge mozilla-inbound to mozilla-central a=merge 2017-06-26 13:25:51 +02:00
Gregory Szorc
bf796d2ba5 NO BUG - Unbust Sphinx docs outside of mach
Trivial update to Python package paths to reflect their new location.

MozReview-Commit-ID: EWaIHrLFWgD

--HG--
extra : rebase_source : b3a033bffe6f8f933807d6e71dccd49c37c75844
2017-06-23 13:22:52 -07:00
Perry Jiang
80ef003d65 Bug 862178 - Remove main thread I/O from CrashSubmit.jsm and KeyValuParser.jsm, replacing with OS.File. r=gsvelto
MozReview-Commit-ID: 6WIvz15Xtp3

--HG--
extra : rebase_source : 274136cf40459f012776213b18e51f9062d68eb5
2017-06-19 17:04:03 -07:00
Carsten "Tomcat" Book
7af37a52bd Merge mozilla-central to mozilla-inbound 2017-06-23 11:44:21 +02:00
Carsten "Tomcat" Book
5f51e5596e merge mozilla-inbound to mozilla-central a=merge 2017-06-23 11:28:19 +02:00
Nicholas Nethercote
58786e1ea7 Bug 1375392 - Tweak the PROFILER_LABEL* macros. r=mstange.
This patch makes the following changes to the macros.

- Removes PROFILER_LABEL_FUNC. It's only suitable for use in functions outside
  classes, due to PROFILER_FUNCTION_NAME not getting class names, and it was
  mostly misused.

- Removes PROFILER_FUNCTION_NAME. It's no longer used, and __func__ is
  universally available now anyway.

- Combines the first two string literal arguments of PROFILER_LABEL and
  PROFILER_LABEL_DYNAMIC into a single argument. There was no good reason for
  them to be separate, and it forced a '::' in the label, which isn't always
  appropriate. Also, the meaning of the "name_space" argument was interpreted
  in an interesting variety of ways.

- Adds an "AUTO_" prefix to PROFILER_LABEL and PROFILER_LABEL_DYNAMIC, to make
  it clearer they construct RAII objects rather than just being function calls.
  (I myself have screwed up the scoping because of this in the past.)

- Fills in the 'js::ProfileEntry::Category::' qualifier within the macro, so
  the caller doesn't need to. This makes a *lot* more of the uses fit onto a
  single line.

The patch also makes the following changes to the macro uses (beyond those
required by the changes described above).

- Fixes a bunch of labels that had gotten out of sync with the name of the
  class and/or function that encloses them.

- Removes a useless PROFILER_LABEL use within a trivial scope in
  EventStateManager::DispatchMouseOrPointerEvent(). It clearly wasn't serving
  any useful purpose. It also serves as extra evidence that the AUTO_ prefix is
  a good idea.

- Tweaks DecodePool::SyncRunIf{Preferred,Possible} so that the labelling is
  done within them, instead of at their callsites, because that's a more
  standard way of doing things.

--HG--
extra : rebase_source : 318d1bc6fc1425a94aacbf489dd46e4f83211de4
2017-06-22 17:08:53 +10:00
Nicholas Nethercote
915a56fb41 Bug 1375299 (part 2) - Remove PROFILER_MARKER. r=mstange.
PROFILER_MARKER is now just a trivial wrapper for profiler_add_marker(). This
patch removes it.

--HG--
extra : rebase_source : 9858f34763bb343757896a91ab7ad8bd8e56b076
2017-06-22 13:40:21 +10:00
Nicholas Nethercote
4b364cf3f3 Bug 1375299 (part 1) - Reduce usage of MOZ_GECKO_PROFILER. r=mstange.
This patch reduces the differences between builds where the profiler is enabled
and those where the profiler is disabled. It does this by removing numerous
MOZ_GECKO_PROFILER checks.

These changes have the following consequences.

- Various functions and classes are now defined in all builds, and so can be
  used unconditionally: profiler_add_marker(), profiler_set_js_context(),
  profiler_clear_js_context(), profiler_get_pseudo_stack(), AutoProfilerLabel.
  (They are effectively no-ops in non-profiler builds, of course.)

- The no-op versions of PROFILER_* are now gone. The remaining versions are
  almost no-ops when the profiler isn't built.

--HG--
extra : rebase_source : 8fb5e8757600210c2f77865694d25162f0b7698a
2017-06-22 06:26:16 +10:00
Nicholas Nethercote
033f83145c Bug 1375387 - Reorder and section-ify GeckoProfiler.h. r=mstange.
This patch gives some structure and order to the profiler's API.

It also renames AutoProfilerRegister as AutoProfilerRegisterThread, to match
profiler_register_thread().
2017-06-22 14:28:47 +10:00
Nicholas Nethercote
784f6f2ee9 Bug 1374908 - Remove --enable-systrace. r=glandium.
This option causes MOZ_USE_SYSTRACE to be defined. The only use of that is in
GeckoProfiler.h where it causes the PROFILER_PLATFORM_TRACING macro to set
android::ScopedTrace. But android::ScopedTrace was defined in widget/gonk/
which was recently removed, so this won't work any more.

Furthermore, all that android::ScopedTrace did was to do a pair of
atrace_{begin,end}() calls, which doesn't seem that useful.
2017-06-21 14:06:22 +10:00
Michael Layzell
4e0049276e Bug 1373980 - Null-check infoArray correctly in GetInfoForSelf on macOS, r=mstange
MozReview-Commit-ID: 9hZ9VL9MWl9
2017-06-22 14:50:48 -04:00
Andrew Halberstadt
91efad9d6d Bug 1369787 - [mozlint] Remove 'rev' option from |mach lint|, r=bc
The rev option is inherently broken. It does let you lint files touched by any
revision, but it doesn't update those files to that revision first.  Instead,
they get linted at whatever the working directory is and their results are
bogus. Even if we did some magic to update the files to the proper revision
with in-memory version control magic, the config files would still be out of
date.

Plus, the new --outgoing option does pretty much the only thing --rev was good
for. Rather than cause confusion, I think it's better to just remove the
option.

MozReview-Commit-ID: 2y2UnfIkvsR

--HG--
extra : rebase_source : 9b5c142270c98905d71ebb89d1620e91914c0b47
2017-06-08 22:54:00 -04:00
Andrew Halberstadt
4b93103061 Bug 1375166 - [mozlint] Don't require leading '.' in extensions, r=standard8
This was a regression from bug 1288432. The 'extensions' config in mozlint required a
leading period, but eslint requires them without the period (and this got copied over
to the linter definition). The result was mozlint filtering out any files (not dirs)
that were passed in.

This just modifies mozlint to strip out the period so both are acceptable.

MozReview-Commit-ID: CbNynYzrbGz

--HG--
extra : rebase_source : 51c740cb1d2febaee3ae46784f83381cda5e5eaa
2017-06-21 13:22:34 -04:00
Chris Peterson
dbae46159f Bug 1373525 - libfuzzer: Remove unused member function ScopedXPCOM::failed(). r=decoder
tools/fuzzing/libfuzzer/harness/LibFuzzerTestHarness.h:118:10: warning: unused member function 'failed' [-Wunused-member-function]

MozReview-Commit-ID: 7hsvvnnolcl

--HG--
extra : source : f80cd86fd1e116f59b23539292bb6d5dd6afcc7c
extra : intermediate-source : bb240b1bedb9c4503d34370f652b4a5dc9f68628
2017-06-13 00:42:23 -07:00