@@ -164,18 +164,11 @@ struct Stats {
164164 }
165165 };
166166
167+
167168 foreachAC ([&](auto tid, auto pid, auto cid, auto stats) {
168169 auto [allocSizeSuffix, allocSize] = formatMemory (stats.allocSize );
169170 auto [memorySizeSuffix, memorySize] =
170171 formatMemory (stats.totalAllocatedSize ());
171- out << folly::sformat (" tid{:2} pid{:2} cid{:4} {:8.2f}{} memorySize: {:8.2f}{}" ,
172- tid, pid, cid, allocSize, allocSizeSuffix, memorySize,
173- memorySizeSuffix)
174- << std::endl;
175- });
176-
177- foreachAC ([&](auto tid, auto pid, auto cid, auto stats) {
178- auto [allocSizeSuffix, allocSize] = formatMemory (stats.allocSize );
179172
180173 // If the pool is not full, extrapolate usageFraction for AC assuming it
181174 // will grow at the same rate. This value will be the same for all ACs.
@@ -185,8 +178,10 @@ struct Stats {
185178
186179 out << folly::sformat (
187180 " tid{:2} pid{:2} cid{:4} {:8.2f}{} usageFraction: {:4.2f} "
181+ " memorySize: {:8.2f}{} "
188182 " rollingAvgAllocLatency: {:8.2f}ns" ,
189183 tid, pid, cid, allocSize, allocSizeSuffix, acUsageFraction,
184+ memorySize, memorySizeSuffix,
190185 stats.allocLatencyNs .estimate ())
191186 << std::endl;
192187 });
0 commit comments