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

4864 Коммитов

Автор SHA1 Сообщение Дата
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
Nicholas Nethercote 4183270eec Bug 1375275 (part 3) - Remove profiler_log(). r=mstange.
It's a wafer thin wrapper around profiler_tracing() and it's only used three
times. Let's just remove it.

Note also that those three uses are the only places where TRACING_EVENT is
used. I wonder if they're really needed...

--HG--
extra : rebase_source : ac70b4c77c4592d96957a8e6249597eafc822fd4
2017-06-21 20:50:07 +10:00
Nicholas Nethercote dc54dc76f0 Bug 1375275 (part 2) - Remove TracingMarkerPayload::Get{Category,Kind}(). r=mstange.
--HG--
extra : rebase_source : 28b648baf294e61dcca70b4157dd023096057abc
2017-06-21 20:41:36 +10:00
Nicholas Nethercote a2e768a6ee Bug 1375275 (part 1) - Remove PROFILER_GET_BACKTRACE_ENTRIES. r=mstange.
It doesn't need to be exported.

--HG--
extra : rebase_source : 8732e0894082d8377ddae31619fffc3b91f3b6a7
2017-06-21 20:33:00 +10:00
Nicholas Nethercote e742d137c7 Bug 1374975 - Fix incorrect arguments to NotifyProfilerStarted. r=mstange.
--HG--
extra : rebase_source : e9f5b60c6126c9a6295616e9ab0e815a65a28c1a
2017-06-21 20:32:51 +10:00
Carsten "Tomcat" Book 7177a36cde Merge mozilla-central to mozilla-inbound 2017-06-21 14:55:27 +02:00
Carsten "Tomcat" Book 8a1350b5a6 Backed out changeset 4f6302a98ae4 (bug 1372405)
--HG--
extra : rebase_source : 41632f3158e88e692809731394a683d065a73dfb
2017-06-21 13:59:26 +02:00
Mark Banner 70710367aa Bug 1374674 - Enable more ESLint rules across the tree to help developers where we're already passing them (no-class-assign, no-const-assign, no-dupe-class-members). r=mossop
MozReview-Commit-ID: 6jJPhH08Ae7

--HG--
extra : rebase_source : 64efb6660fdd1a0d4390e8f9e4842199249ca54f
2017-06-20 16:16:12 +01:00
Julian Seward 7eda9d1a96 Bug 1374248 - LUL: remove stack scanning. r=njn.
This removes LUL's ability to recover frames by the heuristic mechanism of
stack scanning.  Stack scanning is a last-ditch way to try to recover the
unwind when all other methods (metadata-based, frame-pointer chasing) have
failed, by scanning back up the stack and looking for the first word that
could plausibly be a return address.  It often mis-identifies return addresses
because it has no way to distinguish live ones from dead ones that have not
been overwritten, and very often causes the unwind to fail as a result.

In any case LUL's stack scanning ability has actually been switched off (by
the parameters passed to LUL::Unwind) for some considerable time now, so this
change should make no observable difference to behaviour.  Specific changes:

In LUL::Unwind():

* Removes formal parameters |scannedFramesAcquired| and |scannedFramesAllowed|

* Removes code that does stack scanning

* Simplifies control flow in the main unwind loop, so that loop now
  has the easier-to-follow structure

  while (true) {
    // preliminary stuff

    if (CFI data available for current PC) {
       do CFI step;
       continue;
    }

    if (FP chasing possible for current PC) {
       do FP step;
       continue;
    }

    // give up
    break;
  }

* Moves two #ifdefs upwards to enclose the comments pertaining to them, as
  well as the code.  This makes the top level structure easier to follow.  The
  corresponding #endifs are likewise commented with the condition.

From class LULStats, removes |mScanned|.

Removes PriMap::MaybeIsReturnPoint() entirely.  This is a heuristic helper
only used by stack scanning.

In all, 395 lines of code are removed, according to hg diff --stat.

--HG--
extra : rebase_source : 5ffa73c64923149a58df3228cf940cb539f8f707
2017-06-19 16:21:59 +02:00
Wes Kocher 17a16ffd2f Merge m-c to inbound, a=merge
MozReview-Commit-ID: Gf5xDaCWnPi
2017-06-19 17:34:36 -07:00
Nicholas Nethercote c078fc6036 Bug 1374127 (part 7) - Remove Registers' constructor. r=mstange.
We rely partly on the constructor to set Registers, and partly on subsequent
assignments. This patch changes things so we rely entirely on subsequent
assignments, for consistency.

--HG--
extra : rebase_source : ca69186f5755003e710985bfb40c90072067305c
2017-06-20 08:45:43 +10:00
Nicholas Nethercote cc6bc3e49b Bug 1374127 (part 6) - Rename FillInRegs(), and introduce a similar function for Windows to avoid repetition. r=mstange.
--HG--
extra : rebase_source : 5dcc319804661858e8d58b41d1f8b8f452d80c2b
2017-06-20 08:45:43 +10:00
Nicholas Nethercote 5e6717e1af Bug 1374127 (part 5) - Remove SyncPopulate's argument. r=mstange.
We can use a static ucontext_t on Linux for synchronous samples instead of
declaring one on the stack in profiler_get_backtrace(). This neatens
SyncPopulate()'s signature.

SyncPopulate() is also only used when HAVE_NATIVE_UNWIND is defined, so the
patch guards the definitions.

