-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[other]: Access to the Performance Timers (Counters) #29
Comments
@wuwentao , @zhangxiaojingCAN , @sunnycase |
uint64_t get_cpu_times(void)
{
uint64_t value;
__asm__ __volatile__("rdtime %0" : "=r"(value));
return value;
}
uint64_t get_cpu_cycles(void)
{
uint64_t value;
__asm__ __volatile__("rdcycle %0" : "=r"(value));
return value;
} The cpu timer frequency is 24M Hz. |
@wycwyhwyq I have additional question and let me explain that more profoundly. I would like to know if there is a possibility to read these hardware events from the user space, exactly just as your example shows the read-out of timer value and the cycle count. I really appreciate your help!! Bernard |
@wuwentao @wycwyhwyq @zhangxiaojingCAN @sunnycase Can [finally] anyone (of above-mentioned) answer my question? Best regards |
For a detailed introduction and use of PMU, please refer to Chapter 14 of this XuanTie-C908-UserManual.pdf. |
Other
Hello,
Does there exist a possibility to directly access the k230 performance timers or counters from the user space?
Just as in the case of x86_64 architecture where exists a dedicated instruction i.e. "RDPMC".
Thank your for help
Best regards
Bernard
The text was updated successfully, but these errors were encountered: