Implemented procfs.

This commit is contained in:
Naoki Hamada
2014-08-20 15:39:43 +09:00
parent 5775d3e6da
commit c783ec8e11
8 changed files with 361 additions and 30 deletions

View File

@@ -43,6 +43,7 @@
#define dkprintf(...)
#endif
int osnum = 0;
extern struct ihk_kmsg_buf kmsg_buf;
@@ -133,6 +134,16 @@ void pc_init(void)
APT_TYPE_STALL, APT_TYPE_CYCLE }, // not updated for KNC
};
p = find_command_line("osnum=");
if (p != NULL) {
while (('0' <= *p) && (*p <= '9')) {
osnum *= 10;
osnum += *p++ - '0';
}
}
kprintf("osnum: %d\n");
if (!(p = find_command_line("perfctr"))) {
dkprintf("perfctr not initialized.\n");
return;