Commit Graph

3343 Commits

Author SHA1 Message Date
Wes Kocher
36a9133ce4 Merge inbound to central, a=merge
MozReview-Commit-ID: HZUHBRK4UmL
2017-04-27 13:00:07 -07:00
Nicholas Nethercote
d04947e2bf Bug 1358074 (part 7) - Split PS in two. r=mstange.
PS contains some state that is always valid, and some state that is only valid
when the profiler is active. This patch does the following.

- Splits PS into two parts for the two kinds of state: CorePS and ActivePS.

- Moves gPS (now split in two) into CorePS and ActivePS, as static instances,
  to improve encapsulation. This required changing all the state getters and
  setters into static methods.

- Existence tests for CorePS and ActivePS are now done via the Exists()
  methods.

Advantages of this change:

- It's now clear which parts of the global state (most of it!) are valid only
  when the profiler is active, and we don't have to invalidate those parts with
  zero/null/false when the profiler stops.

- Better OOP: more use of constructors and destructors, and more |const| to
  indicate what state is immutable.

- With the old code there were some places where the order of things required
  care, but with the new code it's not possible to get the order wrong.
2017-04-21 13:28:23 +10:00
Carsten "Tomcat" Book
eb1595e913 Merge mozilla-central to autoland 2017-04-27 16:36:41 +02:00
Wes Kocher
1f5ff5465f Merge m-c to autoland a=merge
MozReview-Commit-ID: LOGgOErcV9L
2017-04-26 17:43:38 -07:00
Carsten "Tomcat" Book
592baf4201 Merge mozilla-central to mozilla-inbound 2017-04-26 09:04:59 +02:00
Carsten "Tomcat" Book
dc7e8b78ef merge mozilla-inbound to mozilla-central a=merge 2017-04-26 08:41:31 +02:00
Carsten "Tomcat" Book
00da9b8f70 merge autoland to mozilla-central a=merge 2017-04-26 08:40:02 +02:00
Nicholas Nethercote
c768a954ae Bug 1358320 - Make TimeStamp::ProcessCreation()'s outparam optional. r=gsvelto.
TimeStamp::ProcessCreations()'s aIsInconsistent outparam is ignored by the
majority of its caller. This patch makes it optional. Notably, this makes
ProcessCreation() easier to use in a constructor's initializer list.
2017-04-26 14:55:54 +10:00
Wes Kocher
1bb3fcd58a Merge inbound to m-c a=merge
MozReview-Commit-ID: A85cs7Yriqj
2017-04-25 13:53:00 -07:00
Nicholas Nethercote
ac5af9ea94 Bug 1358074 (part 6, attempt 2) - Don't use mWasPaused on Android. r=mstange. 2017-04-21 13:27:59 +10:00
Nicholas Nethercote
4da67d7fcf Bug 1358074 (part 5, attempt 2) - Rename mThreadNameFilters as mFilters. r=mstange. 2017-04-21 13:27:55 +10:00
Nicholas Nethercote
60cdc6d052 Bug 1358074 (part 4, attempt 2) - Rename PS::{Mutex,AutoLock,LockRef} as PS{Mutex,AutoLock,LockRef}. r=mstange. 2017-04-21 13:27:53 +10:00
Nicholas Nethercote
ea3673c475 Bug 1358074 (part 3, attempt 2) - Don't measure process creation time on every profiler_start() call. r=mstange. 2017-04-21 13:23:34 +10:00
Nicholas Nethercote
f172d6ec32 Bug 1358074 (part 2, attempt 2) - Unexport and rename ProfilerState. r=mstange. 2017-04-21 13:23:34 +10:00
Nicholas Nethercote
0196120d08 Bug 1358074 (part 1, attempt 2) - Fix some bad indentation in platform.cpp. r=mstange. 2017-04-19 14:47:18 +10:00
Julian Seward
9938eb3085 Bug 1357777 - LUL on x86_64-linux: recover frames by following the frame pointer chain. r=froydnj,jandem.
On x86_64-Linux, LUL currently can only unwind frames for which CFI unwind data
is available.  This causes a noticeable number of junk samples in the profiler,
characterised by failures at transition points between JIT and native frame
sequences.  This patch allows LUL to try recovering the previous frame using
frame pointer chasing in the case where CFI isn't present.  This allows LUL to
unwind through or jump over interleaved JIT frames, because, respectively:

* The baseline JIT produces frame-pointerised code.

* If the profiler is enabled, IonMonkey doesn't produce frame-pointerised code,
  but also doesn't change the frame pointer register value.  It can use the
  frame pointer if profiling is disabled, but that's irrelevant here.

The patch also adds counts of FP-recovered frames to LUL's statistics printing,
to make it possible to assess how often this feature is used.
2017-04-25 08:14:23 +02:00
Mike Cooper
5303c637b5 Bug 1358310 - eslint-plugin-mozilla: Fix infinite loop when finding repo root. r=mossop
MozReview-Commit-ID: KrOH7qtiLwS
2017-04-25 14:12:31 -07:00
Chris Peterson
7fcf616cf5 Bug 1358949 - Lower eslint cyclomatic complexity threshold in some directories. r=standard8
We can lower the eslint cyclomatic complexity threshold in some directories without adding eslint suppression comments in any .js source files. We need to specify the complexity rule in accessible/.eslintrc because it doesn't inherit the mozilla/recommended rules. eslint's default complexity threshold is 20.

