gecko-dev/startupcache
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
..
test Bug 1314378 part B - port TestStartupCache to gtest, r=froydnj 2016-11-11 11:57:08 -05:00
StartupCache.cpp Bug 1323100 - Register most of the remaining threadfunc threads with the profiler. r=froydnj 2017-01-05 16:34:26 +01:00
StartupCache.h Bug 1314378 part B - port TestStartupCache to gtest, r=froydnj 2016-11-11 11:57:08 -05:00
StartupCacheModule.cpp Bug 784739 - Switch from NULL to nullptr in startupcache/; r=ehsan 2013-07-31 11:44:43 -04:00
StartupCacheUtils.cpp Bug 1314378 part B - port TestStartupCache to gtest, r=froydnj 2016-11-11 11:57:08 -05:00
StartupCacheUtils.h Bug 1314378 part B - port TestStartupCache to gtest, r=froydnj 2016-11-11 11:57:08 -05:00
moz.build Bug 1286877 - do not set c-basic-offset for python-mode; r=gps 2016-07-14 10:16:42 -06:00
nsIStartupCache.idl Bug 1314378 part B - port TestStartupCache to gtest, r=froydnj 2016-11-11 11:57:08 -05:00