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

4644 Коммитов

Автор SHA1 Сообщение Дата
David Major f7b2b2533f Bug 1360575: Use PR_SetCurrentThreadName to set the sampler thread's name on all platforms. r=mstange 2017-05-01 22:56:47 -04:00
David Major 8040b396bd Bug 1351838: Don't sprintf within the profiler since it may take a lock. r=froydnj
--HG--
extra : rebase_source : 8d5f8c4fc5a5f205653db12fb34f9cd51fddfc65
2017-05-01 17:57:12 -04:00
David Major e5d98f2a57 Bug 1360642: Increase SAMPLER_MAX_STRING_LENGTH to capture more URLs. r=mstange
--HG--
extra : rebase_source : b4cbbce0b1240190d93488daa06456536588cf55
2017-05-01 16:26:39 -04:00
Michael Layzell 58464c1919 Bug 1346415 - Use FramePointerStackWalk for less deadlocking when stackwalking on x86, r=njn
MozReview-Commit-ID: CAHarvGSuTY
2017-05-01 13:40:37 -04:00
Nicholas Nethercote 31a9d19faa Bug 1360442 - Fix up macros in GeckoProfiler.h. r=mstange.
- Use PROFILER_ consistently as the prefix for macros in this file. (As opposed
  to PROFILE_ or SAMPLE_ or SAMPLER_ or MOZ_ or PLATFORM_ or no prefix.)

- Split overly long macros across multiple lines.

- Fix some macro indenting.
2017-04-28 15:57:03 +10:00
Nicholas Nethercote d79729cfc6 Bug 1359717 - Remove unnecessary SetIsPaused() calls. r=mstange.
We pause/unpause the profiler before/after some streaming operations. But these
pause/unpause pairs occur with gPSMutex locked, and ActivePS::IsPaused() also
requires that gPSMutex be locked. Therefore these pause/unpause pairs cannot
be observed, and so this patch removes them.
2017-04-27 15:57:35 +10:00
Nicholas Nethercote 93b0b152aa Bug 1123754 (part 2) - Move ProfilerMarker into ProfilerMarker.h. r=mstange.
ProfilerMarker is simple enough that it's best to fully define it in
ProfilerMarker.h, without introducing a ProfilerMarker.cpp.

This requires moving STORE_SEQUENCER() into its own header, StoreSequencer.h.

As a result, the following types are no longer visible outside the profiler:
ProfilerMarker, ProfilerLinkedList, ProfilerMarkerLinkedList,
ProfilerSignalSafeLinkedList. (PseudoStack.h now contains the PseudoStack class
and nothing else.)

The patch also makes the following non-obvious changes.

- It changes ProfilerMarker::{mMarkerName,mPayload} to unique pointers, which
  removes the need for an explicit ~ProfilerMarker().

- It removes ProfilerMarker::GetMarkerName(), because that method is only used
  within ProfilerMarker itself.

--HG--
extra : rebase_source : 22bdfb1c9c30751253ed66352d7edd51d308152d
2017-04-27 07:36:22 +10:00
Nicholas Nethercote 273ec65c56 Bug 1123754 (part 1) - Rename ProfilerMarkers.{h,cpp} as ProfilerMarkerPayload.{h,cpp}. r=mstange.
Because ProfilerMarkerPayload is the main type defined in these files, and
because the next patch is going to introduce ProfilerMarker.{h,cpp}, which
would be confusingly similar to the old names.

--HG--
rename : tools/profiler/core/ProfilerMarkers.cpp => tools/profiler/core/ProfilerMarkerPayload.cpp
rename : tools/profiler/public/ProfilerMarkers.h => tools/profiler/public/ProfilerMarkerPayload.h
extra : rebase_source : df22a2ab3867650348ae78fe959ff0366aff230b
2017-04-27 07:36:19 +10:00
Nicholas Nethercote 4e6950332a Bug 1359000 (part 7) - Move mContext and mJSSampling from RacyThreadInfo to ThreadInfo. r=mstange.
None of the accesses to these fields occur in hot operations, so it's
reasonable to do them with gPSMutex held. As a result, mJSSampling doesn't need
to be Atomic<>, and mContext's lack of Atomic-ness is no longer a cause for
concern.

This required adding an extra field, mJSContext, to TickSample.

--HG--
extra : rebase_source : 1485de5e493cef655233507248006574d0ab6ebd
2017-04-27 07:36:17 +10:00
Nicholas Nethercote 93d021e19b Bug 1359000 (part 6) - Split off RacyThreadInfo from PseudoStack. r=mstange.
PseudoStack is misnamed: it contains the pseudo-stack plus other stuff that is
accessed via TLS.