Also bump the eslint-plugin-mozilla version because we modified the mozilla/recommended rules.

MozReview-Commit-ID: 57T4gAjPH7z
2017-04-23 19:23:18 -07:00
Chris Peterson
e530c41979 Bug 1358947 - Make eslint "max-nested-callbacks" rule an error. r=standard8
eslint's default max-nested-callbacks threshold is 10, but now we make it an error. We could further lower the max-nested-callbacks threshold globally to 8, like browser/.eslintrc.js, but that would require adding suppression comments in (two) more .js test files. 10 seems good enough for now since it's the eslint default.

We need to specify max-nested-callbacks in accessible/.eslintrc because it doesn't inherit the mozilla/recommended rules.

Also bump the eslint-plugin-mozilla version because we modified the mozilla/recommended rules.

MozReview-Commit-ID: JA41vsi4U7j
2017-04-21 23:00:26 -07:00
Gregory Szorc
fb1459dbbc Bug 1293493 - Remove mach rage since it was unused; r=ted
We've had 4 submissions in 2017. jgriffin and I agreed that it was a
failed experiment and we should either abandon it or figure out how
to increase participation. Since nobody is available to improve it,
I'm inclined to just delete it. If we want to bring it back, it is
always in version control.

MozReview-Commit-ID: AizkZxjQ8IJ
2017-04-24 16:33:51 -07:00
Greg Tatum
6895bbf293 Bug 1357849 - Instrument performance.measure with markers; r=baku,mstange
MozReview-Commit-ID: KQcQgxYyEYi
2017-04-24 10:15:11 -05:00
Mark Banner
ae661db9d9 Bug 1359739 - Fix eslint-plugin-mozilla's globals import function to correctly handle 'importScripts(url)' cases. r=jaws
MozReview-Commit-ID: 30Ki21DYvzm
2017-04-26 10:20:57 +01:00
Mark Banner
d2a6c8541b Bug 1348997 - When ESLint checks for reinstall, check the file diffs rather than a version number. r=mossop
This should make it unnecessary to bump the version number of our self-built modules, by comparing the actual files.

MozReview-Commit-ID: GFbxBs4bc4Z
2017-04-24 10:52:10 +01:00
Nicholas Nethercote
b2c96e3507 Bug 1359007 - Remove js::ProfilingGetPC(). r=shu.
AddPseudoEntry() has a single callsite which always passes nullptr for the
last argument. This means that js::ProfilingGetPC() is never called, and so can
be removed. (Even if it was called, it always returns nullptr because ipToPC()
always returns nullptr!)
2017-04-26 14:32:26 +10:00
Tom Tromey
779bb3d8df Bug 1349655 - remove sig_safe_t in favor of mozilla::Atomic<uint32_t>; r=djvj,njn
Remove the definition of sig_safe_t, which is only used by PseudoStack,
and replace the uses with mozilla::Atomic<uint32_t>.

MozReview-Commit-ID: GcPd9R94Vci
2017-03-22 13:57:31 -06:00
Markus Stange
ede86348f4 Bug 1358360 - Correctly fill in SharedLibrary fields for the main executable. r=jseward
MozReview-Commit-ID: 3ZJ8FB2Zjs8
2017-04-21 14:30:18 -04:00
Mark Banner
2d4e9d72ca Bug 1358484 - Add an autofix option to ESLint's no-useless-parameters. r=florian
MozReview-Commit-ID: B8mQteJ1CzF
2017-04-21 14:34:37 +01:00
Andi-Bogdan Postelnicu
e9ebfd5072 Bug 1359376 - Update Coverity modeling file to support NS_RUNTIMEABORT. r=sylvestre
MozReview-Commit-ID: 4lahuhK5bVx
2017-04-25 15:08:48 +03:00
Mark Banner
1584c1721b Bug 1358540 - Change the *.lint files to be *.lint.py to better support editor integration & flake8 linting. r=smacleod
MozReview-Commit-ID: 4KK2GZK7xul
2017-04-21 17:31:15 +01:00
Carsten "Tomcat" Book
090519bc6f Backed out changeset eec770d062b4 (bug 1358540) for bustage 2017-04-25 10:15:07 +02:00
Mark Banner
5b0ca96cad Bug 1358418 - Be more informative about which file ESLint is failing on when getASTSource() hits a computed member expression. r=Mossop
MozReview-Commit-ID: GA4bEvJXH3O
2017-04-21 10:10:54 +01:00
Carsten "Tomcat" Book
dda079160f Backed out changeset 93bf1142be38 (bug 1358418) for ml failure 2017-04-25 09:31:09 +02:00
Mark Banner
cb28b02c7f Bug 1358418 - Be more informative about which file ESLint is failing on when getASTSource() hits a computed member expression. r=mossop
MozReview-Commit-ID: GA4bEvJXH3O
2017-04-21 10:10:54 +01:00
Mark Banner
45f13bc3e9 Bug 1358540 - Change the *.lint files to be *.lint.py to better support editor integration & flake8 linting. r=smacleod
MozReview-Commit-ID: 4KK2GZK7xul
2017-04-21 17:31:15 +01:00
Nicholas Nethercote
518b61128f Bug 1357298 - Remove the 'layers.frame-counter' option. r=mstange,mattwoodrow.
This option turns on a frame counter that is shown in the top left corner via a
QR code. It was designed to be used in video recordings of B2G phones.

