gecko-dev/xpcom
Markus Stange 4bdc4ca0fb Bug 1323100 - Register most of the remaining threadfunc threads with the profiler. r=froydnj
As far as I can tell, this covers all the remaining threads which we start
using PR_CreateThread, except the ones that are created inside NSPR or NSS,
and except for the Shutdown Watchdog thread in nsTerminator.cpp and the
CacheIO thread. The Shutdown Watchdog thread stays alive past leak detection
during shutdown (by design), so we'd report leaks if we profiled it. The
CacheIO thread seems to stay alive past shutdown leak detection sometimes as
well.

This adds a AutoProfilerRegister stack class for easy registering and
unregistering. There are a few places where we still call
profiler_register_thread() and profiler_unregister_thread() manually, either
because registration happens conditionally, or because there is a variable that
gets put on the stack before the AutoProfilerRegister (e.g. a dynamically
generated thread name). AutoProfilerRegister needs to be the first object on
the stack because it uses its own `this` pointer as the stack top address.

MozReview-Commit-ID: 3vwhS55Yzt

--HG--
extra : rebase_source : 56dd27282e7bd09a7e7dc7ca09ccfe3a0198e7af
2017-01-05 16:34:26 +01:00
..
base Bug 1326507, rename Traverse to TraverseNative, r=mccr8 2017-01-03 21:50:10 +02:00
build Bug 1323100 - Register most of the remaining threadfunc threads with the profiler. r=froydnj 2017-01-05 16:34:26 +01:00
components Bug 1317954 - Replace default bodies of special member functions with = default; in xpcom/. r=froydnj 2016-11-16 14:25:31 +02:00
doc
ds Backed out changeset 491237dbcb5d (bug 1323207) 2016-12-16 20:06:43 +01:00
glue Bug 1323100 - Remove NS_SetThreadName which is now unused. r=froydnj 2016-12-20 14:43:11 +01:00
idl-parser Bug 1319352 - Allow to run AccEventGen.py and xpild/header.py from any directory. r=mshal 2016-11-22 17:05:49 +09:00
io Bug 1328569 - Don't call UnmapViewOfFile() with a null address. r=froydnj 2017-01-04 18:42:51 +08:00
libxpt/xptcall
reflect Bug 1323042 - forbid MOZ_COUNT_{CTOR,DTOR} for nsISupports classes; r=froydnj 2016-12-12 09:27:58 -05:00
rust/nsstring Backout of Bug 1316696 as we don't want to require rustc 1.13 yet, a=froydnj 2016-11-28 14:19:12 -05:00
string Bug 1324430 - Implement nsTSubstring_CharT::Assign with length for a better string buffer sharing, r=froydnj 2016-12-23 17:22:21 +01:00
system Backed out changeset eae2252a519f (bug 1321593) for leaks, e.g. in clipboard and jetpack tests. r=backout 2016-12-12 22:10:17 +01:00
tests Bug 1323100 - Assign names to all remaining threads that are created through NS_NewThread and create them using NS_NewNamedThread instead. r=froydnj 2016-12-21 11:43:50 +01:00
threads Bug 1323100 - Register most of the remaining threadfunc threads with the profiler. r=froydnj 2017-01-05 16:34:26 +01:00
typelib Bug 1317970 - Use manifestparser manifests for python unit tests, r=chmanchester 2016-11-16 09:59:22 -05:00
windbgdlg Bug 1286877 - do not set c-basic-offset for python-mode; r=gps 2016-07-14 10:16:42 -06:00
xpidl Bug 1293784 - Only recurse into xpcom/idl-parser/xpidl once; r=gps 2016-08-09 16:58:18 -04:00
moz.build Bug 1295762 - Part 1: Implement rust bindings to XPCOM's string types, r=froydnj 2016-09-20 11:26:43 -04:00
xpcom-config.h.in
xpcom-private.h.in