This patch moves the non-pseudo-stack parts of PseudoStack into a new type
called RacyThreadInfo, which is a subclass of PseudoStack. The patch also
capitalizes the first letter of the names of methods that it moves.

This means that PseudoStack is now accurately named. Also non-pseudo-stack
parts are now no longer visible outside the profiler, which is nice.

--HG--
extra : rebase_source : c110acfb6d2a1527ed33cc073fab3fb188851b22
2017-04-27 07:36:15 +10:00
Nicholas Nethercote 9a52c4f399 Bug 1359000 (part 5) - Introduce TLSInfo. r=mstange.
Currently a reference to each thread's PseudoStack is stored in tlsPseudoStack.
This patch changes the TLS reference to refer to the enclosing ThreadInfo
instead. This allows profiler_clear_js_context() to access the current thread's
ThreadInfo via TLs, rather than searching with FindLiveThreadInfo().

The patch also encapsulates the TLS within a new class called TLSInfo. This
class allows access to the PseudoStack without protection from gPSMutex, but
access to the enclosing ThreadInfo requires a PSLockRef. This maintains the
current access regime.

--HG--
extra : rebase_source : de9967f6c055061bb65930ffd02e369703b1362e
2017-04-27 07:36:13 +10:00
Nicholas Nethercote 9471adc672 Bug 1359000 (part 4) - De-inline profiler_call_{enter,exit}. r=mstange.
This possibly incurs an extra function call (depends on exactly how much inling
the compiler does). But it helps enormously with subsequent refactorings,
because PseudoStack (and related types) don't need to be visible in
GeckoProfiler.h, which is exported outside the profiler.

--HG--
extra : rebase_source : f2dc5952d7444dfe12e627e86e6d37632b283107
2017-04-27 07:36:11 +10:00
Nicholas Nethercote 0510e9b058 Bug 1359000 (part 3) - Rename some "stack" variables as "pseudoStack". r=mstange.
"pseudoStack" more closely matches the type name, and is more specific.

--HG--
extra : rebase_source : 4605c66925f29fae0a4c800a4459a7904a6187ab
2017-04-27 07:36:09 +10:00
Nicholas Nethercote 7fc314e4d2 Bug 1359000 (part 2) - Tweak manual polling of profiler threads. r=mstange.
This patch moves the manual polling up into the preceding loops, which is a
better place for it.

--HG--
extra : rebase_source : c95932d8f66635b9ca435f30bae78585dd7e04ca
2017-04-24 09:49:28 +10:00
Nicholas Nethercote e2606aa433 Bug 1359000 (part 1) - Remove unused method PseudoStack::push. r=mstange.
--HG--
extra : rebase_source : efff90c7b1de25035a1e9cccf5a8c6027c7a54d9
2017-04-24 09:41:31 +10:00
Wes Kocher 2aa72d4cdc Merge inbound to central, a=merge
MozReview-Commit-ID: HZUHBRK4UmL
2017-04-27 13:00:07 -07:00
Nicholas Nethercote 22e24ef94a 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.

--HG--
extra : rebase_source : dba177acb41e4dc2103ace2212ab5ae1f7b418ce
2017-04-21 13:28:23 +10:00
Carsten "Tomcat" Book e1e203f1f5 Merge mozilla-central to autoland 2017-04-27 16:36:41 +02:00
Wes Kocher 226702fd85 Merge m-c to autoland a=merge
MozReview-Commit-ID: LOGgOErcV9L
2017-04-26 17:43:38 -07:00
Carsten "Tomcat" Book 68e9a2dfd5 Merge mozilla-central to mozilla-inbound 2017-04-26 09:04:59 +02:00
Carsten "Tomcat" Book 8f4e4ca99b merge mozilla-inbound to mozilla-central a=merge 2017-04-26 08:41:31 +02:00
Carsten "Tomcat" Book d9cce3c040 merge autoland to mozilla-central a=merge 2017-04-26 08:40:02 +02:00
Nicholas Nethercote bc1d6a21a2 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 5e8bdb175d Merge inbound to m-c a=merge
MozReview-Commit-ID: A85cs7Yriqj
2017-04-25 13:53:00 -07:00
Nicholas Nethercote 213518b7e8 Bug 1358074 (part 6, attempt 2) - Don't use mWasPaused on Android. r=mstange.
--HG--
extra : rebase_source : 99da4bfb335d27b5ea35ce10a149c82abd13ca77
2017-04-21 13:27:59 +10:00
Nicholas Nethercote 42226dcae0 Bug 1358074 (part 5, attempt 2) - Rename mThreadNameFilters as mFilters. r=mstange.
--HG--
extra : rebase_source : 4d26f553136268ac0b20448708254bdbf972f411
2017-04-21 13:27:55 +10:00
Nicholas Nethercote f51b56128c Bug 1358074 (part 4, attempt 2) - Rename PS::{Mutex,AutoLock,LockRef} as PS{Mutex,AutoLock,LockRef}. r=mstange.
--HG--
extra : rebase_source : e1ea40df9197658b9c3b950e5f259206c6a3785b
2017-04-21 13:27:53 +10:00
Nicholas Nethercote c28a0c41b5 Bug 1358074 (part 3, attempt 2) - Don't measure process creation time on every profiler_start() call. r=mstange.
--HG--
extra : rebase_source : 588969b00e56cd7b65904a8d0baf712ea1b57ca5
2017-04-21 13:23:34 +10:00
Nicholas Nethercote 2c0ca9635a Bug 1358074 (part 2, attempt 2) - Unexport and rename ProfilerState. r=mstange.
--HG--
extra : rebase_source : 5b3e049f24d7d4f2e45989e9ee7f05c0258b1280
2017-04-21 13:23:34 +10:00
Nicholas Nethercote 33655a895b Bug 1358074 (part 1, attempt 2) - Fix some bad indentation in platform.cpp. r=mstange.
--HG--
extra : rebase_source : f572f23eeb8a290aae68b5e77dae52d885729e11
2017-04-19 14:47:18 +10:00
Julian Seward 62e5c659b4 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.

--HG--
extra : rebase_source : eadc54393788693b0e3f8d5129d48aaaad143a0b
2017-04-25 08:14:23 +02:00
Mike Cooper 2440f29f89 Bug 1358310 - eslint-plugin-mozilla: Fix infinite loop when finding repo root. r=mossop
MozReview-Commit-ID: KrOH7qtiLwS

--HG--
extra : rebase_source : 7d3ec6e407c0096e45afc23e6e117533cb4b6522
2017-04-25 14:12:31 -07:00
Chris Peterson 7b85322694 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

--HG--
extra : rebase_source : 4565abfa722b9459cfb4e006e843da13ed7cffd4
extra : intermediate-source : 658588564c08c9fd5e60633d1457f24087de8570
extra : source : 7e0526e3b943419a80c0cd2fa462cabbf8925eb1
2017-04-23 19:23:18 -07:00
Chris Peterson 893e00d283 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

--HG--
extra : rebase_source : 2dd211ebd3b8cf83f67f26cac5244bec8978f0e2
extra : intermediate-source : 6f5e75502be394038543029e3cfd474c5b1c2e98
extra : source : a13437d73c97fabd073ab8a6f93e85a5084b7405
2017-04-21 23:00:26 -07:00
Gregory Szorc 332db65e17 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

--HG--
extra : rebase_source : 0e29058cfc909fb51fc56fa9b46c0e0a6eef0bf9
2017-04-24 16:33:51 -07:00
Greg Tatum 778111225d Bug 1357849 - Instrument performance.measure with markers; r=baku,mstange
MozReview-Commit-ID: KQcQgxYyEYi

--HG--
extra : rebase_source : bc26048ca4317d11ab22a5a54064fa2c031a9fdc
2017-04-24 10:15:11 -05:00
Mark Banner c49949be34 Bug 1359739 - Fix eslint-plugin-mozilla's globals import function to correctly handle 'importScripts(url)' cases. r=jaws
MozReview-Commit-ID: 30Ki21DYvzm

--HG--
extra : rebase_source : 076270b0475fb1e9694d5ab13918d5b877bee39b
2017-04-26 10:20:57 +01:00
Mark Banner c4c1dd7179 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

--HG--
extra : rebase_source : d96d465615254655ce0fa7af29503a534e795428
2017-04-24 10:52:10 +01:00
Nicholas Nethercote 5106aa14b9 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!)

--HG--
extra : rebase_source : 1260d726c79bf5116143da9904d39b38e3c93837
2017-04-26 14:32:26 +10:00
Tom Tromey 66313f92eb 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

--HG--
extra : rebase_source : dcc05a219d59ffdc0486ef2e7118d888c6a93fda
2017-03-22 13:57:31 -06:00
Markus Stange aeb36a2713 Bug 1358360 - Correctly fill in SharedLibrary fields for the main executable. r=jseward
MozReview-Commit-ID: 3ZJ8FB2Zjs8

--HG--
extra : rebase_source : 1119844c78c0d60d97edccf2511df9660a7a6427
2017-04-21 14:30:18 -04:00
Mark Banner 580ed9c407 Bug 1358484 - Add an autofix option to ESLint's no-useless-parameters. r=florian
MozReview-Commit-ID: B8mQteJ1CzF