--HG--
extra : rebase_source : b71e6d76f24b37bc236ac8f4359d401b1551e2de
2017-06-20 08:45:43 +10:00
Nicholas Nethercote 376df7b9bd Bug 1374127 (part 4) - Clean up GeckoProfiler.h a bit. r=mstange.
The patch:

- Removes some unnecessary forward declarations.

- Moves some macros to more logical locations.

- Improves and removes some comments.

--HG--
extra : rebase_source : 23f1de029bbe4a37d2cc1ebe1df76e9a6aa1b335
2017-06-20 08:45:41 +10:00
Nicholas Nethercote f8bf8ca8f0 Bug 1374127 (part 3) - Reorder macros in GeckoProfiler.h. r=mstange.
It's bugged me for some time that the comments explaining what all the
PROFILER_* macros do are on the empty definitions that are used when the
profiler is disabled. This patch switches the order.

--HG--
extra : rebase_source : d783aa996f91b305cbebd678e6652d6bc939fb98
2017-06-19 13:34:32 +10:00
Nicholas Nethercote 453b6f2d11 Bug 1374127 (part 2) - Clean up ProfilerMarkerPayload. r=mstange.
This patch does the following.

- Renames some ProfilerMarkerPayload subclasses so they all of the form
  "FooMarkerPayload", to make the subclass relationship clearer.
  (ProfilerMarkerTracing -- now TracingMarkerPayload -- was the worst
  offender.)

- Removes ProfilerMarkerImagePayload and TouchDataPayload, neither of which are
  used.

- Changes streamCommonProps() to StreamCommonProps().

- Does some minor style and comment fixes in ProfilerMarkerPayload.h.

--HG--
extra : rebase_source : dd732905e96da83bcbf124c70b20011c661fc332
2017-06-19 13:32:32 +10:00
Nicholas Nethercote feb7783eed Bug 1374127 (part 1) - Add `using namespace mozilla;` to ProfilerMarkerPayload.cpp. r=mstange.
--HG--
extra : rebase_source : 37961947dbc0151903dabcda2d5fa00c99a1a333
2017-06-16 12:46:10 +10:00
Carsten "Tomcat" Book d14a5a593a merge mozilla-inbound to mozilla-central a=merge 2017-06-19 13:37:20 +02:00
Nicholas Nethercote 5d3808c6e5 Bug 1373436 (part 4) - Use UniquePtr with profile_add_marker(). r=mstange.
Once the |aPayload| argument to profile_add_marker() became a UniquePtr the
default value of nullptr caused compilation difficulties that could only be
fixed by #including ProfilerMarkerPayload.h into lots of additional places
(because the UniquePtr<T> instantiation required the T to be fully defined). To
get around this I just split profile_add_marker() into two functions, one with
1 argument and one with 2 arguments.

The patch also removes the definition of PROFILER_MARKER_PAYLOAD in the case
where MOZ_GECKO_PROFILER isn't defined. A comment explains why.
2017-06-16 12:26:26 +10:00
Nicholas Nethercote 8fccd59ba6 Bug 1373436 (part 3) - Use UniquePtr more with ProfilerMarkerPayload. r=mstange. 2017-06-16 10:51:05 +10:00
Nicholas Nethercote 442ac55216 Bug 1373436 (part 2) - Use a UniquePtr for CorePS::mLul. r=mstange. 2017-06-16 10:30:35 +10:00
Nicholas Nethercote 8d89035364 Bug 1373436 (part 1) - Use UniquePtr more for ProfileBuffer and ProfilerBacktrace . r=mstange. 2017-06-16 09:43:16 +10:00
Nicholas Nethercote d529284168 Bug 1373154 (part 3, attempt 2) - Overhaul TickSample and things around it. r=mstange.
Bug 1357829 added a third kind of sample, in addition to the existing
"periodic" and "synchronous" samples. This patch cleans things up around that
change. In particular, it cleans up TickSample, which is a mess of semi-related
things.

The patch does the following.

- It removes everything from TickSample except the register values and renames
  TickSample as Registers. Almost all the removed stuff is available in
  ThreadInfo anyway, and the patch adds a ThreadInfo argument to various
  functions. (Doing it this way wasn't possible until recently because a
  ThreadInfo wasn't available in profiler_get_backtrace() until recently.)

  One non-obvious consequence: in synchronous samples we used to use a value of
  0 for the stackTop. Because synchronous samples now use ThreadInfo directly,
  they are able to use the proper stack top value from ThreadInfo::mStackTop.
  This will presumably only improve the quality of the stack traces.

- It splits Tick() in two and renames the halves DoPeriodicSample() and
  DoSyncSample().

- It reorders arguments in some functions so that ProfileBuffer (the output) is
  always last, and inputs are passed in roughly the order they are obtained.

- It adds a comment at the top of platform.cpp explaining the three kinds of
  sample.

- It renames a couple of other things.

--HG--
extra : rebase_source : 4f1e69c605102354dd56ef7af5ebade201e1d106
2017-06-19 09:38:15 +10:00
Nicholas Nethercote 61516fe3a0 Bug 1373154 (part 2, attempt 2) - Don't call AllocPlatformData() in profiler_get_backtrace(). r=mstange.
We already have a PlatformData for the thread in its ThreadInfo.

--HG--
extra : rebase_source : 4b7a4f70c3b38f38928bfa7d10b6362ac2cc3ed6
2017-06-19 09:38:11 +10:00