Commit Graph

4917 Commits

Author SHA1 Message Date
Mark Banner
7768aaa6a6 Bug 1380956 - List only the directly required dependencies for ESLint in the top-level package.json. r=ahal
MozReview-Commit-ID: 9a4FwScmtVL

--HG--
extra : rebase_source : 651fc65f91c5bb02690a145c502ffbf1ec3212cc
2017-07-14 12:21:54 +01:00
Mark Banner
2612544280 Bug 1380956 - Use exact matches of versions in eslint-plugin-mozilla for better tracking. r=ahal
MozReview-Commit-ID: 2UYwQd2BhnC

--HG--
extra : rebase_source : b3f187f2a79ade2e181bec15260f6c906d3e8210
2017-07-14 12:01:17 +01:00
Mark Banner
a7f37edc6c Bug 1380956 - Don't manually install our local eslint plugins as npm will do that for us. r=ahal
This works since we added the modules as local references in package.json.

MozReview-Commit-ID: 5e6EkcThJTX

--HG--
extra : rebase_source : 8d432c5fa9620981c20af7a3608f282508c51930
2017-07-14 11:55:37 +01:00
Mark Banner
9245f45a9a Bug 1380956 - Add a minimum version requirement for npm in ESLint setup and improve the version handling. r=ahal
MozReview-Commit-ID: 9ZCKfsgQsO7

--HG--
extra : rebase_source : 98d63c694bce16c9f9dd4f8e286ffe20d3d61538
2017-07-14 11:39:57 +01:00
Mark Banner
4289d8c198 Bug 1380956 - Build the node_modules directory for ESLint on the docker image for the worker, rather than downloading it each time. r=ahal
MozReview-Commit-ID: B8QowXzWRlU

--HG--
rename : tools/lint/eslint/update => tools/lint/eslint/update.sh
extra : rebase_source : f2039d741295405100df389fa3b6be73647514f5
2017-07-14 11:19:07 +01:00
Steve Fink
683b884146 Bug 1380770 - Add more info to GCMinor marker JSON, r=jonco
--HG--
extra : rebase_source : 04d4bfc0188106f4c68b662ff5aa4e8a04dc37ab
extra : amend_source : 9692172a301e41c8bb029130c6d3a22a1e665feb
2017-07-13 17:36:46 -07:00
Andrew Halberstadt
f771b816de Bug 1380003 - Create avoid-Date-timing eslint rule, r=standard8
MozReview-Commit-ID: 6b6GtBUpZUZ

--HG--
extra : rebase_source : df9766d3b202c68bc97f2d4e79fd3a1a84c689cb
2017-07-11 12:34:20 -04:00
Nicholas Nethercote
f5b5c1e817 Bug 1379933 (part 5) - Tweak ProfileBuffer arguments. r=mstange.
This patch changes ProfileBuffer arguments from pointers to references. For
functions that modify the ProfileBuffer, it also moves the argument to the end.

--HG--
extra : rebase_source : 394dd3effc852447c703c0f5802c092ae96e2eaa
2017-07-13 11:05:34 +10:00
Nicholas Nethercote
901524bc02 Bug 1379933 (part 4) - Start all ProfilerBuffer methods with an upper case letter. r=mstange.
--HG--
extra : rebase_source : 3fb137a4981cc3228384d3e477f71f637a1c4722
2017-07-13 11:05:31 +10:00
Nicholas Nethercote
2238ba75d1 Bug 1379933 (part 3) - Start all ProfilerBufferEntry methods with an upper case letter. r=mstange.
Also, hasKind() can be removed.

--HG--
extra : rebase_source : fa1276603cd6602ef649c33ab40f8c4b4c9d427f
2017-07-13 11:05:29 +10:00
Nicholas Nethercote
ae465a9150 Bug 1379933 (part 2) - Improve ProfileBuffer's handling of labels and dynamic strings. r=mstange.
When a sample with a label and a dynamic string is written to the
ProfileBuffer, the profiler currently joins them together (up to a max length
of 512, omitting any that exceed this) and then writes a CodeLocation entry
with an empty string followed by a sequence of EmbeddedString entries. When
parsing those entries, we allow a length up to 8192, but that limit is never
reached due to the prior limit of 512.

This patch makes the following changes.

- Removes the joining at write time. Labels and dynamic strings are now written
  separately into the ProfileBuffer. The 512 limit still applies, but just for
  dynamic strings; dynamic strings longer than that are replaced with "(too
  long)". (Labels also always take up one entry, because they only require a
  single pointer, because they are always static strings.) The joining is
  now done when the ProfileBuffer is parsed, and the max length for the joined
  string is still 512; any strings exceeding 512 at that point are truncated,
  rather than omitted. (This also happens to be outside the profier's critical
  section.)

- Renames CodeLocation as Label and EmbeddedString as DynamicStringFragment.
  This makes the ProfileBuffer entry names better match the names used in
  GeckoProfiler.h.

- Moves AddDynamicCodeLocation(), now called addDynamicStringEntry(), into
  ProfileBuffer.

- Adds some testing of long and overly-long dynamic strings to the GTest.

--HG--
extra : rebase_source : 38bdf6e84fa19576c9e0291249e84b19dbb421f7
2017-07-13 11:05:27 +10:00
Nicholas Nethercote
95ff432c26 Bug 1379933 (part 1) - Remove Sample entries from the ProfileBuffer. r=mstange.
They serve no useful purpose.

--HG--
extra : rebase_source : d4d9b352f46285da4a36383f46af2d436c577232
2017-07-11 20:12:24 +10:00
Wes Kocher
33c2277e1f Merge m-c to inbound, a=merge
MozReview-Commit-ID: 7rfXDtMWy2C
2017-07-12 18:26:46 -07:00
Wes Kocher
b4fca1d196 Backed out 4 changesets (bug 1365309) for frequent xpcshell timeouts after 5400 seconds a=backout CLOSED TREE
Backed out changeset 9fc4c6aabd8e (bug 1365309)
Backed out changeset 56850220bd77 (bug 1365309)
Backed out changeset 48f5e0597242 (bug 1365309)
Backed out changeset 39ed96d7b263 (bug 1365309)

MozReview-Commit-ID: 3V0eTL8qeYb
2017-07-12 16:35:14 -07:00
Michael Layzell
c4e8a040c2 Bug 1374888 - Maintain a live shared libraries list in gecko on macOS, r=mstange
MozReview-Commit-ID: 5QvrWujquIq
2017-07-12 13:53:56 -04:00
Michael Layzell
b34e7c42ec 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-12 13:13:07 -04:00
Mark Banner
35f3666937 Bug 1380009 - Enable the ESLint no-return-await call to avoid unnecessary intermediate promise creation. r=mossop
MozReview-Commit-ID: EnhSBHMjurr

--HG--
extra : rebase_source : 74ba4c10e369067629af95bf705a9acd0df1089b
2017-07-11 22:49:55 +01:00
Mark Banner
397425a083 Bug 1379119 - Expand test documentation for eslint-plugin-mozilla. r=ahal
MozReview-Commit-ID: KeFpp671uar

--HG--
extra : rebase_source : f36e05a66f19d5ba65feda304225be65f1e80fb0
2017-07-10 18:32:37 +01:00
Mark Banner
29eaca2240 Bug 1379119 - Add a builder to run the unit tests for eslint-plugin-mozilla. r=ahal
MozReview-Commit-ID: 5QsxUsvJz8O

--HG--
extra : rebase_source : fbfcb5f83e519903c58e587ed1b82cbb3cb1878f
2017-07-10 15:27:00 +01:00
Mark Banner
9da6785fdc Bug 1379119 - Add a mozilla specific reporter for mocha when used with eslint-plugin-mozilla to be compatible with treeherder. r=ahal
MozReview-Commit-ID: 3QVaSXAfa1F

--HG--
extra : rebase_source : 2469cb66663c0c0279b10d980db9054aa5c68f3a
2017-07-10 17:08:53 +01:00
Andrew Halberstadt
892b80966e Bug 1380135 - Use --quiet to ignore eslint warnings from the vcs hook; add +x to hooks.py, r=standard8
The eslint task ignores warnings, therefore the vcs hook should as well. The --quiet argument will
be ignored by other linters.

This also makes tools/lint/hooks.py executable which was preventing it from being used on git.

MozReview-Commit-ID: DXbx01shJmX

--HG--
extra : rebase_source : 9c80a069f486c0b6b7b9c970b84d44b964c59a0f
2017-07-11 17:02:46 -04:00
Sebastian Hengst
702df96bfc Backed out changeset b297e31320fd (bug 1374888) for mass-asserting, e.g. in dom/base/test/test_setInterval_from_start.html. r=backout on a CLOSED TREE
--HG--
extra : amend_source : 55b47f131608cac63c8bb0530a20b8b21f549471
2017-07-11 21:10:43 +02:00
Michael Layzell
5347ef82fe Bug 1374888 - Maintain a live shared libraries list in gecko on macOS, r=mstange
MozReview-Commit-ID: 5QvrWujquIq
2017-07-11 13:49:23 -04:00
Wes Kocher
868f84f2d8 Merge m-c to inbound, a=merge 2017-07-10 18:48:52 -07:00
Sylvestre Ledru
3aab9a7979 Bug 1376803 - add support of ./mach clang-format -p <file/dir> r=gps
MozReview-Commit-ID: nmAqNsSWho

--HG--
extra : rebase_source : 880980ae1a458c06fe66d7ce60d0a66fee7cd883
2017-06-29 09:35:23 -07:00
Sylvestre Ledru
dbf920a78e Bug 1376803 - Move the clang-format diff into a specific function r=gps
MozReview-Commit-ID: C7cy5U0HJ8

--HG--
extra : rebase_source : 7113cfa45a2c50a756cacceba6d73e73c86942c8
2017-06-27 18:34:39 -07:00
Dan Banner
d8518d604e Bug 1351089 - Remove unused PresentationDeviceInfoManager.jsm r=schien,smaug
MozReview-Commit-ID: FoMZNIFtgFM

--HG--
extra : rebase_source : 0fef4325bdea8c346f526a4fb6459a6dfe31fc5b
2017-07-03 19:51:01 +01:00
Nicholas Nethercote
e893cc5e8d Bug 1379565 - Overhaul ProfileBuffer::StreamSamplesToJSON. r=mstange.
The profiler writes ProfileBuffer entries in a particular order, and then later
has to parse them, mostly in StreamSamplesToJSON(). That function's parsing
code is poorly structured and rather gross, at least partly because no explicit
grammar is identified.

This patch identifies the grammar in a comment, and in the same comment also
includes some examples of the more complicated subsequences. Once written down,
the grammar is obviously suboptimal -- the |Sample| entries serve no useful
purpose, for example -- but I will leave grammar improvements as follow-ups.

The patch also rewrites the parser in a more typical fashion that obviously
matches the grammar. The new parser is slightly more verbose but far easier to
understand.

--HG--
extra : rebase_source : 762c21a68cdc18ff25b5feda3c5dfcf33afa53be
2017-07-05 21:29:29 +10:00
Mark Banner
48fff1cefe Bug 1379092 - Update eslint-plugin-react to 7.1.0 for ESLint 4 compatibility. r=mossop
MozReview-Commit-ID: HZbAFZnufUr

--HG--
extra : rebase_source : b7247fa34c074c02b8c881d23e69a86cb9e53223
2017-06-21 15:06:04 +01:00
Rajesh Kathiriya
881bce09ea Bug 1374670 - Enabled the ESLint no-tabs rule across mozilla-central r=standard8
MozReview-Commit-ID: RT5QTipaOW

--HG--
extra : rebase_source : 84bccaeba083bc430316d3c80d5c8f56494f1950
2017-07-04 21:30:18 +05:30
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