@@ -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
@@ -155,24 +155,26 @@ struct Stats {
155155 };
156156
157157 auto foreachAC = [&](auto cb) {
158- for (auto & pidStat : allocationClassStats) {
159- for (auto & cidStat : pidStat.second ) {
160- cb (pidStat.first , cidStat.first , cidStat.second );
158+ for (auto & tidStat : allocationClassStats) {
159+ for (auto & pidStat : tidStat.second ) {
160+ for (auto & cidStat : pidStat.second ) {
161+ cb (tidStat.first , pidStat.first , cidStat.first , cidStat.second );
162+ }
161163 }
162164 }
163165 };
164166
165- foreachAC ([&](auto pid, auto cid, auto stats) {
167+ foreachAC ([&](auto tid, auto pid, auto cid, auto stats) {
166168 auto [allocSizeSuffix, allocSize] = formatMemory (stats.allocSize );
167169 auto [memorySizeSuffix, memorySize] =
168170 formatMemory (stats.totalAllocatedSize ());
169- out << folly::sformat (" pid{:2} cid{:4} {:8.2f}{} memorySize: {:8.2f}{}" ,
170- pid, cid, allocSize, allocSizeSuffix, memorySize,
171+ out << folly::sformat (" tid{:2} pid{:2} cid{:4} {:8.2f}{} memorySize: {:8.2f}{}" ,
172+ tid, pid, cid, allocSize, allocSizeSuffix, memorySize,
171173 memorySizeSuffix)
172174 << std::endl;
173175 });
174176
175- foreachAC ([&](auto pid, auto cid, auto stats) {
177+ foreachAC ([&](auto tid, auto pid, auto cid, auto stats) {
176178 auto [allocSizeSuffix, allocSize] = formatMemory (stats.allocSize );
177179
178180 // If the pool is not full, extrapolate usageFraction for AC assuming it
0 commit comments