-
Notifications
You must be signed in to change notification settings - Fork 113
Livestat: A User Tool to dynamically display basekernel stats #252
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
Merged
Merged
Changes from 40 commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
30f5e17
changed the head command
jmazanec15 bd243da
changed the head num to 20001
jmazanec15 00bb845
Merge branch 'master' of github.com:dthain/basekernel
jmazanec15 9369ef8
Merge branch 'master' of github.com:dthain/basekernel
jmazanec15 57bc375
added bcache stats
jmazanec15 28e969d
added syscall for bcache stats
jmazanec15 4c0b8dd
added bcache stats test
jmazanec15 e71824e
added syscall for bcache stats
jmazanec15 fca3ebd
move bcache stats struct to stats.h
jmazanec15 1e237ed
Merge branch 'master' of github.com:dthain/basekernel into stats-collect
jmazanec15 a9e0ff8
added bcache_flush syscall
jmazanec15 5ead44f
added get stats for objects
jmazanec15 87ee455
added stats collection
jmazanec15 5440ecb
added driver and object stats collection
jmazanec15 044424a
fixed syntax
jmazanec15 d8911ae
added calls for stats collection
jmazanec15 6b73a2a
added dev driver stats to enum
jmazanec15 42c7222
added stats
jmazanec15 f290dec
added stats
jmazanec15 e2bf8d3
added stats
jmazanec15 2c01ed5
added strdup
jmazanec15 7e40b4b
init commit
jmazanec15 b5e6802
remove bcachetest
jmazanec15 fcfabed
added livestat and statworkload
jmazanec15 74f485e
added stats collection
jmazanec15 9af87c5
added strdup
jmazanec15 308a6e1
added more stats structs
jmazanec15 b90b8f3
added stats collection calls
jmazanec15 ff4098f
removed objectstats
jmazanec15 2eb5607
removed object stats
jmazanec15 fb7dee8
removed structs related to object syscalls
jmazanec15 6c6f680
Revert "added stats"
jmazanec15 29bb3b2
Revert "added stats"
jmazanec15 df71c42
removed the device statistics
jmazanec15 318af72
Revert "added stats collection"
jmazanec15 b42fd66
removed object stats functions
jmazanec15 26e7110
Revert "added get stats for objects"
jmazanec15 bc72194
changed bar graphs
jmazanec15 cbc9980
minor comment changes
jmazanec15 a161fc3
removed ata include, added stats include
jmazanec15 bf9398d
added device_driver_lookup funct
jmazanec15 7b45303
modified driver stats to take in const char * name
jmazanec15 c53ad89
added pointer and string checking to driver stats
jmazanec15 506c42e
Merge branch 'master' of github.com:dthain/basekernel into livestat
jmazanec15 d844bbc
fixed redefinition error from merge
jmazanec15 f3ff93c
fixed strdup function
jmazanec15 25949c9
pass args by pointers
jmazanec15 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 file contains hidden or 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 file contains hidden or 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 file contains hidden or 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 file contains hidden or 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 file contains hidden or 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 file contains hidden or 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 file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ See the file LICENSE for details. | |
#include "ata.h" | ||
#include "graphics.h" | ||
#include "is_valid.h" | ||
#include "bcache.h" | ||
|
||
/* | ||
syscall_handler() is responsible for decoding system calls | ||
|
@@ -504,11 +505,6 @@ int sys_object_close(int fd) | |
return 0; | ||
} | ||
|
||
int sys_object_stats( int fd, struct object_stats *stats ) | ||
{ | ||
return KERROR_NOT_IMPLEMENTED; | ||
} | ||
|
||
int sys_object_set_tag(int fd, char *tag) | ||
{ | ||
if(!is_valid_object(fd)) return KERROR_INVALID_OBJECT; | ||
|
@@ -568,6 +564,19 @@ int sys_system_stats(struct system_stats *s) | |
return 0; | ||
} | ||
|
||
int sys_bcache_stats(struct bcache_stats * s) | ||
{ | ||
if(!is_valid_pointer(s,sizeof(*s))) return KERROR_INVALID_ADDRESS; | ||
bcache_get_stats( s ); | ||
return 0; | ||
} | ||
|
||
int sys_bcache_flush() | ||
{ | ||
bcache_flush_all(); | ||
return 0; | ||
} | ||
|
||
int sys_system_time( uint32_t *tm ) | ||
{ | ||
if(!is_valid_pointer(tm,sizeof(*tm))) return KERROR_INVALID_ADDRESS; | ||
|
@@ -584,6 +593,12 @@ int sys_system_rtc( struct rtc_time *t ) | |
return 0; | ||
} | ||
|
||
int sys_device_driver_stats(char * name, struct device_driver_stats * stats) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
{ | ||
device_driver_get_stats(name, stats); | ||
return 0; | ||
} | ||
|
||
int sys_chdir(const char *path) | ||
{ | ||
if(!is_valid_path(path)) return KERROR_INVALID_PATH; | ||
|
@@ -665,8 +680,6 @@ int32_t syscall_handler(syscall_t n, uint32_t a, uint32_t b, uint32_t c, uint32_ | |
return sys_object_remove(a,(const char*)b); | ||
case SYSCALL_OBJECT_CLOSE: | ||
return sys_object_close(a); | ||
case SYSCALL_OBJECT_STATS: | ||
return sys_object_stats(a, (struct object_stats *) b); | ||
case SYSCALL_OBJECT_SET_TAG: | ||
return sys_object_set_tag(a, (char *) b); | ||
case SYSCALL_OBJECT_GET_TAG: | ||
|
@@ -681,11 +694,16 @@ int32_t syscall_handler(syscall_t n, uint32_t a, uint32_t b, uint32_t c, uint32_ | |
return sys_object_copy(a,b); | ||
case SYSCALL_SYSTEM_STATS: | ||
return sys_system_stats((struct system_stats *) a); | ||
case SYSCALL_BCACHE_STATS: | ||
return sys_bcache_stats((struct bcache_stats *) a); | ||
case SYSCALL_BCACHE_FLUSH: | ||
return sys_bcache_flush(); | ||
case SYSCALL_SYSTEM_TIME: | ||
return sys_system_time((uint32_t*)a); | ||
case SYSCALL_SYSTEM_RTC: | ||
return sys_system_rtc((struct rtc_time *) a); | ||
|
||
case SYSCALL_DEVICE_DRIVER_STATS: | ||
return sys_device_driver_stats((char *) a, (struct device_driver_stats *) b); | ||
case SYSCALL_CHDIR: | ||
return sys_chdir((const char *) a); | ||
default: | ||
|
This file contains hidden or 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 file contains hidden or 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 file contains hidden or 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
Oops, something went wrong.
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.
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.
Please factor out the matter of finding a driver by name into a separate function:
And then also use that in
driver_open
.