summaryrefslogtreecommitdiff
path: root/kern/syscnt.c
diff options
context:
space:
mode:
Diffstat (limited to 'kern/syscnt.c')
-rw-r--r--kern/syscnt.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/kern/syscnt.c b/kern/syscnt.c
index 5b479f36..2e042bc6 100644
--- a/kern/syscnt.c
+++ b/kern/syscnt.c
@@ -22,6 +22,7 @@
#include <kern/init.h>
#include <kern/list.h>
#include <kern/mutex.h>
+#include <kern/shell.h>
#include <kern/spinlock.h>
#include <kern/syscnt.h>
@@ -38,6 +39,32 @@ syscnt_setup(void)
mutex_init(&syscnt_lock);
}
+#ifdef X15_SHELL
+
+static void
+syscnt_shell_info(int argc, char **argv)
+{
+ char *prefix;
+
+ prefix = (argc >= 2) ? argv[1] : NULL;
+ syscnt_info(prefix);
+}
+
+
+static struct shell_cmd syscnt_shell_cmds[] = {
+ SHELL_CMD_INITIALIZER("syscnt_info", syscnt_shell_info,
+ "syscnt_info [<prefix>]",
+ "Show information about system counters"),
+};
+
+#endif /* X15_SHELL */
+
+void __init
+syscnt_register_shell_cmds(void)
+{
+ SHELL_REGISTER_CMDS(syscnt_shell_cmds);
+}
+
void __init
syscnt_register(struct syscnt *syscnt, const char *name)
{