mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:08:10 +00:00
Add "times scheduled" field to /proc/summary
This commit is contained in:
parent
44045b258c
commit
e4bfcd2346
2 changed files with 4 additions and 7 deletions
|
@ -24,13 +24,14 @@ bool ProcFileSystem::initialize()
|
||||||
auto stringImpl = StringImpl::createUninitialized(tasks.size() * 128, buffer);
|
auto stringImpl = StringImpl::createUninitialized(tasks.size() * 128, buffer);
|
||||||
memset(buffer, 0, stringImpl->length());
|
memset(buffer, 0, stringImpl->length());
|
||||||
char* ptr = buffer;
|
char* ptr = buffer;
|
||||||
ptr += ksprintf(ptr, "PID OWNER STATE NAME\n");
|
ptr += ksprintf(ptr, "PID OWNER STATE NSCHED NAME\n");
|
||||||
for (auto* task : tasks) {
|
for (auto* task : tasks) {
|
||||||
ptr += ksprintf(ptr, "%w %w:%w %b %s\n",
|
ptr += ksprintf(ptr, "%w %w:%w %b %w %s\n",
|
||||||
task->pid(),
|
task->pid(),
|
||||||
task->uid(),
|
task->uid(),
|
||||||
task->gid(),
|
task->gid(),
|
||||||
task->state(),
|
task->state(),
|
||||||
|
task->timesScheduled(),
|
||||||
task->name().characters());
|
task->name().characters());
|
||||||
}
|
}
|
||||||
ptr += ksprintf(ptr, "kmalloc: alloc: %u / free: %u\n", sum_alloc, sum_free);
|
ptr += ksprintf(ptr, "kmalloc: alloc: %u / free: %u\n", sum_alloc, sum_free);
|
||||||
|
|
|
@ -101,7 +101,7 @@ static void undertaker_main()
|
||||||
{
|
{
|
||||||
for (;;) {
|
for (;;) {
|
||||||
Task::doHouseKeeping();
|
Task::doHouseKeeping();
|
||||||
sleep(10);
|
sleep(300);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,10 +114,6 @@ static void init_stage2()
|
||||||
|
|
||||||
auto keyboard = make<Keyboard>();
|
auto keyboard = make<Keyboard>();
|
||||||
|
|
||||||
extern void panel_main();
|
|
||||||
//new Task(panel_main, "panel", IPC::Handle::PanelTask, Task::Ring0);
|
|
||||||
//new Task(led_disco, "led-disco", IPC::Handle::Any, Task::Ring0);
|
|
||||||
|
|
||||||
Disk::initialize();
|
Disk::initialize();
|
||||||
|
|
||||||
#ifdef TEST_VFS
|
#ifdef TEST_VFS
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue