Commit Graph

4564 Commits

Author SHA1 Message Date
Paul Bignier
a07aa00315 Bug 1356797 - Update ThirdPartyPaths.txt. r=sylvestre 2017-04-16 19:08:29 -07:00
Sebastian Hengst
a7334b2896 Bug 1347709 and Bug 1356569 - Bump eslint plugin version to resolve conflict. r=instruction-by-florian a=bustage-fix
MozReview-Commit-ID: 2zp9hXqxT26

--HG--
extra : amend_source : 465b881899a40cf29d0f3d7dbdd883d8a61edb2c
2017-04-15 20:05:51 +02:00
Sebastian Hengst
8bd051237a merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: JpAhOPjgvkF
2017-04-15 19:59:24 +02:00
Mark Banner
f515ecdff3 Bug 1347709 - Allow modules.json to be loaded from a local version for out-of-tree uses of eslint-plugin-mozilla. r=mossop
MozReview-Commit-ID: 7RzAUqNJQ15

--HG--
extra : rebase_source : c71873fd9864032345fb48047f2c272c2703a210
2017-04-13 12:03:30 +01:00
Mark Banner
4ef57a002d Bug 1347709 - Add a prepublish script to save the current globals for the published version of eslint-plugin-mozilla, and use that when not in mozilla-central. r=mossop
MozReview-Commit-ID: GHD7GQ0Pjnp

--HG--
extra : rebase_source : 8a8deeb0544799426baa820fa91a22eb9e1d3526
2017-04-12 18:02:53 +01:00
Markus Stange
2d2f47f7b2 Bug 1355634 - Use MozPromise to make ProfileGatherer more generic. r=njn
MozReview-Commit-ID: GKqxJW8zjca

--HG--
extra : rebase_source : a6f0903008503ae34cb1584bbd38357ff2343c22
extra : histedit_source : 7e077d757dfa919b4a88a10cff0fc15beb3a62f9
2017-04-12 16:57:58 -04:00
Markus Stange
c0b86ef8ba Bug 1321617 - Add a test for profiler_stream_json_for_this_process. r=njn
MozReview-Commit-ID: A5Iu3dQFvHK

--HG--
extra : rebase_source : e15843dba66e427c6b1eb7bc2f8a63f419f9e3ca
extra : histedit_source : 6f7e9ee3a31aa2463c4946d543e4358fd724f02f
2017-04-12 16:48:16 -04:00
Markus Stange
e668a84964 Bug 1321617 - Capture parent process profiles in ProfileGatherer::Start2, not in ProfileGatherer::Finish. r=njn
MozReview-Commit-ID: 3vC2qb90KN5

--HG--
extra : rebase_source : 45930d88a88648b9d472f990e79e815c106d4fa3
extra : histedit_source : e8b1ef002432231cf3698a5408a1a0d80f3bcac6
2017-04-09 16:52:22 -04:00
Markus Stange
dcfba9f179 Bug 1321617 - Call profiler_stream_json_for_this_process in ProfileGatherer::Finish() and get rid of the 'profile-subprocess' notification indirection. r=njn
MozReview-Commit-ID: CnE0SJBsfDN

--HG--
extra : rebase_source : 59f4201d3d8b8fb0d5bc7743f9dafd60789d916a
extra : histedit_source : 5b8b9b26ac87d22d118891868a8a07fe225e85b2
2017-04-12 16:40:03 -04:00
Markus Stange
4a1b5c4027 Bug 1321617 - Reduce the scope of the lock in profiler_get_profile. r=njn
MozReview-Commit-ID: 5OmVMwy1yMl

--HG--
extra : rebase_source : 9cebf6f6ff860fc6b0750e9e4d9eaf23773ccc19
extra : histedit_source : cbd1321ea17a26553384efb6ee7511d800878b84
2017-04-12 16:45:28 -04:00
Markus Stange
a951919765 Bug 1321617 - Move parts of StreamJSON out into the callers and rename it to locked_profiler_stream_json_for_this_process. r=njn
MozReview-Commit-ID: 239BJOa2bix

--HG--
extra : rebase_source : 36f248d60bf4c82deb2a62c5a45d9c1c3c44af2e
extra : histedit_source : e5b2b4cb5f19e6efb69ff8e2d391199d3dbaf3ea
2017-04-08 21:07:52 -04:00
Markus Stange
0fc86487fd Bug 1321617 - Don't store profiles on the CPPC; pass them right to the ProfileGatherer. r=njn
MozReview-Commit-ID: 6gaP8Ltm7ms

--HG--
extra : rebase_source : c91f87f096286f8914553a26d692ea99ec9369c5
extra : histedit_source : 0fd9f4a9bf8b9f8f0acaaab30640a5e2f462148b
2017-04-08 21:54:16 -04:00
Markus Stange
59446b4f09 Bug 1321617 - Tell the CrossProcessProfilerController whether a profile is a response to a GatherProfile request or whether it was sent because the process was exiting. r=mconley
MozReview-Commit-ID: BLkaeZqtRhv

--HG--
extra : rebase_source : b0271115a66afbf54d98b5bad61165f815f5bd8c
extra : histedit_source : 299cccc9cc8c06de4d61686ff49d2b0e7649da78
2017-04-12 16:44:31 -04:00
Markus Stange
dc05eb93fd Bug 1329114 - Put profiles from other processes into a 'processes' array, not into the threads array, and don't stringify them. r=njn
MozReview-Commit-ID: Ccl6JIbRMyX

--HG--
extra : rebase_source : 1b9a5bbff6da5b1dbfb907630900526e95981a28
extra : histedit_source : 8c830a0178c14fdb044dea2c7323025d3892454b
2017-04-08 16:00:30 -04:00
Mark Banner
b624a1a95b Bug 1347709 - Add a .npmignore file to stop publishing unnecessary files for eslint-plugin-mozilla. r=mossop
MozReview-Commit-ID: BcZBIFM1Ugu

--HG--
extra : rebase_source : ca8cbc2e04cb96e98da5febdd82d8ac7393ebc8b
2017-04-06 12:04:52 +01:00
Markus Stange
eb07a56986 Bug 1356752 - Fix --enable-tasktracer build by adding the missing aWriter argument. r=njn
MozReview-Commit-ID: L87KE3BmYRB

--HG--
extra : rebase_source : 09e34cc04ea7f76a07419e0e75cc0b097c001b6b
2017-04-15 00:22:07 -04:00
Julian Seward
0187151352 Bug 1355136 - LUL on i686/x86_64-linux: allow CFAs to be arbitrary prefix expressions. r=froydnj.
For reasons which are unclear, but possibly due to lack of any known use cases
when the code was written, LUL on i686/x86_64-linux only accepts CFA (canonical
frame address) expressions of the form SP+offset or FP+offset.  However, on
Fedora 25 x86_64 and Ubuntu 16.10 x86_64, at least one address range per object
uses a Dwarf expression for the CFA, for example:

00000018 000000000024 0000001c FDE cie=00000000 pc=0000000031e0..0000000031f0
  DW_CFA_def_cfa_offset: 16
  DW_CFA_advance_loc: 6 to 00000000000031e6
  DW_CFA_def_cfa_offset: 24
  DW_CFA_advance_loc: 10 to 00000000000031f0
  DW_CFA_def_cfa_expression(
          DW_OP_breg7 (rsp): 8; DW_OP_breg16 (rip): 0; DW_OP_lit15; DW_OP_and;
          DW_OP_lit11; DW_OP_ge; DW_OP_lit3; DW_OP_shl; DW_OP_plus)

producing the following complaint from LUL:

  can't summarise: SVMA=0x31f0: rule for DW_REG_CFA: invalid |how|, expr=LExpr(PFXEXPR,0,0)

Given that LUL is capable of handling such a CFA expression, it seems artificial
to stop it doing so.  This patch changes Summariser::Rule() so as to allow such
expressions.
2017-04-12 08:42:02 +02:00
Wes Kocher
c8a2033f35 Merge m-c to inbound, a=merge 2017-04-13 17:33:39 -07:00
Wes Kocher
514e230373 Merge inbound to central, a=merge 2017-04-13 17:24:01 -07:00
Nicholas Nethercote
1fbc5e1dab Bug 1355807 - Fix condition guarding stopJSSampling() calls. r=jseward.
PseudoStack requires that startJSSampling() and stopJSSampling() calls be
interleaved. But currently the conditions guarding those calls don't match:
startJSSampling() is guarded by ShouldProfileThread(), and stopJSSampling() is
guarded by HasProfile().

It's possible for HasProfile() to be true when ShouldProfileThread() is not
true -- e.g. profile many threads, then restart and profile fewer threads, and
we end up with live threads that have a profile but aren't being profiled right
now -- which leads to assertion failures in stopJSSampling().

This patch makes the stopJSSampling() condition use ShouldProfileThread(), just
like the startJSSampling() condition, which fixes the assertion failure.

--HG--
extra : rebase_source : e9931928c8ac1301f5018f9da319bc478722b98e
2017-04-13 09:34:42 +10:00
Julian Seward
553b8e9b10 Bug 1354546 - Make LUL read CFI from the main executable on x86_64-Linux. r=n.nethercote.
LUL doesn't read CFI from the main executable on x86_64-linux, and possibly
other Linux variants, because SharedLibraryInfo::GetInfoForSelf() doesn't
produce a name for the main executable object, even though it does notice the
mapping.

This causes noticeable unwind breakage because the main executable on Linux
contains various wrapper functions pertaining to memory allocation and locking,
such as

  moz_xmalloc, moz_xcalloc, moz_xrealloc
  mozilla::detail::MutexImpl::lock, mozilla::detail::MutexImpl::unlock

and is generally observable on x86_64-Linux as unwinding failures out of
functions with addresses around 0x40xxxx, since that's the traditional load
address for the main executable.

This patch modifies the Linux implementation of GetInfoForSelf() so as to
harvest the main executable's name from /proc/self/maps.  This is then added
into the information acquired from dl_iterate_phdr.  As a result
GetInfoForSelf() does correctly report the executable name, so LUL reads Dwarf
unwind info from it, and the abovementioned unwinding failures disappear.

--HG--
extra : rebase_source : 267c6d7c3967a4d29f8ff0b4a91d339a6625085d
2017-04-12 07:56:58 +02:00
Wes Kocher
dd8c316d53 Merge m-c to inbound, a=merge 2017-04-12 18:24:24 -07:00
Wes Kocher
2986c817dc Merge autoland to central, a=merge CLOSED TREE 2017-04-12 15:13:30 -07:00
Wes Kocher
25d50f2c30 Merge inbound to central, a=merge 2017-04-12 14:39:09 -07:00
Nicholas Nethercote
32998fa82c Bug 1347258 - Pass TickSample as a reference, not a pointer. r=mstange.
--HG--
extra : rebase_source : cec4e4435b5e67b4bbf29c5f0637f5ebe3a37fca
2017-04-12 14:56:41 +10:00
Mark Banner
3dd96b34b3 Bug 1355776 - Upgrade ESLint to version 3.19.0 to pick up autofix improvements and other fixes. r=mossop
Pick up autofix improvements in 3.19.0. Upgrade eslint-plugin-react. Also fix issues with the package.json file and the ESLint node_modules upload script.

MozReview-Commit-ID: IDZ1n4qTTuv

--HG--
extra : rebase_source : aa97cd6f314ce10d16d12446e50a27d6f994a9f1
2017-04-12 12:07:01 +01:00
Nicholas Nethercote
02ad712a35 Bug 1355357 (part 3) - Construct nativeStack with the right count. r=jseward.
--HG--
extra : rebase_source : 1f619c7fd3af728d34d1f0d350e0d94fa618b5d0
2017-04-11 18:49:00 +10:00
Nicholas Nethercote
2ce4e19d9c Bug 1355357 (part 2) - Avoid a GetThreadHandle() call. r=jseward.
Using ProfiledThread() instead avoids a cast.

--HG--
extra : rebase_source : ddd6b75bc741fc04aa94d0ec2494eb24a2ef9fca
2017-04-11 18:48:02 +10:00
Nicholas Nethercote
e64832b7ec Bug 1355357 (part 1) - Rename profiled_thread_ and profiled_thread() in PlatformData. r=jseward.
--HG--
extra : rebase_source : e223ab428aeeb0e711c31dc47a19d5d1bcc471ed
2017-04-11 18:47:15 +10:00
Iris Hsiao
944f87c575 merge mozilla-inbound to mozilla-central a=merge 2017-04-12 11:16:46 +08:00
Julian Seward
ac843f7319 Bug 1355052 - Tidy up shared-linux-libraries.cc. r=n.nethercote.
shared-linux-libraries.cc is a maze of ifdefs which is hard to navigate, hard to
reason about and gets in the way of making a proper fix for bug 1354546.  This
bug is for cleanup only.  It should not change any functionality.

The following changes are made:

* adds emacs/vi tab-width lines

* removes the ARRAY_SIZE macro as it appears to be unused

* documents the 3 different configurations, splits #includes accordingly

* comments SharedLibraryInfo::GetInfoForSelf accordingly

* wraps some long lines

* documents in which cases dl_iterate_phdr is used and in which cases
  /proc/<pid>/maps is used

* Puts /proc/<pid>/maps reading in its own scope

* Makes the LOG messages on failure clearer
2017-04-11 18:11:16 +02:00
Kan-Ru Chen
da0e46ae95 Bug 1355123 - Initialize gecko profiler properly for IPDL test runner. r=mstange,njn
MozReview-Commit-ID: C9hkZPj3SVL
2017-04-11 10:56:58 -04:00
Nicholas Nethercote
d8427b066c Bug 1354436 - Fix crash when MOZ_PROFILER_HELP is specified. r=jseward.
--HG--
extra : rebase_source : 86bedf7edc2b0bfce3b75f8828f3c4fb5015a16c
2017-04-10 14:52:05 +10:00
Carsten "Tomcat" Book
023be17063 Merge mozilla-central to autoland 2017-04-11 10:24:02 +02:00
Mark Banner
a49e5501a1 Bug 1354460 - Fix the Mercurial ESLint Hook after the node_modules location change. r=mossop
MozReview-Commit-ID: LhB6twS4TLI

--HG--
extra : rebase_source : 07167ded1cab35a4ade756d773e02b297aaf36bf
2017-04-10 10:07:37 +01:00
Kearwood Gilbert
8cedccb89e Bug 1341423 - Integrate OpenVR binding library r=daoshengmu
MozReview-Commit-ID: GaUnfbXgh9L

--HG--
rename : gfx/vr/openvr/openvr.h => gfx/vr/openvr/headers/openvr.h
extra : rebase_source : e7a0983371c1ed381ddf431e2d5a814c510d4967
2017-02-27 16:59:30 -08:00
Nicholas Nethercote
632b8b594d Bug 1353630 (part 5) - Allocate PseudoStack within ThreadInfo's constructor. r=jseward. 2017-04-06 09:40:28 +10:00
Nicholas Nethercote
bd098b6cbc Bug 1353630 (part 4) - Separate ThreadInfos for live and dead threads. r=jseward.
Currently, ThreadInfos for live and dead threads are stored in a single vector.
This patch separates them into two separate vectors.

This ensures that the two kinds of ThreadInfos can't be mixed up. It also means
ThreadInfo::mPendingDelete can be removed.
2017-04-03 10:40:23 +10:00
Nicholas Nethercote
3bd73aaa4b Bug 1353630 (part 3) - Don't hold onto ThreadInfos for dead threads that aren't being profiled. r=jseward.
Currently, when the profiler is active we hold onto the ThreadInfo of all
threads that die. Then when capturing a profile we ignore all threads that
aren't being profiled.

This patch changes things so we only hold onto the ThreadInfos of threads that
die if they are being profiled. In effect it removes state 3 from the following
list of possible ThreadInfo states:

  1. !PendingDelete + !HasProfile
  2. !PendingDelete + HasProfile
  3. PendingDelete + !HasProfile  (no longer used)
  4. PendingDelete + HasProfile
2017-04-03 10:40:23 +10:00
Nicholas Nethercote
76d203f1da Bug 1353630 (part 2) - Replace MaybeSetProfile() with ShouldProfileThread(). r=jseward.
MaybeSetProfile() does a check and then sets on success. By separating the
check from the set, we can avoid some subsequent HasProfile() checks.
2017-04-06 07:44:59 +10:00
Nicholas Nethercote
9c349c7a6c Bug 1353630 (part 1) - Refactor ThreadResponsiveness use in ThreadInfo. r=mstange.
Now that ThreadResponsiveness is only used on the main thread, we can refactor
ThreadInfo a bit. This patch does the following.

- Removes ThreadInfo::mThread, which is unused.

- Changes ThreadInfo::mRespInfo to a Maybe<>, and moves the is-main-thread
  checking outside of ThreadInfo and ThreadResponsiveness.

