@@ -101,7 +101,7 @@ struct Stats {
101101 uint64_t invalidDestructorCount{0 };
102102 int64_t unDestructedItemCount{0 };
103103
104- std::map<PoolId, std::map<ClassId, ACStats>> allocationClassStats;
104+ std::map<TierId, std::map< PoolId, std::map<ClassId, ACStats> >> allocationClassStats;
105105
106106 // populate the counters related to nvm usage. Cache implementation can decide
107107 // what to populate since not all of those are interesting when running
@@ -156,24 +156,26 @@ struct Stats {
156156 };
157157
158158 auto foreachAC = [&](auto cb) {
159- for (auto & pidStat : allocationClassStats) {
160- for (auto & cidStat : pidStat.second ) {
161- cb (pidStat.first , cidStat.first , cidStat.second );
159+ for (auto & tidStat : allocationClassStats) {
160+ for (auto & pidStat : tidStat.second ) {
161+ for (auto & cidStat : pidStat.second ) {
162+ cb (tidStat.first , pidStat.first , cidStat.first , cidStat.second );
163+ }
162164 }
163165 }
164166 };
165167
166- foreachAC ([&](auto pid, auto cid, auto stats) {
168+ foreachAC ([&](auto tid, auto pid, auto cid, auto stats) {
167169 auto [allocSizeSuffix, allocSize] = formatMemory (stats.allocSize );
168170 auto [memorySizeSuffix, memorySize] =
169171 formatMemory (stats.totalAllocatedSize ());
170- out << folly::sformat (" pid{:2} cid{:4} {:8.2f}{} memorySize: {:8.2f}{}" ,
171- pid, cid, allocSize, allocSizeSuffix, memorySize,
172+ out << folly::sformat (" tid{:2} pid{:2} cid{:4} {:8.2f}{} memorySize: {:8.2f}{}" ,
173+ tid, pid, cid, allocSize, allocSizeSuffix, memorySize,
172174 memorySizeSuffix)
173175 << std::endl;
174176 });
175177
176- foreachAC ([&](auto pid, auto cid, auto stats) {
178+ foreachAC ([&](auto tid, auto pid, auto cid, auto stats) {
177179 auto [allocSizeSuffix, allocSize] = formatMemory (stats.allocSize );
178180
179181 // If the pool is not full, extrapolate usageFraction for AC assuming it
0 commit comments