Improve CPU Cache info reporting -- Add Windows support. (#486) * Improve CPU Cache info reporting -- Add Windows support. This patch does a couple of thing regarding CPU Cache reporting. First, it adds an implementation on Windows. Second it fixes the JSONReporter to correctly (and actually) output the CPU configuration information. And finally, third, it detects and reports the number of physical CPU's that share the same cache.
diff --git a/src/reporter.cc b/src/reporter.cc index c37ad94..5d2fa05 100644 --- a/src/reporter.cc +++ b/src/reporter.cc
@@ -45,7 +45,10 @@ Out << "CPU Caches:\n"; for (auto &CInfo : info.caches) { Out << " L" << CInfo.level << " " << CInfo.type << " " - << (CInfo.size / 1000) << "K\n"; + << (CInfo.size / 1000) << "K"; + if (CInfo.num_sharing != 0) + Out << " (x" << (info.num_cpus / CInfo.num_sharing) << ")"; + Out << "\n"; } }