It no longer seems useful, so this patch removes it.
* * *
Bug 1357298 - Remove all traces of frame numbers and power from the profiler output. r=mstange.
2017-04-18 15:40:24 +10:00
Dan Banner
ac2e4edfba Bug 1351099 - Remove unused AddonLogging.jsm file r=rhelmer
MozReview-Commit-ID: B1mxqNZhpB
2017-04-19 16:28:41 +01:00
Frederik Braun
b1ea2e74fd Bug 1358050: Add no-implied-eval rule to eslint config r=standard8
MozReview-Commit-ID: KdmpXq2rg1q
2017-04-20 10:33:22 +02:00
Nicholas Nethercote
a525caf15d Bug 1356694 - Create a ProfileGatherer in nsProfiler() if the profiler is active. r=mstange.
This fixes a JS exception that gets thrown when one tries to capture a profile
in this case.
2017-04-21 09:38:39 +10:00
Wes Kocher
f8d2845e66 Merge inbound to m-c a=merge
MozReview-Commit-ID: DQDuEiYLWCO
2017-04-20 15:30:43 -07:00
Chris Peterson
f339d22bd3 Bug 1356843 - Fix -Wcomma warning in tools/profiler/lul/LulDwarf.cpp. r=jseward
clang's -Wcomma warning warns about suspicious use of the comma operator such as between two statements.

tools/profiler/lul/LulDwarf.cpp:604:15: warning: possible misuse of comma operator here [-Wcomma]

MozReview-Commit-ID: 6ZP79hgtrAD
2017-04-09 21:43:29 -07:00
Nicholas Nethercote
81d74b72c9 Bug 1357936 - Don't leak ProfilerIOInterposeObserver. r=mstange.
The patch adds a missing |delete|. (This leak only occurred when the
"mainthreadio" feature was enabled, which is not the default.)

The patch also makes the unregistering of the interpose observer conditional on
there being one in the first place, avoiding a harmless but useless
unregistering of |nullptr|.
2017-04-20 09:24:17 +10:00
Wes Kocher
e66b36fd81 Merge inbound to m-c a=merge 2017-04-19 17:10:04 -07:00
Carsten "Tomcat" Book
8d7999782b Merge mozilla-central to mozilla-inbound 2017-04-19 10:49:57 +02:00
Julian Seward
7184ef6faa Bug 1356215 - LUL: increase size of unwound stack to 160k. r=froydnj.
For reasons related to the architecture of the Gecko Profiler in previous years,
which are no longer relevant, LUL will only unwind through the first 32KB of
stack.  This is mostly harmless, since most stacks are smaller than 4KB, per
measurements today, but occasionally they go above 32KB, causing unwinding to
stop prematurely.

This patch changes the max size to 160KB, and documents the rationale for
copying the stack and unwinding, rather than unwinding in place.  160KB is big
enough for all stacks observed in several minutes of profiling all threads at
1KHz.
2017-04-18 10:30:14 +02:00
Mark Banner
7b56c77744 Bug 1357702 - Make eslint-plugin-spidermonkey-js handle paths correct on Windows to avoid Unexpected character issues on ESLint. r=mossop
MozReview-Commit-ID: LsQCgBOgceY
2017-04-19 12:17:14 +01:00
Mark Banner
848db1b430 Bug 1357502 - Change eslint-plugin-mozilla tests to use the mocha test harness to improve the output. r=mossop
MozReview-Commit-ID: 1xI0tBpbSgM
2017-04-18 20:06:02 +01:00
Mike Hommey
d51030340d Bug 1357323 - Remove support for gonk in the build system. r=gps
Everything depending on the widget being gonk can go away, as well as
everything depending on MOZ_AUDIO_CHANNEL_MANAGER, which was only
defined on gonk builds under b2g/ (which goes away in bug 1357326).
2017-04-18 16:56:09 +09:00
Mark Banner
9ce33b94fb Bug 1357546 - Fix how relative paths are handled in Windows for the ESLint import-browser-window-globals rule. r=mossop
MozReview-Commit-ID: Q8YcLRSpkQ
2017-04-18 22:11:54 +01:00
Mark Banner
989d72968d Bug 1357393 - Correct getting the rootDir in createExports - used for publishing eslint-plugin-mozilla. r=mossop
Bump the version number to match what is currently published.

MozReview-Commit-ID: 8r8otQQBqBo
2017-04-18 13:56:19 +01:00
Carsten "Tomcat" Book
a76fde59da merge mozilla-inbound to mozilla-central a=merge 2017-04-18 10:21:31 +02:00