-
Notifications
You must be signed in to change notification settings - Fork 45
syscalls: implement getThreadCpuTime syscall #692
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
Conversation
|
|
oI0ck
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I was wrong on the previous comment. Rescheduling happens on a timer IRQ, hence the cpuTime should be kept up-to-date correctly. LGTM
Implement syscall based on declared getCpuTime function JIRA: RTOS-1088
892e6aa to
9508f1e
Compare
|
I don't like expansion of syscalls list if it's not strictly necessary - this information might be e.g. a part of threadsinfo syscall instead. |
|
Right, haven't noticed that. |
|
Note that the PR description acknowledges that the I have done some limited efforts in making the Implementation-wise it'd be a matter of further refactoring to extract the code that populates the |
|
Good point. I think it's safe then to close this PR and tackle this matter in another one, since that's concerns a different change. |
Implement syscall based on declared getCpuTime function
JIRA: RTOS-1088
Description
Add syscall allowing us to get information on how much time did actual thread spend on CPU.
Motivation and Context
See: phoenix-rtos/libphoenix#431
Added due to performance reasons, existing syscalls (threadsinfo) give info on first n threads on threads tree which would make us search for our thread on the list
Types of changes
How Has This Been Tested?
Checklist:
Special treatment