diff options
-rw-r--r-- | Kernel/ProcFS.cpp | 3 | ||||
-rw-r--r-- | Kernel/Process.cpp | 10 | ||||
-rw-r--r-- | Kernel/Process.h | 1 | ||||
-rw-r--r-- | Userland/top.cpp | 13 |
4 files changed, 5 insertions, 22 deletions
diff --git a/Kernel/ProcFS.cpp b/Kernel/ProcFS.cpp index b1c06006b2..7cdd3c9f8f 100644 --- a/Kernel/ProcFS.cpp +++ b/Kernel/ProcFS.cpp @@ -505,7 +505,7 @@ ByteBuffer procfs$all(InodeIdentifier) auto processes = Process::all_processes(); StringBuilder builder; auto build_process_line = [&builder] (Process* process) { - builder.appendf("%u,%u,%u,%u,%u,%u,%u,%s,%u,%u,%s,%s,%u,%u,%u,%u,%u,%s\n", + builder.appendf("%u,%u,%u,%u,%u,%u,%u,%s,%u,%u,%s,%s,%u,%u,%u,%u,%s\n", process->pid(), process->times_scheduled(), process->tty() ? process->tty()->pgid() : 0, @@ -521,7 +521,6 @@ ByteBuffer procfs$all(InodeIdentifier) process->amount_virtual(), process->amount_resident(), process->amount_shared(), - process->amount_in_bitmaps(), process->ticks(), to_string(process->priority()) ); diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp index 16010cf9f7..b0cb123af7 100644 --- a/Kernel/Process.cpp +++ b/Kernel/Process.cpp @@ -2168,16 +2168,6 @@ size_t Process::amount_virtual() const return amount; } -size_t Process::amount_in_bitmaps() const -{ - size_t amount = 0; - for (auto& region : m_regions) { - if (region->is_bitmap()) - amount += region->size(); - } - return amount; -} - size_t Process::amount_resident() const { // FIXME: This will double count if multiple regions use the same physical page. diff --git a/Kernel/Process.h b/Kernel/Process.h index b4f4ac2335..b15b7d61a1 100644 --- a/Kernel/Process.h +++ b/Kernel/Process.h @@ -277,7 +277,6 @@ public: size_t amount_virtual() const; size_t amount_resident() const; size_t amount_shared() const; - size_t amount_in_bitmaps() const; Process* fork(RegisterDump&); int exec(const String& path, Vector<String>&& arguments, Vector<String>&& environment); diff --git a/Userland/top.cpp b/Userland/top.cpp index 5718addf4f..b14d9b0d99 100644 --- a/Userland/top.cpp +++ b/Userland/top.cpp @@ -18,7 +18,6 @@ struct Process { String priority; unsigned linear; unsigned committed; - unsigned in_bitmaps; unsigned nsched_since_prev; unsigned cpu_percent; unsigned cpu_percent_decimal; @@ -44,7 +43,7 @@ static Snapshot get_snapshot() if (!ptr) break; auto parts = String(buf, Chomp).split(','); - if (parts.size() < 18) + if (parts.size() < 17) break; bool ok; pid_t pid = parts[0].to_uint(ok); @@ -58,15 +57,13 @@ static Snapshot get_snapshot() unsigned uid = parts[5].to_uint(ok); ASSERT(ok); process.user = s_usernames->get(uid); - process.priority = parts[17]; + process.priority = parts[16]; process.state = parts[7]; process.name = parts[11]; process.linear = parts[12].to_uint(ok); ASSERT(ok); process.committed = parts[13].to_uint(ok); ASSERT(ok); - process.in_bitmaps = parts[15].to_uint(ok); - ASSERT(ok); snapshot.map.set(pid, move(process)); } int rc = fclose(fp); @@ -90,14 +87,13 @@ int main(int, char**) auto sum_diff = current.sum_nsched - prev.sum_nsched; printf("\033[3J\033[H\033[2J"); - printf("\033[47;30m%6s %3s % 8s % 8s %6s %6s %6s %4s %s\033[K\033[0m\n", + printf("\033[47;30m%6s %3s % 8s % 8s %6s %6s %4s %s\033[K\033[0m\n", "PID", "PRI", "USER", "STATE", "LINEAR", "COMMIT", - "BITMAP", "%CPU", "NAME"); for (auto& it : current.map) { @@ -123,14 +119,13 @@ int main(int, char**) }); for (auto* process : processes) { - printf("%6d %c % 8s % 8s %6u %6u %6u %2u.%1u %s\n", + printf("%6d %c % 8s % 8s %6u %6u %2u.%1u %s\n", process->pid, process->priority[0], process->user.characters(), process->state.characters(), process->linear / 1024, process->committed / 1024, - process->in_bitmaps / 1024, process->cpu_percent, process->cpu_percent_decimal, process->name.characters() |