You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am wonderring whether the RDPMC instrcution is supported in recent generations of CPU. My CPU is i9-10980XE and I use Debian 12.6. I run a test program using the cpuid instruction and find that the RDPMC is not supported. The test code given by ChatGPT is shown below
#include<stdio.h>
#include<cpuid.h>voidcheck_rdpmc_support() {
unsignedint eax, ebx, ecx, edx;
__cpuid(0xA, eax, ebx, ecx, edx);
if (edx & (1 << 23)) {
printf("RDPMC is supported\n");
} else {
printf("RDPMC is not supported\n");
}
}
intmain() {
check_rdpmc_support();
return0;
}
It turns out to be not supported.
The most primitive problem is that I want to monitoring the performance of a circle. I tried RDMSR instruction at first, but as RDMSR needs privilege 0 and the cost of using system call is unaffordable. Also, system call also introduce unpredictable extra cost itself. This also happens on the Perf, so I turn to RDPMC. As ChatGpt says, it can be used on privilege 3, but I have never make it successfully. The test program above also indicates the RDPMC is not supported in my machine. So I am wondering whether it can be used at privilege 3. If we can use it at privilege 3, then which CPU support it in recent generations (10-14 generation)?
The text was updated successfully, but these errors were encountered:
Thanks for opening an issue. For a RDPMC reference please review https://github.com/andikleen/pmu-tools/blob/master/jevents/rdpmc.c . Depending on your Linux distribution you may also need to set /sys/devices/cpu/rdpmc to allow user space access. The RDPMC instruction is still available on recent generations.
I am wonderring whether the RDPMC instrcution is supported in recent generations of CPU. My CPU is i9-10980XE and I use Debian 12.6. I run a test program using the cpuid instruction and find that the RDPMC is not supported. The test code given by ChatGPT is shown below
It turns out to be not supported.
The most primitive problem is that I want to monitoring the performance of a circle. I tried RDMSR instruction at first, but as RDMSR needs privilege 0 and the cost of using system call is unaffordable. Also, system call also introduce unpredictable extra cost itself. This also happens on the Perf, so I turn to RDPMC. As ChatGpt says, it can be used on privilege 3, but I have never make it successfully. The test program above also indicates the RDPMC is not supported in my machine. So I am wondering whether it can be used at privilege 3. If we can use it at privilege 3, then which CPU support it in recent generations (10-14 generation)?
The text was updated successfully, but these errors were encountered: