Skip to content
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
wants to merge 59 commits into from
Closed

Conversation

jmazanec15
Copy link
Collaborator

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

  1. Object
  2. Pipe
  3. File
  4. Directory
  5. Console
  6. Graphics
  7. Device

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.

jmazanec15 added 28 commits May 1, 2019 09:51
This reverts commit 2c01ed5.
This reverts commit 9af87c5.
This reverts commit 57bc375.
This reverts commit e2bf8d3.
@dthain
Copy link
Owner

dthain commented Sep 10, 2019

Superseded

@dthain dthain closed this Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants