-
Notifications
You must be signed in to change notification settings - Fork 110
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
Object Stats Collection #254
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This reverts commit fca3ebd.
This reverts commit 28e969d.
This reverts commit 6b73a2a.
This reverts commit 2c01ed5.
This reverts commit b90b8f3.
This reverts commit 9af87c5.
This reverts commit 5440ecb.
This reverts commit a9e0ff8.
This reverts commit 57bc375.
This reverts commit d8911ae.
This reverts commit e2bf8d3.
Superseded |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
PR partially addresses #231. Users need to query different objects in their processes. To do this, we want to provide one system call that allows a user to specify the type of object they are querying and provide a statistics structure.
Function format
int syscall_object_stats(int fd, void * stats, int object_type);
fd - file descriptor to object
stats - pointer to a stats struct object
object_type - integer corresponding to what kind of object the user wants to query. There are #defined directives in include/kernel/stats.h to make these more human readable.
Objects that can be queried
Testing
Created the file "objectstats.c" in user/ in order to test that each of these stats calls work.
Notes
For Graphics and Device stats collection, the user needs to go through the console and file objects, respectively. So, for a device, the user would make the call
syscall_object_stats(fd, &device_stats, DEVICE_TYPE);
where fd is a file descriptor for a file. This is because there is no way to access either of these from the userspace directly.