Commit Graph
398 Commits
Author SHA1 Message Date
Nicholas Nethercote c4aacd8403 Bug 1563139 - Remove StaticPrefs.h. r=glandium
This requires replacing inclusions of it with inclusions of more specific prefs
files.

The exception is that StaticPrefsAll.h, which is equivalent to StaticPrefs.h,
and is used in `Codegen.py` because doing something smarter is tricky and
suitable for a follow-up. As a result, any change to StaticPrefList.yaml will
still trigger recompilation of all the generated DOM bindings files, but that's
still a big improvement over trigger recompilation of every file that uses
static prefs.

Most of the changes in this commit are very boring. The only changes that are
not boring are modules/libpref/*, Codegen.py, and ServoBindings.toml.

Differential Revision: https://phabricator.services.mozilla.com/D39138
2019-07-26 01:10:23 +00:00
Nika Layzell 999c8f25f9 Bug 1561783 - Make nsThread::mIsMainThread a bool, r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D36142
2019-06-27 00:37:53 +00:00
Olli Pettay 14eaf3f565 Bug 1559220 - Special case IndexedDB threads in wakeup telemetry, r=erahm
The approach isn't perhaps super elegant, but it is a small and simple tweak.

Differential Revision: https://phabricator.services.mozilla.com/D34923
2019-06-16 21:03:45 +00:00
Olli Pettay 19c7cbfd03 Bug 1554292 - Add simple telemetry probe to gather information about threads' wakeup frequency, r=erahm
This patch takes the approach to count up to 100 wakeups and reports then time it took for that period. Regression in wakeups could
show up as decreased mean or median time.

Differential Revision: https://phabricator.services.mozilla.com/D32543
2019-06-05 20:26:09 +00:00
Jim Blandy a9a559f08b Bug 1553567: Use MaxValue to initialize/reset nsThread::mCurrentEventLoopDepth, not -1. r=froydnj
Since the purpose of mCurrentEventLoopDepth is to be ordered in comparison with
mNestedEventLoopDepth, it's a bit deceptive to give it a value that would appear
to be less than any reasonable depth but is, because the variables in question
are unsigned, actually greater than any reasonable depth. Using
mozilla::MaxValue<uint32_t>::value is clearer.

Differential Revision: https://phabricator.services.mozilla.com/D32198
2019-05-23 10:22:57 +00:00
Jean-Yves Avenard 49e9b7e63f Bug 1548795 - P2. Remove dom.performance.enable_scheduler_timing preference. r=tarek
Differential Revision: https://phabricator.services.mozilla.com/D30467
2019-05-09 23:12:12 +00:00
Valentin Gosu 0fd86fb6df Bug 1532253 - Add NS_NewURIOnAnyThread r=baku
Differential Revision: https://phabricator.services.mozilla.com/D22137
2019-03-19 15:11:31 +00:00
Yaron Tausky 18042c6331 Bug 1516277 - Add local execution mode to nsThread r=janv,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D21241
2019-03-06 16:26:07 +00:00
Gurzau Raul 6b998a33db Backed out changeset 44d83d32e254 (bug 1516277) for failing at /test/unit/test_eviction.js on a CLOSED TREE. 2019-03-06 17:50:28 +02:00
Yaron Tausky 4ac526f9b9 Bug 1516277 - Add local execution mode to nsThread r=janv,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D21241
2019-03-06 13:53:16 +00:00
Ryan Hunt e1344a48bb Bug 1523969 part 27 - Move method definition inline comments to new line in 'xpcom/'. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D21131
2019-02-25 16:14:01 -06:00
Markus Stange beff53a46a Bug 1500692 - Centralize profiling category definition and add infrastructure for subcategories. r=njn
The actual subcategories will be added in later patches, so that there are no
unused categories.

Differential Revision: https://phabricator.services.mozilla.com/D11334
2019-02-16 17:37:43 +00:00
Nika Layzell 2443cce0b6 Bug 1526382 - Part 2: Make nsIClassInfo use Array<nsIIDRef> for 'interfaces', r=mccr8
This is a follow-up to the previous part, which actually changes one of
these callers to use Array<nsIIDRef> instead of [array] nsIIDPtr.

From doing this patch, it seems like we should consider changing
the type `nsIIDRef` to instead simply be `nsIID`, and treat it more like
the `AString` types from the POV of XPIDL. `nsIIDPtr` would then
continue to exist for backwards compatibility, but we can probably
remove almost all current consumers over time.

Depends on D19175

Differential Revision: https://phabricator.services.mozilla.com/D19176
2019-02-13 21:42:08 +00:00
Eric Rahm a0c2bec238 Bug 1329794 - Remove verbose thread shutdown warning. r=Nika 2019-01-31 14:56:04 -08:00
Randell Jesup 682721b83e Bug 1522150: Add a DeferredTimers queue ahead of the normal Idle EventQueue r=froyd
* * *
Bug 1522150: Rename NS_IdleDispatch* functions since they take queue identifiers r=froyd
2019-01-26 12:18:05 -05:00
Randell Jesup 97291212a0 Bug 1522150: Rename EventPriority to EventQueuePriority to avoid name conflict with MacOS r=froyd 2019-01-26 12:18:05 -05:00
Nathan Froyd fd0d7b5511 Bug 1485216 - remove Scheduler and related code from xpcom/threads; r=mccr8
Quantum DOM is no longer a priority, and the extra code it introduces to
several places block useful refactorings.
2019-01-22 20:16:56 -05:00
Cosmin Sabou 57bb107987 Merge mozilla-inbound to mozilla-central. a=merge 2019-01-19 11:57:49 +02:00
Greg Tatum 7ced9eb1ec Bug 1520526 - Add categories to all profiler markers; r=mstange
This commit adds categories to all markers. This way the profiler's
marker categories and frame label categories agree. There are a few
duplicate category properties on some of the marker payloads, but
this could be cleaned up in a follow-up if needed.

Differential Revision: https://phabricator.services.mozilla.com/D16864
2019-01-18 15:40:15 +00:00
Olli Pettay c9f192fe33 Bug 1518038 - Add nsIThread.hasPendingHighPriorityEvents, r=froydnj 2019-01-10 19:07:34 +02:00
Ehsan Akhgari 498e2df734 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset
2019-01-18 10:16:18 +01:00
Sylvestre Ledru e5a134f73a Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset
2018-11-30 11:46:48 +01:00
Gerald Squelart 1d2c22154b Bug 1435091 - p4. Use profiler_thread_is_being_profiled() instead of profiler_is_active() around profiler_add_marker()s - r=mstange
(Unless there were other profiler actions, as I'm not sure yet whether it would
be safe to skip them when the profiler is paused; another bug should
investigate that.)

Differential Revision: https://phabricator.services.mozilla.com/D11308
2018-11-19 06:29:15 +00:00
Eric Rahm 8e2e54177d Bug 1504356 - Lock ThreadListMutex before accessing thread list. r=kmag 2018-11-13 10:48:38 -08:00
Valentin Gosu 309f2134af Bug 1503725 - Do not deallocate nsThreadShutdownContext when leaking thread. r=erahm
Sometimes when we call ShutdownWithTimeout on a thread pool, the unresponsive
thread that we leak will actually complete before the main thread is done.
In that case, the thread will dereference the thread shutdown context, so
we must intentionally leak it too.

Differential Revision: https://phabricator.services.mozilla.com/D10645
2018-11-02 17:38:37 -04:00
Brian Hackett 3ba3a9763c Bug 1488808 Part 17 - Allow paints to happen at the normal time when recording/replaying, r=nical. 2018-10-17 10:16:30 -06:00
Randell Jesup c4685545cb Bug 1299118: Implement Long Tasks API internals (not DOM access to it) r=froyd,mstange 2018-10-11 13:22:55 -04:00
shindli 49cf9d59f6 Backed out 3 changesets (bug 1299118) for ES lint failures
Backed out changeset 14451eb9a2b8 (bug 1299118)
Backed out changeset e5adc30bdf7f (bug 1299118)
Backed out changeset 8f7bb583fbb5 (bug 1299118)
2018-10-11 20:47:58 +03:00
Randell Jesup 3bfc8a319f Bug 1299118: Implement Long Tasks API internals (not DOM access to it) r=froyd,mstange 2018-10-11 13:22:55 -04:00
Kris Maglione 3277249857 Bug 1494513: Only allow calling Shutdown() from an XPCOM thread. r=erahm
This doesn't fix the problem, but at least moves the resulting assertion
closer to the problematic caller, and makes it easier to diagnose.

Differential Revision: https://phabricator.services.mozilla.com/D7042
2018-09-26 21:59:55 -07:00
Kris Maglione a44b61fa77 Bug 1479035: Follow-up: Fix invarient which is no longer true. r=me 2018-09-26 22:08:43 -07:00
Kris Maglione 128af8d182 Bug 1479035: Part 2 - Get rid of PRThread to nsThread map. r=erahm
These maps hold strong references which complicate nsThread lifetime handling
considerably, and only have a couple of fringe uses. We have a linked list of
active threads that the thread manager can use for its internal enumeration
purposes, and the external uses are easily done away with, so there doesn't
seem to be much reason to keep the map around.

MozReview-Commit-ID: x7dsj6C4x8
2018-07-27 15:26:08 -07:00
Kris Maglione 8b206bfa62 Bug 1479035: Part 1 - Don't create event queues for stub nsThread wrappers. r=froydnj
Most of the times when we automatically create nsThread wrappers for threads
that don't already have them, we don't actually need the event targets, since
those threads don't run XPCOM event loops. Aside from wasting memory, actually
creating these event loops can lead to leaks if a thread tries to dispatch a
runnable to the queue which creates a reference cycle with the thread.

Not creating the event queues for threads that don't actually need them helps
avoid those foot guns, and also makes it easier to figure out which treads
actually run XPCOM event loops.

MozReview-Commit-ID: Arck4VQqdne
2018-07-27 15:13:12 -07:00
Narcis Beleuzu 243b4d5e2b Backed out 2 changesets (bug 1479035) for assertion failure: mEvents. CLOSED TREE
Backed out changeset 89a0c0874d40 (bug 1479035)
Backed out changeset 5152af6ab3e3 (bug 1479035)
2018-09-26 23:40:13 +03:00
Kris Maglione 9923da1032 Bug 1479035: Part 2 - Get rid of PRThread to nsThread map. r=erahm
These maps hold strong references which complicate nsThread lifetime handling
considerably, and only have a couple of fringe uses. We have a linked list of
active threads that the thread manager can use for its internal enumeration
purposes, and the external uses are easily done away with, so there doesn't
seem to be much reason to keep the map around.

MozReview-Commit-ID: x7dsj6C4x8
2018-07-27 15:26:08 -07:00
Kris Maglione 968b1ecb3e Bug 1479035: Part 1 - Don't create event queues for stub nsThread wrappers. r=froydnj
Most of the times when we automatically create nsThread wrappers for threads
that don't already have them, we don't actually need the event targets, since
those threads don't run XPCOM event loops. Aside from wasting memory, actually
creating these event loops can lead to leaks if a thread tries to dispatch a
runnable to the queue which creates a reference cycle with the thread.

Not creating the event queues for threads that don't actually need them helps
avoid those foot guns, and also makes it easier to figure out which treads
actually run XPCOM event loops.

MozReview-Commit-ID: Arck4VQqdne
2018-07-27 15:13:12 -07:00
Noemi Erli ae480c4147 Backed out 2 changesets (bug 1479035) for build bustages bustages netwerk/cache2/target on CLOSED TREE
Backed out changeset 5f8706213610 (bug 1479035)
Backed out changeset a03a61d6d724 (bug 1479035)
2018-09-26 08:54:03 +03:00
Kris Maglione 8df7ba7f92 Bug 1479035: Part 2 - Get rid of PRThread to nsThread map. r=erahm
These maps hold strong references which complicate nsThread lifetime handling
considerably, and only have a couple of fringe uses. We have a linked list of
active threads that the thread manager can use for its internal enumeration
purposes, and the external uses are easily done away with, so there doesn't
seem to be much reason to keep the map around.

MozReview-Commit-ID: x7dsj6C4x8
2018-07-27 15:26:08 -07:00
Kris Maglione b4c940bbb5 Bug 1479035: Part 1 - Don't create event queues for stub nsThread wrappers. r=froydnj
Most of the times when we automatically create nsThread wrappers for threads
that don't already have them, we don't actually need the event targets, since
those threads don't run XPCOM event loops. Aside from wasting memory, actually
creating these event loops can lead to leaks if a thread tries to dispatch a
runnable to the queue which creates a reference cycle with the thread.

Not creating the event queues for threads that don't actually need them helps
avoid those foot guns, and also makes it easier to figure out which treads
actually run XPCOM event loops.

MozReview-Commit-ID: Arck4VQqdne
2018-07-27 15:13:12 -07:00
Nathan Froyd d0ef392c36 Bug 1486400 - add task dispatch/run delays for ChaosMode; r=jesup 2018-09-19 12:02:09 -04:00
Brian Hackett a4d563dbff Bug 1486616 - Execute record/replay triggers when finalizing deferred things, r=mccr8. 2018-08-31 05:35:36 -10:00
Gabriele Svelto 02652f3d58 Bug 1459212 - Save memory reports for use in crash reports when low on memory r=dmajor,mccr8
This moves the code that detects very low memory scenarios and grabs memory
reports from the main thread event-loop to the available memory tracker.
Besides removing the overhead of the check from the event-loop code this
increases the likeliness of the reports being gathered by sampling at a
higher frequency but only when we already detected a low-memory scenario. Last
but not least this add checks for low commit-space detection alongside low
virtual-memory detection.

Differential Revision: https://phabricator.services.mozilla.com/D3669
2018-08-20 21:53:27 +00:00
Tom Ritter f78ad69ed1 Bug 1480177 Lowercase includes to fix MinGW Build Errors r=froydnj
MozReview-Commit-ID: LvFS90CRAFe
2018-07-30 22:43:24 -05:00
Kris Maglione 19b244a051 Bug 1476405: Follow-up: Handle nsThread cleanup for threads that never shutdown. r=me 2018-07-26 16:36:16 -07:00
Kris Maglione 0e9ad9be19 Bug 1476405: Part 1 - Allow enumerating non-native nsThread threads. r=erahm
MozReview-Commit-ID: 1JKxWeejqzi
2018-07-20 13:48:50 -07:00
Cosmin Sabou 8c816fec64 Backed out 8 changesets (bug 1476405) for causing frequent failures in bug 1479022. a=backout
Backed out changeset ad1674e9152d (bug 1476405)
Backed out changeset e0a021b27d2c (bug 1476405)
Backed out changeset 771288dbf852 (bug 1476405)
Backed out changeset aeebad4f2dc3 (bug 1476405)
Backed out changeset 4831cbfd03de (bug 1476405)
Backed out changeset 0b0c243a1827 (bug 1476405)
Backed out changeset 236b366fdf37 (bug 1476405)
Backed out changeset c767b1b618fb (bug 1476405)
2018-07-28 01:25:25 +03:00
Kris Maglione ab9c1e3c4a Bug 1476405: Follow-up: Handle nsThread cleanup for threads that never shutdown. r=me 2018-07-26 16:36:16 -07:00
Kris Maglione 505ab6c373 Bug 1476405: Part 1 - Allow enumerating non-native nsThread threads. r=erahm
MozReview-Commit-ID: 1JKxWeejqzi
2018-07-20 13:48:50 -07:00
Coroiu Cristina d0c2c7c7ee Backed out 9 changesets (bug 1476405) for causing leaks
Backed out changeset 4113d6fb3c1c (bug 1476405)
Backed out changeset cb7f7cc32687 (bug 1476405)
Backed out changeset 6d18a8bd5ee3 (bug 1476405)
Backed out changeset b2a99f50e642 (bug 1476405)
Backed out changeset b5b9d295545d (bug 1476405)
Backed out changeset f092a32a3639 (bug 1476405)
Backed out changeset 6c154f4d9dd9 (bug 1476405)
Backed out changeset d0ebb3aa8e0f (bug 1476405)
Backed out changeset 06b8093ddc6a (bug 1476405)
2018-07-27 08:56:36 +03:00
Kris Maglione 081936fe2a Bug 1476405: Follow-up: Handle nsThread cleanup for threads that never shutdown. r=me 2018-07-26 16:36:16 -07:00