pcm icon indicating copy to clipboard operation
pcm copied to clipboard

Replace QPI hardcoded in strings with QPI or UPI detected at runtime

Open RobertCElliott opened this issue 5 years ago • 1 comments

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";
    }

RobertCElliott avatar Oct 05 '18 19:10 RobertCElliott

that is a good idea. Please let me know if you would like to send a pull request making this change

Roman

opcm avatar Oct 11 '18 07:10 opcm