- Renames {ThreadInfo,TickSample}::mRespInfo as mResponsiveness, to better
  match the class name.
2017-04-05 15:53:13 +10:00
Nicholas Nethercote
df889bc9f6 Bug 1350967 (part 2) - Remove profiler_get_profile_jsobject_async() and profiler_save_profile_to_file_async(). r=mstange.
The state management is better done within nsProfiler::GetProfileDataAsync()
and nsProfiler::DumpProfileToFileAsync(). (The latter function is new in this
patch.)

This fixes a deadlock.

Other notes:

- The patch moves ProfileGatherer from ProfilerState to nsProfiler. This is
  nice because the former is shared between threads but the latter is main
  thread only. (This is how the deadlock is avoided.)

- ProfilerStateMutex and PSLockRef are no longer required in platform.h. Those
  types and variables are now only used in platform.cpp and platform-*.cpp.

- ProfilerGatherer now calls profiler_get_profile() instead of ToJSON(). Which
  means that ToJSON() now has a single caller, so the patch inlines it at the
  callsite and removes it.

- profiler_save_profile_to_file_async() dispatched a Runnable to the main
  thread. But this wasn't necessary, because it always ran on the main thread
  itself. So the new function nsProfiler::DumpProfileToFileAsync() doesn't do
  that.

- profiler_will_gather_OOP_profile(), profiler_gathered_OOP_profile(), and
  profiler_OOP_exit_profile() are all moved into nsProfiler as well. This
  removes the need for the horrible fake lock in
  profiler_will_gather_OOP_profile(), hooray!
2017-03-29 15:48:13 +11:00
Nicholas Nethercote
445b5b7145 Bug 1350967 (part 1) - Remove profiler_get_profile_jsobject. r=mstange.
The conversion to a JSObject is better done within
nsProfiler::GetProfileData().

--HG--
extra : rebase_source : 4a0ba97d99681fca96f2d26b609bafe188095787
2017-03-29 14:02:37 +11:00
Mark Banner
92c422a2d6 Bug 1342459 - Add a rule to automatically detect ContentTask.spawn and inject the relevant globals. r=mossop
This reduces the amount of places where we need to specify the mozilla/frame-script environment. It does have
the side effect of allowing those globals in the whole file, but that is what specifying the environment would
do, and this is also for mochitest test files only.

MozReview-Commit-ID: 1LLFbn6fFJR

--HG--
extra : rebase_source : 82a6934d90bbbbd25f91b7b06bf4f9354e38865a
2017-04-05 10:00:25 +01:00
Mark Banner
427e3b23dc Bug 1342459 - Fix various no-undef issues in browser/base. r=mossop
MozReview-Commit-ID: CRYxu7copKb

--HG--
extra : rebase_source : bc176c5e6890ffc6a4e26cb9bc9d441d9486ce7b
2017-04-04 13:42:33 +01:00
Carsten "Tomcat" Book
c5364b4b43 Merge mozilla-central to mozilla-inbound 2017-04-05 14:50:28 +02:00
Carsten "Tomcat" Book
7a670cdd01 merge mozilla-inbound to mozilla-central a=merge 2017-04-05 14:33:35 +02:00
Joel Maher
8db607ac7d Bug 1341876 - annotate tools/* with BUG_COMPONENTS. r=gps
MozReview-Commit-ID: 4v1CzI8RtJs
2017-04-05 08:31:05 -04:00
Nicholas Nethercote
f9e82b4a80 Bug 1351136 (follow-up) - Fix a harmless argument mis-ordering in a call to profiler_get_start_params(). r=me.
Found by Coverity.

--HG--
extra : rebase_source : 6f65ceef59e8b32252146eec6703a7fd17b3479b
2017-04-05 11:56:37 +10:00
Andrew McCreight
2f83bee3a7 Bug 1353174, part 1 - Turn ContentObservers.jsm into a process script. r=Gijs
This retains the advantage of running only once per process, while
avoiding the per-process overhead of a jsm.

MozReview-Commit-ID: 1N53MvRwUpg

--HG--
rename : browser/modules/ContentObservers.jsm => browser/modules/ContentObservers.js
extra : rebase_source : 6a502cff26fcb55526f97385274bbae871f5cc6c
2017-04-04 11:21:48 -07:00