Bug 1672256 - Record thread creation markers for threads created off main thread, r=gerald.

Differential Revision: https://phabricator.services.mozilla.com/D94158
This commit is contained in:
Florian Quèze 2020-10-21 18:23:16 +00:00
Родитель 20103880cf
Коммит be3ab29de7
1 изменённых файлов: 9 добавлений и 2 удалений

Просмотреть файл

@ -656,9 +656,16 @@ nsThreadManager::NewNamedThread(const nsACString& aName, uint32_t aStackSize,
PROFILER_MARKER_TEXT(
"NewThread", OTHER,
MarkerOptions({MarkerStack::Capture(),
MarkerTiming::IntervalUntilNowFrom(startTime)}),
MarkerOptions(MarkerStack::Capture(),
MarkerTiming::IntervalUntilNowFrom(startTime)),
aName);
if (!NS_IsMainThread()) {
PROFILER_MARKER_TEXT(
"NewThread (non-main thread)", OTHER,
MarkerOptions(MarkerStack::Capture(), MarkerThreadId::MainThread(),
MarkerTiming::IntervalUntilNowFrom(startTime)),
aName);
}
thr.forget(aResult);
return NS_OK;