* Add read, write and total count to the ports KDL command so one can see
what the ports of a team are up to without having to go through each port individually. * Enlarge the port id column so even large ids fit nicely. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25857 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -95,7 +95,7 @@ dump_port_list(int argc, char **argv)
|
|||||||
} else if (argc > 1)
|
} else if (argc > 1)
|
||||||
owner = strtoul(argv[1], NULL, 0);
|
owner = strtoul(argv[1], NULL, 0);
|
||||||
|
|
||||||
kprintf("port id cap r-sem w-sem team name\n");
|
kprintf("port id cap r-sem r-cnt w-sem w-cnt total team name\n");
|
||||||
|
|
||||||
for (i = 0; i < sMaxPorts; i++) {
|
for (i = 0; i < sMaxPorts; i++) {
|
||||||
struct port_entry *port = &sPorts[i];
|
struct port_entry *port = &sPorts[i];
|
||||||
@@ -104,8 +104,12 @@ dump_port_list(int argc, char **argv)
|
|||||||
|| (name != NULL && strstr(port->name, name) == NULL))
|
|| (name != NULL && strstr(port->name, name) == NULL))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
kprintf("%p %6ld %4ld %6ld %6ld %6ld %s\n", port, port->id,
|
int32 readCount, writeCount;
|
||||||
port->capacity, port->read_sem, port->write_sem, port->owner,
|
get_sem_count(port->read_sem, &readCount);
|
||||||
|
get_sem_count(port->write_sem, &writeCount);
|
||||||
|
kprintf("%p %8ld %4ld %6ld %6ld %6ld %6ld %8ld %6ld %s\n", port,
|
||||||
|
port->id, port->capacity, port->read_sem, readCount,
|
||||||
|
port->write_sem, writeCount, port->total_count, port->owner,
|
||||||
port->name);
|
port->name);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user