--HG--
extra : rebase_source : 7fa31b6c0a73529693f0a936d66f55651f0fd3b7
2017-04-21 14:34:37 +01:00
Andi-Bogdan Postelnicu a33974e2da Bug 1359376 - Update Coverity modeling file to support NS_RUNTIMEABORT. r=sylvestre
MozReview-Commit-ID: 4lahuhK5bVx

--HG--
extra : rebase_source : ecd0c90112a94086eca5d50caaf7079d71b9064e
2017-04-25 15:08:48 +03:00
Mark Banner 021f1ff90a Bug 1358540 - Change the *.lint files to be *.lint.py to better support editor integration & flake8 linting. r=smacleod
MozReview-Commit-ID: 4KK2GZK7xul

--HG--
rename : python/mozlint/test/linters/badreturncode.lint => python/mozlint/test/linters/badreturncode.lint.py
rename : python/mozlint/test/linters/explicit_path.lint => python/mozlint/test/linters/explicit_path.lint.py
rename : python/mozlint/test/linters/external.lint => python/mozlint/test/linters/external.lint.py
rename : python/mozlint/test/linters/invalid_exclude.lint => python/mozlint/test/linters/invalid_exclude.lint.py
rename : python/mozlint/test/linters/invalid_include.lint => python/mozlint/test/linters/invalid_include.lint.py
rename : python/mozlint/test/linters/invalid_type.lint => python/mozlint/test/linters/invalid_type.lint.py
rename : python/mozlint/test/linters/missing_attrs.lint => python/mozlint/test/linters/missing_attrs.lint.py
rename : python/mozlint/test/linters/missing_definition.lint => python/mozlint/test/linters/missing_definition.lint.py
rename : python/mozlint/test/linters/raises.lint => python/mozlint/test/linters/raises.lint.py
rename : python/mozlint/test/linters/regex.lint => python/mozlint/test/linters/regex.lint.py
rename : python/mozlint/test/linters/string.lint => python/mozlint/test/linters/string.lint.py
rename : python/mozlint/test/linters/structured.lint => python/mozlint/test/linters/structured.lint.py
rename : tools/lint/eslint.lint => tools/lint/eslint.lint.py
rename : tools/lint/flake8.lint => tools/lint/flake8.lint.py
rename : tools/lint/wpt.lint => tools/lint/wpt.lint.py
rename : tools/lint/wpt_manifest.lint => tools/lint/wpt_manifest.lint.py
extra : rebase_source : 97de88e0328e91347192672b848b286df1904ade
2017-04-21 17:31:15 +01:00
Carsten "Tomcat" Book 1dd975c180 Backed out changeset eec770d062b4 (bug 1358540) for bustage
--HG--
rename : tools/lint/eslint.lint.py => tools/lint/eslint.lint
rename : tools/lint/flake8.lint.py => tools/lint/flake8.lint
rename : tools/lint/wpt.lint.py => tools/lint/wpt.lint
rename : tools/lint/wpt_manifest.lint.py => tools/lint/wpt_manifest.lint
2017-04-25 10:15:07 +02:00
Mark Banner 7cad8fd464 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

--HG--
extra : amend_source : 1fc5729343f29e429a20e787eab13125ca3c91a2
2017-04-21 10:10:54 +01:00
Carsten "Tomcat" Book be39101bce Backed out changeset 93bf1142be38 (bug 1358418) for ml failure 2017-04-25 09:31:09 +02:00
Mark Banner 05789c2819 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

--HG--
extra : rebase_source : 49fefac7e7ae224872cf121681d9cb2bf6f15eb8
2017-04-21 10:10:54 +01:00
Mark Banner 8e42062ea3 Bug 1358540 - Change the *.lint files to be *.lint.py to better support editor integration & flake8 linting. r=smacleod
MozReview-Commit-ID: 4KK2GZK7xul

--HG--
rename : tools/lint/eslint.lint => tools/lint/eslint.lint.py
rename : tools/lint/flake8.lint => tools/lint/flake8.lint.py
rename : tools/lint/wpt.lint => tools/lint/wpt.lint.py
rename : tools/lint/wpt_manifest.lint => tools/lint/wpt_manifest.lint.py
extra : rebase_source : 66e4b4f95109c2645d0fb7be273de343408b9406
2017-04-21 17:31:15 +01:00
Nicholas Nethercote 625d4520a7 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.

--HG--
extra : rebase_source : 0ce87963ce375df64bb8d80ef2b5d40ea507bc7c
2017-04-18 15:40:24 +10:00