@@ -387,7 +387,7 @@ CacheAllocator<CacheTrait>::allocateInternalTier(TierId tid,
387387 // the allocation class in our memory allocator.
388388 const auto cid = allocator_[tid]->getAllocationClassId (pid, requiredSize);
389389 util::RollingLatencyTracker rollTracker{
390- (*stats_.classAllocLatency )[pid][cid]};
390+ (*stats_.classAllocLatency )[tid][ pid][cid]};
391391
392392 // TODO: per-tier
393393 (*stats_.allocAttempts )[pid][cid].inc ();
@@ -485,8 +485,10 @@ CacheAllocator<CacheTrait>::allocateChainedItemInternal(
485485 const auto cid = allocator_[tid]->getAllocationClassId (pid, requiredSize);
486486
487487 util::RollingLatencyTracker rollTracker{
488- (*stats_.classAllocLatency )[pid][cid]};
489-
488+ (*stats_.classAllocLatency )[tid][pid][cid]};
489+
490+ // TODO: per-tier? Right now stats_ are not used in any public periodic
491+ // worker
490492 (*stats_.allocAttempts )[pid][cid].inc ();
491493
492494 void * memory = allocator_[tid]->allocate (pid, requiredSize);
@@ -2663,7 +2665,7 @@ ACStats CacheAllocator<CacheTrait>::getACStats(TierId tid,
26632665 const auto & ac = pool.getAllocationClass (classId);
26642666
26652667 auto stats = ac.getStats ();
2666- stats.allocLatencyNs = (*stats_.classAllocLatency )[poolId][classId];
2668+ stats.allocLatencyNs = (*stats_.classAllocLatency )[tid][ poolId][classId];
26672669 return stats;
26682670}
26692671
0 commit comments