pcm
pcm copied to clipboard
Replace QPI hardcoded in strings with QPI or UPI detected at runtime
On a system with Skylake CPUs, the inter-socket interface is called UPI, but pcm.x still prints some messages calling it QPI like this:
Max QPI link 0 speed: 23.3 GBytes/second (10.4 GT/second)
Other prints refer to it as UPI:
Intel(r) UPI data traffic estimation in bytes (data traffic coming to CPU/socket through UPI links):
Total UPI outgoing data and non-data traffic: 22 M
Suggestion
Any print that still has QPI hardcoded like:
std::cerr << "Max QPI speed: " << max_qpi_speed / (1e9) << " GBytes/second (" << max_qpi_speed / (1e9*getBytesPerLinkTransfer()) << " GT/second)" << std::endl;
should use m->xPI() like this:
cout << "\n" << "Intel(r) "<< m->xPI() <<" data traffic estimation in bytes (data traffic coming to CPU/socket through "<< m->xPI() <<" links):" << "\n" << "\n";
to print the right name based on the CPU:
const char * xPI() const
{
if (hasUPI())
return "UPI";
return "QPI";
}
that is a good idea. Please let me know if you would like to send a pull request making this change
Roman