mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 10:48:13 +00:00
Kernel: Remove tracking of bitmap memory.
There are no more kernel bitmaps. It's much better this way.
This commit is contained in:
parent
cc9ff96a98
commit
809266a9fb
4 changed files with 5 additions and 22 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue