gecko-dev/xpcom/threads
Nicholas Nethercote 8a68e6fb83 Bug 1403868 (part 4) - Reduce tools/profiler/public/*.h to almost nothing in non-MOZ_GECKO_PROFILER builds. r=mstange.
Currently the Gecko Profiler defines a moderate amount of stuff when
MOZ_GECKO_PROFILER is undefined. It also #includes various headers, including
JS ones. This is making it difficult to separate Gecko's media stack for
inclusion in Servo.

This patch greatly simplifies how things are exposed. The starting point is:

- GeckoProfiler.h can be #included unconditionally;

- everything else from the profiler must be guarded by MOZ_GECKO_PROFILER.

In practice this introduces way too many #ifdefs, so the patch loosens it by
adding no-op macros for a number of the most common operations.

The net result is that #ifdefs and macros are used a bit more, but almost
nothing is exposed in non-MOZ_GECKO_PROFILER builds (including
ProfilerMarkerPayload.h and GeckoProfiler.h), and understanding what is exposed
is much simpler than before.

Note also that in BHR, ThreadStackHelper is now entirely absent in
non-MOZ_GECKO_PROFILER builds.
2017-10-04 09:11:18 +11:00
..
AbstractEventQueue.h Bug 1350432 - Initial Quantum DOM scheduler implementation, disabled by default (r=froydnj) 2017-08-25 10:28:23 -07:00
AbstractThread.cpp Bug 1386893 - Update AbstractThread thread safety assertions to work with cooperative threading (r=jwwang) 2017-08-03 14:19:04 -07:00
AbstractThread.h Bug 1364821 - Fix bustage 2017-08-03 15:17:11 -07:00
BlockingResourceBase.cpp Bug 1403868 (part 4) - Reduce tools/profiler/public/*.h to almost nothing in non-MOZ_GECKO_PROFILER builds. r=mstange. 2017-10-04 09:11:18 +11:00
BlockingResourceBase.h Bug 1347963 - part 1 - introduce mozilla::RecursiveMutex; r=erahm 2017-03-14 14:05:51 -04:00
CondVar.h Bug 1403868 (part 4) - Reduce tools/profiler/public/*.h to almost nothing in non-MOZ_GECKO_PROFILER builds. r=mstange. 2017-10-04 09:11:18 +11:00
CooperativeThreadPool.cpp Bug 1398393 - Set Servo thread state on cooperative threads. r=billm 2017-09-08 16:50:34 -07:00
CooperativeThreadPool.h Bug 1402824 - Add missing includes in CooperativeThreadPool to fix non-unified build. r=billm 2017-09-25 10:37:31 +01:00
CPUUsageWatcher.cpp Bug 1382440 - Fix CPUUsageWatcher on OSX and Linux r=froydnj 2017-08-28 14:00:22 -07:00
CPUUsageWatcher.h Bug 1382440 - Fix CPUUsageWatcher on OSX and Linux r=froydnj 2017-08-28 14:00:22 -07:00
DeadlockDetector.h
EventQueue.cpp Bug 1402824 - Include nsIRunnable in EventQueue.cpp to fix non-unified build. r=billm 2017-09-25 10:43:30 +01:00
EventQueue.h Bug 1350432 - Initial Quantum DOM scheduler implementation, disabled by default (r=froydnj) 2017-08-25 10:28:23 -07:00
HangAnnotations.cpp Bug 1380081 - Part 11: Simplify the HangAnnotations abstraction, r=froydnj 2017-08-15 16:35:46 -04:00
HangAnnotations.h Bug 1380081 - Part 11: Simplify the HangAnnotations abstraction, r=froydnj 2017-08-15 16:35:46 -04:00
HangMonitor.cpp Bug 1403868 (part 4) - Reduce tools/profiler/public/*.h to almost nothing in non-MOZ_GECKO_PROFILER builds. r=mstange. 2017-10-04 09:11:18 +11:00
HangMonitor.h
IdleTaskRunner.cpp Bug 1393581 - Name all IdleTaskRunner runnables, r=smaug 2017-08-25 11:24:27 -04:00
IdleTaskRunner.h Bug 1393581 - Name all IdleTaskRunner runnables, r=smaug 2017-08-25 11:24:27 -04:00
InputEventStatistics.cpp Bug 1401412 - Destroy this singleton during XPCOM shutdown. r=smaug 2017-09-19 17:38:05 -07:00
InputEventStatistics.h Bug 1402824 - Include nsTArray.h in InputEventStatistics.h to fix non-unified build. r=smaug 2017-09-25 10:45:25 +01:00
LabeledEventQueue.cpp Bug 1399707 - Make entries in TabChild::sActiveTabs and EventLoopActivation::mEventGroups unique. r=billm 2017-09-13 11:59:35 +08:00
LabeledEventQueue.h Bug 1402824 - Include Linkedlist.h in LabeledEventQueue to fix non-unified build. r=billm 2017-09-25 10:51:41 +01:00
LazyIdleThread.cpp Bug 1382922 - Refactor event queue to allow multiple implementations (r=erahm) 2017-08-16 20:55:43 -07:00
LazyIdleThread.h Bug 1382172 - Name nsITimerCallback instances in native implementation. r=billm 2017-07-27 02:18:20 +08:00
LeakRefPtr.h
MainThreadIdlePeriod.cpp Bug 1311425 - Add pref for how far into the timer queue, r=smaug,f=froydnj 2017-05-24 21:14:29 -04:00
MainThreadIdlePeriod.h Bug 1311425 - Add pref for how far into the timer queue, r=smaug,f=froydnj 2017-05-24 21:14:29 -04:00
MainThreadQueue.h Bug 1396155 - Allow LabeledEventQueue to be used outside the Scheduler (r=froydnj) 2017-09-07 22:31:34 -07:00
MainThreadUtils.h Bug 1393710 - Add thread name into NS_DebugBreak for better debugging. r=froydnj 2017-08-30 11:13:50 +08:00
Monitor.h Bug 1374594 - Allow mutex/monitor scoped unlockers to be constructed from their locking counterparts - r=froydnj 2017-06-20 22:20:49 +12:00
moz.build Bug 1399707 - Make entries in TabChild::sActiveTabs and EventLoopActivation::mEventGroups unique. r=billm 2017-09-13 11:59:35 +08:00
MozPromise.h Bug 1390406 - Remove unnecessary includes in dom/media/mediasource. r=jya 2017-08-15 16:13:00 +12:00
Mutex.h Bug 1350432 - Add MutexAutoLock::AssertOwns (r=froydnj) 2017-08-25 10:28:23 -07:00
nsEnvironment.cpp Bug 1381727 (part 2) - Remove SmprintfFree(). r=glandium. 2017-07-25 09:09:25 +10:00
nsEnvironment.h
nsICancelableRunnable.h
nsIEnvironment.idl
nsIEventTarget.idl Bug 1361164 - Add infallible IsOnCurrentThread to nsIEventTarget (r=froydnj) 2017-06-12 20:20:08 -07:00
nsIIdlePeriod.idl
nsIIdleRunnable.h Bug 1358476, add support for timeout when doing idle dispatch, p=farre,smaug, r=nfroyd 2017-05-24 17:34:50 -04:00
nsILabelableRunnable.cpp Bug 1399707 - Make entries in TabChild::sActiveTabs and EventLoopActivation::mEventGroups unique. r=billm 2017-09-13 11:59:35 +08:00
nsILabelableRunnable.h Bug 1399707 - Make entries in TabChild::sActiveTabs and EventLoopActivation::mEventGroups unique. r=billm 2017-09-13 11:59:35 +08:00
nsINamed.idl Bug 1382172 - Compute names for all JS-implemented XPCOM objects (r=mrbkap) 2017-08-14 22:42:42 -07:00
nsIProcess.idl Bug 1400294 - Add 'noShell' attribute to nsIProcess to use CreateProcess() for launching a process that doesn't require shell service on Windows. r=froydnj,r=aklotz,r=dmajor 2017-10-03 11:29:14 +08:00
nsIRunnable.idl Bug 1351148 Part3: Synthesize native input events with priority. f=kats,smaug. r=smaug. 2017-05-19 15:41:24 +08:00
nsISerialEventTarget.idl Bug 1372733 - EventTargetFor should return an nsISerialEventTarget (r=bkelly) 2017-06-15 20:16:25 -07:00
nsISupportsPriority.idl
nsIThread.idl Bug 1382922 - Refactor event queue to allow multiple implementations (r=erahm) 2017-08-16 20:55:43 -07:00
nsIThreadInternal.idl Bug 1382922 - Refactor event queue to allow multiple implementations (r=erahm) 2017-08-16 20:55:43 -07:00
nsIThreadManager.idl Bug 1351148 Part3: Synthesize native input events with priority. f=kats,smaug. r=smaug. 2017-05-19 15:41:24 +08:00
nsIThreadPool.idl Bug 1361164 - Add infallible IsOnCurrentThread to nsIEventTarget (r=froydnj) 2017-06-12 20:20:08 -07:00
nsITimer.idl Bug 1377222 - Eliminate nsITimer::InitWithFuncCallback in favor of InitWithNamedFuncCallback (r=froydnj) 2017-07-03 16:19:56 -07:00
nsMemoryPressure.cpp Bug 1372405 - Provide names for all runnables in the tree (r=froydnj) 2017-06-26 14:19:58 -07:00
nsMemoryPressure.h
nsProcess.h Bug 1400294 - Add 'noShell' attribute to nsIProcess to use CreateProcess() for launching a process that doesn't require shell service on Windows. r=froydnj,r=aklotz,r=dmajor 2017-10-03 11:29:14 +08:00
nsProcessCommon.cpp Bug 1403868 (part 4) - Reduce tools/profiler/public/*.h to almost nothing in non-MOZ_GECKO_PROFILER builds. r=mstange. 2017-10-04 09:11:18 +11:00
nsProxyRelease.cpp Bug 1372453 - Part 1: Support to name the callers of ProxyReleaseEvent. r=froydnj 2017-06-13 18:10:13 +08:00
nsProxyRelease.h Bug 1347644 - Make NS_ProxyRelease runnables cancelable (r=bkelly) 2017-10-06 10:55:24 -05:00
nsThread.cpp Bug 1403868 (part 4) - Reduce tools/profiler/public/*.h to almost nothing in non-MOZ_GECKO_PROFILER builds. r=mstange. 2017-10-04 09:11:18 +11:00
nsThread.h merge mozilla-inbound to mozilla-central. r=merge a=merge 2017-08-23 16:29:51 +02:00
nsThreadManager.cpp Bug 1401662 - don't inline nsThreadManager::get(); r=erahm 2017-09-20 17:10:20 -04:00
nsThreadManager.h Bug 1401662 - don't inline nsThreadManager::get(); r=erahm 2017-09-20 17:10:20 -04:00
nsThreadPool.cpp Bug 1404305 - Include nsCOMArray.h and SystemGroup in nsThreadPool.cpp to fix the build in non-unified mode. r=froydnj 2017-09-28 14:32:26 +01:00
nsThreadPool.h Bug 1382922 - Refactor event queue to allow multiple implementations (r=erahm) 2017-08-16 20:55:43 -07:00
nsThreadSyncDispatch.h Bug 1382922 - Refactor event queue to allow multiple implementations (r=erahm) 2017-08-16 20:55:43 -07:00
nsThreadUtils.cpp Merge inbound to m-c a=merge 2017-09-26 15:54:51 -07:00
nsThreadUtils.h Bug 1397344 - Use Decay to ensure StoreCopyPassByXXX stores the value by copy not by reference. r=gerald 2017-09-07 17:02:13 +08:00
nsTimerImpl.cpp Bug 1383019: Move more logic under the protection of nsTimerImpl::mMutex, and simplify. r=froydnj, a=abillings 2017-09-14 12:19:24 -05:00
nsTimerImpl.h Bug 1383019: Move more logic under the protection of nsTimerImpl::mMutex, and simplify. r=froydnj, a=abillings 2017-09-14 12:19:24 -05:00
PrioritizedEventQueue.cpp Bug 1402824 - Add missing includes in PrioritizedEventQueue to fix non-unified build. r=billm 2017-09-25 10:50:04 +01:00
PrioritizedEventQueue.h Bug 1402824 - Add missing includes in PrioritizedEventQueue to fix non-unified build. r=billm 2017-09-25 10:50:04 +01:00
Queue.h Bug 1382922 - Refactor event queue to allow multiple implementations (r=erahm) 2017-08-16 20:55:43 -07:00
RecursiveMutex.cpp Bug 1347963 - part 1 - introduce mozilla::RecursiveMutex; r=erahm 2017-03-14 14:05:51 -04:00
RecursiveMutex.h Bug 1385335 - Use RecursiveMutex in AsyncPanZoomController.r=botond 2017-09-27 08:41:51 +05:30
ReentrantMonitor.h Bug 1403868 (part 4) - Reduce tools/profiler/public/*.h to almost nothing in non-MOZ_GECKO_PROFILER builds. r=mstange. 2017-10-04 09:11:18 +11:00
RWLock.cpp Bug 1367619 - Use RWLock when accessing font prefs service off main thread; r=heycam 2017-05-25 15:04:13 -07:00
RWLock.h Bug 1367619 - Use RWLock when accessing font prefs service off main thread; r=heycam 2017-05-25 15:04:13 -07:00
Scheduler.cpp Bug 1403868 (part 4) - Reduce tools/profiler/public/*.h to almost nothing in non-MOZ_GECKO_PROFILER builds. r=mstange. 2017-10-04 09:11:18 +11:00
Scheduler.h Merge inbound to m-c a=merge 2017-09-26 15:54:51 -07:00
SchedulerGroup.cpp Bug 1399707 - Make entries in TabChild::sActiveTabs and EventLoopActivation::mEventGroups unique. r=billm 2017-09-13 11:59:35 +08:00
SchedulerGroup.h Bug 1399707 - Make entries in TabChild::sActiveTabs and EventLoopActivation::mEventGroups unique. r=billm 2017-09-13 11:59:35 +08:00
SharedThreadPool.cpp Bug 1376487 - Use LookupForAdd instead of Get+Put to avoid unnecessary hashtable lookups. r=froydnj 2017-06-28 01:03:17 +02:00
SharedThreadPool.h Bug 1361164 - Add infallible IsOnCurrentThread to nsIEventTarget (r=froydnj) 2017-06-12 20:20:08 -07:00
StateMirroring.h Bug 1372405 - Provide names for all runnables in the tree (r=froydnj) 2017-06-26 14:19:58 -07:00
StateWatching.h Bug 1372405 - Provide names for all runnables in the tree (r=froydnj) 2017-06-26 14:19:58 -07:00
SynchronizedEventQueue.cpp Bug 1402824 - Include nsIThreadInteral.h in SynchronizedEventQueue to fix non-unified. r=billm 2017-09-25 10:56:13 +01:00
SynchronizedEventQueue.h Bug 1350432 - Remove mEventObservers to SynchronizedEventQueue (r=froydnj) 2017-08-25 10:28:23 -07:00
SyncRunnable.h Bug 1372405 - Provide names for all runnables in the tree (r=froydnj) 2017-06-26 14:19:58 -07:00
SystemGroup.cpp Bug 1402824 - Include AbstractThread in SystemGroup.cpp to fix non-unified build. r=billm 2017-09-25 10:59:02 +01:00
SystemGroup.h Bug 1378930 - Part 2: Remove the aName parameter from SchedulerGroup/DocGroup/DispatcherTrait. r=billm 2017-07-26 16:13:35 +08:00
TaskCategory.h
TaskDispatcher.h Bug 1372405 - Provide names for all runnables in the tree (r=froydnj) 2017-06-26 14:19:58 -07:00
TaskQueue.cpp Bug 1387002 - Replace .size() by .empty() when applicable in xpcom/ r=froydnj 2017-08-03 12:08:32 +02:00
TaskQueue.h Bug 1372405 - Provide names for all runnables in the tree (r=froydnj) 2017-06-26 14:19:58 -07:00
ThreadEventQueue.cpp Bug 1402824 - Include LabeledEventQueue.h in ThreadEventQueue.cpp to fix non-unified build. r=billm 2017-09-25 10:59:47 +01:00
ThreadEventQueue.h Bug 1396155 - Allow LabeledEventQueue to be used outside the Scheduler (r=froydnj) 2017-09-07 22:31:34 -07:00
ThreadEventTarget.cpp Bug 1382922 - Refactor event queue to allow multiple implementations (r=erahm) 2017-08-16 20:55:43 -07:00
ThreadEventTarget.h Bug 1382922 - Refactor event queue to allow multiple implementations (r=erahm) 2017-08-16 20:55:43 -07:00
ThrottledEventQueue.cpp Bug 1350432 - Initial Quantum DOM scheduler implementation, disabled by default (r=froydnj) 2017-08-25 10:28:23 -07:00
ThrottledEventQueue.h Bug 1372733 - EventTargetFor should return an nsISerialEventTarget (r=bkelly) 2017-06-15 20:16:25 -07:00
TimerThread.cpp Bug 1383019: Move more logic under the protection of nsTimerImpl::mMutex, and simplify. r=froydnj, a=abillings 2017-09-14 12:19:24 -05:00
TimerThread.h Bug 1383019: Move more logic under the protection of nsTimerImpl::mMutex, and simplify. r=froydnj, a=abillings 2017-09-14 12:19:24 -05:00