зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1476405: Part 4 - Create nsThread wrappers whenever a thread is registered with the profiler. r=erahm,mstange
This automatically gets us wrappers (and therefore memory statistics) for Stylo threads, JS HelperThreads, and any other non-nsThread threads that we already register with the profiler. MozReview-Commit-ID: 8ZPjb0ojyWp --HG-- extra : source : b5b9d295545dff9c8f7aa5e5c0137afa24385eb2 extra : histedit_source : c8a6352058996670bbd22ac28949d852d62a976a
This commit is contained in:
Родитель
831de9e086
Коммит
b2dfcd9f0d
|
@ -3298,6 +3298,11 @@ profiler_register_thread(const char* aName, void* aGuessStackTop)
|
|||
MOZ_ASSERT_IF(NS_IsMainThread(), Scheduler::IsCooperativeThread());
|
||||
MOZ_RELEASE_ASSERT(CorePS::Exists());
|
||||
|
||||
// Make sure we have a nsThread wrapper for the current thread, and that NSPR
|
||||
// knows its name.
|
||||
(void) NS_GetCurrentThread();
|
||||
NS_SetCurrentThreadName(aName);
|
||||
|
||||
PSAutoLock lock(gPSMutex);
|
||||
|
||||
void* stackTop = GetStackTop(aGuessStackTop);
|
||||
|
|
Загрузка…
Ссылка в новой задаче