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

2127 Коммитов

Автор SHA1 Сообщение Дата
Bas Schouten 7eea7384d6 Bug 1672597 - Part 1: Make EventQueuePriority the primary method of accessing task. r=smaug
This provides a cleaner API than using static_casts in code that begins directly using tasks.

Differential Revision: https://phabricator.services.mozilla.com/D94409
2020-10-27 15:29:16 +00:00
Bas Schouten d28711aa34 Bug 1637592 - Part 2: Register name of new threads in appropriate places for profiler and debugger. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D94655
2020-10-27 15:29:13 +00:00
Bas Schouten c6472cd2fb Bug 1637592 - Part 1: Integrate off main thread task execution into TaskController. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D75105
2020-10-27 15:29:11 +00:00
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Denis Palmeiro 42ea68d66a Bug 1673026 - Change type of sCurrentTaskSeqNo to Atomic<uint64_t> r=bas
Differential Revision: https://phabricator.services.mozilla.com/D94608
2020-10-23 19:28:22 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Florian Quèze be3ab29de7 Bug 1672256 - Record thread creation markers for threads created off main thread, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D94158
2020-10-21 18:23:16 +00:00
Jean-Yves Avenard 43549134bb Bug 1595994 - P14. Don't dealock if we failed to dispatch a task and return error code. r=mattwoodrow
Depends on D91690

Differential Revision: https://phabricator.services.mozilla.com/D91691
2020-10-20 23:28:10 +00:00
Bas Schouten ed50612f0a Bug 1672055: Fix mismatch in nsIRunnablePriority and EventQueuePriority. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D94053
2020-10-20 03:57:24 +00:00
Narcis Beleuzu d54df1cd36 Backed out 12 changesets (bug 1626278) for mochitest leakchecks . CLOSED TREE
Backed out changeset eeed6ebfc444 (bug 1626278)
Backed out changeset cc2023032191 (bug 1626278)
Backed out changeset 15f89d2c5981 (bug 1626278)
Backed out changeset 1227d9db743d (bug 1626278)
Backed out changeset d91d9eb46983 (bug 1626278)
Backed out changeset 5861d6340ee8 (bug 1626278)
Backed out changeset 1cf19408d522 (bug 1626278)
Backed out changeset 90cf750aba51 (bug 1626278)
Backed out changeset 991bc13ae061 (bug 1626278)
Backed out changeset 8432bc08676e (bug 1626278)
Backed out changeset 5c0c76832287 (bug 1626278)
Backed out changeset 2f57fa13df7e (bug 1626278)
2020-10-19 22:58:59 +03:00
Byron Campen [:bwc] 0274cc3c29 Bug 1626278: Implement MozPromise::AllSettled, based on JS Promise API. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D91467
2020-10-15 20:24:43 +00:00
Bogdan Tara 09263ac198 Backed out 11 changesets (bug 1626278) for leaks and WebrtcGlobalInformation related failures CLOSED TREE
Backed out changeset 59228ee9d9e0 (bug 1626278)
Backed out changeset 59da0d11510e (bug 1626278)
Backed out changeset cd2e50c8af34 (bug 1626278)
Backed out changeset afdb75a17ac9 (bug 1626278)
Backed out changeset 5f453c8df70b (bug 1626278)
Backed out changeset 9b612ea670d4 (bug 1626278)
Backed out changeset 387a53fd83f3 (bug 1626278)
Backed out changeset 5870625073f6 (bug 1626278)
Backed out changeset 25c03ac56306 (bug 1626278)
Backed out changeset 3239d49be3ee (bug 1626278)
Backed out changeset 82ed327e71ed (bug 1626278)
2020-10-14 02:34:48 +03:00
Byron Campen [:bwc] 8fa32bef7b Bug 1626278: Implement MozPromise::AllSettled, based on JS Promise API. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D91467
2020-10-12 19:53:07 +00:00
Florian Quèze ba79cac2a8 Bug 1670786 - Add profiler markers with stacks of new thread creations, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D93264
2020-10-13 11:04:57 +00:00
Bas Schouten 68865466cc Bug 1669256 - Part 5: Remove dead code from ProcessNextEvent and its supporting functions. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D92713
2020-10-09 17:38:15 +00:00
Bas Schouten ba72f1b5e7 Bug 1669256 - Part 4: Remove broken code to control input event prioritization and fix it. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D92712
2020-10-09 16:57:47 +00:00
Bas Schouten fa8811a91b Bug 1669256 - Part 3: Remove priority related code from ThreadEventQueue. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D92711
2020-10-09 16:57:40 +00:00
Bas Schouten c8d25dc789 Bug 1669256 - Part 2: Remove code for idle handling from ThreadEventQueue. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D92710
2020-10-09 16:57:38 +00:00
Bas Schouten 25a1b0f61f Bug 1669256 - Part 1: Remove AbstractEventQueue and de-templatize ThreadEventQueue. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D92709
2020-10-09 17:56:34 +00:00
Sylvestre Ledru cad53f4804 Bug 1588458 - Replace dxr links by searchfox in the code/test r=kats,sparky
Differential Revision: https://phabricator.services.mozilla.com/D92792
2020-10-08 14:02:40 +00:00
Bas Schouten 5086416d6b Bug 1669214 - Part 6: Remove code for PrioritizedEventQueue. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D92455
2020-10-06 13:21:58 +00:00
Bas Schouten 24a0a286fc Bug 1669214 - Part 5: Construct regular EventQueue using TC forwarding for the main thread. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D92454
2020-10-06 13:21:35 +00:00
Bas Schouten f6e295763f Bug 1669214 - Part 4: Add code to forward runnables from EventQueue::PutEvent to the TaskController. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D92453
2020-10-06 19:06:57 +00:00
Bas Schouten 00d7c9b62a Bug 1669214 - Part 3: Move IdleTaskManager to be created by nsThreadManager. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D92452
2020-10-06 15:04:13 +00:00
Bas Schouten 29168c7162 Bug 1669214 - Part 2: Remove MainThreadQueue.h that serves little purpose now. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D92451
2020-10-06 13:20:11 +00:00
Bas Schouten 45e747487b Bug 1669214 - Part 1: Remove environment variable to disable TaskController. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D92450
2020-10-06 13:19:51 +00:00
Simon Giesecke bee7693b3b Bug 1668314 - FuncCancelableRunnable::Run should be a no-op after Cancel. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D91948
2020-10-01 11:59:09 +00:00
Kris Maglione afcc0476d6 Bug 1663747: Part 1 - Fix sCurrentShutdownPhase and add PastShutdownPhase() API. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D89809
2020-09-22 17:13:27 +00:00
Sylvestre Ledru ec8859e69e Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D90793
2020-09-20 10:14:09 +00:00
Emilio Cobos Álvarez 47f53144a5 Bug 1665373 - Bail earlier if getting a null ref to NS_ReleaseOnMainThread. r=sg
This is just a minor optimization, not intended to change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D90398
2020-09-16 22:58:46 +00:00
Doug Thayer 025f5fb9f0 Bug 1656261 - Back out all recent StartupCache work r=RyanVM
This backs out all work from bug 1627075 as well as all of its
descendents. There were a few conflicts when backing this out but
overall it was pretty clean, so I would say it's a fairly mild
level of risk. Historically Nathan Froyd has reviewed these patches,
but he is no longer at Mozilla, and no one else is particularly
familiar with the code, so I am passing this off to RyanVM who has
at least been familiar with the history of the bug.

Differential Revision: https://phabricator.services.mozilla.com/D90096
2020-09-14 17:00:53 +00:00
Bas Schouten 343a7ab31c Bug 1661881 - Part 3: Make RefreshDriver's tick call SetInputHandlingStartTime directly. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D89536
2020-09-14 12:13:13 +00:00
Bas Schouten 1dcbec6a4f Bug 1661881 - Part 2: Make InputTaskManager a global singleton. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D89535
2020-09-14 12:12:06 +00:00
Bas Schouten 2594ec625f Bug 1661881 - Part 1: Factor InputTaskManager into its own file. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D89534
2020-09-14 12:10:39 +00:00
Chris Peterson 5a66ff2063 Bug 1662957 - Add [[nodiscard]] to xpcom's Mutex and Monitor TryLock() functions. r=xpcom-reviewers,sg
Depends on D89092

Differential Revision: https://phabricator.services.mozilla.com/D89093
2020-09-03 05:34:23 +00:00
Chris Peterson ac7932ab8d Bug 1662629 - Replace MOZ_MUST_USE with [[nodiscard] in xpcom. r=xpcom-reviewers,sg
The MOZ_MUST_USE macro is defined as clang's and gcc's nonstandard __attribute__((warn_unused_result)). Now that we compile as C++17 by default (bug 1560664), we can replace MOZ_MUST_USE with C++17's standard [[nodiscard]] attribute.

The [[nodiscard]] attribute must precede a function declaration's declaration specifiers (like static, extern, inline, or virtual). The __attribute__((warn_unused_result)) attribute does not have this order restriction.

Differential Revision: https://phabricator.services.mozilla.com/D89092
2020-09-02 09:18:12 +00:00
Nick Alexander 83b88fa9d4 Bug 1612032 - Remove vestigial NS_FUNCTION_TIMER. r=froydnj
This should have been removed years ago with Bug 792502.

Differential Revision: https://phabricator.services.mozilla.com/D88054
2020-08-24 18:47:18 +00:00
Honza Bambas 2bc91fef35 Bug 1657974 - MOZ_LOG schedule and run of `FrameRequestCallback`, r=froydnj
Depends on D86740

Differential Revision: https://phabricator.services.mozilla.com/D86741
2020-08-13 14:41:16 +00:00
Honza Bambas 13026539fa Bug 1657960 - MOZ_LOG schedule and run of `mStyleFlushObservers` and `mLayoutFlushObservers`, r=froydnj
Depends on D86737

Differential Revision: https://phabricator.services.mozilla.com/D86738
2020-08-13 14:41:15 +00:00
Doug Thayer 5f41a2f565 Bug 1658732 - Replace mStartupFinished with TryLock in StartupCache r=froydnj
To be honest, it's still a mystery why we observed a regression in
sessionrestore_no_auto_restore in bug 1658732. The regression won't reproduce
on profiled runs, and the bad recordings happen before the supposedly offending
code ever actually runs. It feels most likely that it is a more or less random
confluence of factors causing a regression; however, 33% is too large of a
number to ignore.

The changes in this patch do not seem to yield the same regression, and they
are arguably more correct anyway. Instead of simply turning off the cache after
startup is finished, we simply avoid blocking waiting for the write from inside
GetBuffer. This way, if the write is not getting in the way of GetBuffer, we
can still benefit from a cached version of whatever it is we're looking for.

Differential Revision: https://phabricator.services.mozilla.com/D87221
2020-08-20 18:37:21 +00:00
Erik Nordin 943f31b50b Bug 1659875 - Fix Incorrect Assertion In Mutex.h r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D87527
2020-08-19 01:41:24 +00:00
Gerald Squelart 6635ca3144 Bug 1659034 - Only call PROFILER_UNREGISTER_THREAD in nsThread::ThreadFunc if PROFILER_REGISTER_THREAD was called before - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D87050
2020-08-14 10:53:39 +00:00
Nathan Froyd e3ebda1914 Bug 1223932 - delete guard object uses from the tree; r=jwalden
CLOSED TREE

We don't need these macros anymore, for two reasons:

1. We have static analysis to provide the same sort of checks via `MOZ_RAII`
   and friends.
2. clang now warns for the "temporary that should have been a declaration" case.

The extra requirements on class construction also show up during debug tests
as performance problems.

This change was automated by using the following sed script:

```
# Remove declarations in classes.
/MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER/d
/MOZ_GUARD_OBJECT_NOTIFIER_INIT/d

# Remove individual macros, carefully.
{
  # We don't have to worry about substrings here because the closing
  # parenthesis "anchors" the match.
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL)/)/g;

  # Remove the longer identifier first.
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_TO_PARENT//g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM//g;
}

# Remove the actual include.
\@# *include "mozilla/GuardObjects.h"@d
```

and running:

```
find . -name \*.cpp -o -name \*.h | grep -v 'GuardObjects.h' |xargs sed -i -f script 2>/dev/null
mach clang-format
```

Differential Revision: https://phabricator.services.mozilla.com/D85168
2020-07-30 14:22:38 +00:00
Mihai Alexandru Michis a911a108d0 Backed out changeset ac9c811bc427 (bug 1223932) for causing spidermonkey rust failures.
CLOSED TREE
2020-07-30 18:23:21 +03:00
Nathan Froyd bec9f9b93a Bug 1223932 - delete guard object uses from the tree; r=jwalden
We don't need these macros anymore, for two reasons:

1. We have static analysis to provide the same sort of checks via `MOZ_RAII`
   and friends.
2. clang now warns for the "temporary that should have been a declaration" case.

The extra requirements on class construction also show up during debug tests
as performance problems.

This change was automated by using the following sed script:

```
# Remove declarations in classes.
/MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER/d
/MOZ_GUARD_OBJECT_NOTIFIER_INIT/d

# Remove individual macros, carefully.
{
  # We don't have to worry about substrings here because the closing
  # parenthesis "anchors" the match.
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL)/)/g;

  # Remove the longer identifier first.
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_TO_PARENT//g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM//g;
}

# Remove the actual include.
\@# *include "mozilla/GuardObjects.h"@d
```

and running:

```
find . -name \*.cpp -o -name \*.h | grep -v 'GuardObjects.h' |xargs sed -i -f script 2>/dev/null
mach clang-format
```

Differential Revision: https://phabricator.services.mozilla.com/D85168
2020-07-30 14:22:38 +00:00
Kristen Wright 8ae32c1779 bug 1637829 - Increase the number of background pool threads r=froydnj
Having a thread limit of 1 in the background thread pools causes deadlock when attempting synchonous dispatch on the same pool. Increasing the thread limit on each pool to 2 lessens the risk of this kind of deadlock, so it's not the perfect solution where we wouldn't allow any kind of offthread synchronous dispatch that could cause a deadlock. These thread pools may eventually scale larger, so this patch sets the idle thread limit low.

Differential Revision: https://phabricator.services.mozilla.com/D83999
2020-07-21 15:07:27 +00:00
Bas Schouten 562faeceb0 Bug 1651842: Fix event delay being not/incorrecty reported when using TaskController. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D83542
2020-07-17 19:21:16 +00:00