Bug 1713287 - Relax the assumtion that there will be at least as many helper threads as cores r=lth

This won't necessarily be true when using an external thread pool.

The maximum number of Wasm tasks is now limited by the number of cores though.

Differential Revision: https://phabricator.services.mozilla.com/D116620
This commit is contained in:
Jon Coppeard 2021-06-04 07:28:08 +00:00
Родитель e64c5d279b
Коммит e974406ec1
1 изменённых файлов: 2 добавлений и 3 удалений

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

@ -494,7 +494,6 @@ static bool TieringBeneficial(uint32_t codeSize) {
return false;
}
MOZ_ASSERT(GetHelperThreadCount() >= cpuCount);
// Compute the max number of threads available to do actual background
// compilation work.
@ -502,9 +501,9 @@ static bool TieringBeneficial(uint32_t codeSize) {
uint32_t workers = GetMaxWasmCompilationThreads();
// The number of cores we will use is bounded both by the CPU count and the
// worker count.
// worker count, since the worker count already takes this into account.
uint32_t cores = std::min(cpuCount, workers);
uint32_t cores = workers;
SystemClass cls = ClassifySystem();