зеркало из 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 : rebase_source : 338e8cd4951ea4ecc8d502f980d0808dedb7193b
This commit is contained in:
Родитель
f222aaad95
Коммит
cdd84d7001
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче