Initialization of profiler zones.

PiperOrigin-RevId: 819662587
This commit is contained in:
Ray Smith 2025-10-15 03:05:30 -07:00 committed by Copybara-Service
parent fb6fa793f4
commit e3e8511e79
1 changed files with 2 additions and 0 deletions

View File

@ -20,6 +20,7 @@
#include <vector>
#include "util/zones.h"
#include "hwy/aligned_allocator.h"
#include "hwy/contrib/thread_pool/thread_pool.h"
#include "hwy/profiler.h"
@ -100,6 +101,7 @@ ThreadingContext::ThreadingContext(const ThreadingArgs& args)
cache_info(topology),
allocator(topology, cache_info, args.bind != Tristate::kFalse),
pools(topology, allocator, args.max_threads, args.pin) {
InitProfilerZones(profiler);
PROFILER_ZONE("Startup.ThreadingContext autotune");
TunePools(hwy::PoolWaitMode::kSpin, pools);
// kBlock is the default, hence set/tune it last.