mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:58:13 +00:00
SystemMonitor: Show thread name instead of process name
Add the thread name to CThreadStatistics and display it in the system monitor's process model instead of the process name.
This commit is contained in:
parent
f67d007864
commit
e09a02ad3f
3 changed files with 4 additions and 1 deletions
|
@ -295,11 +295,12 @@ void ProcessModel::update()
|
||||||
state.ipv4_socket_write_bytes = thread.ipv4_socket_write_bytes;
|
state.ipv4_socket_write_bytes = thread.ipv4_socket_write_bytes;
|
||||||
state.file_read_bytes = thread.file_read_bytes;
|
state.file_read_bytes = thread.file_read_bytes;
|
||||||
state.file_write_bytes = thread.file_write_bytes;
|
state.file_write_bytes = thread.file_write_bytes;
|
||||||
state.name = it.value.name;
|
|
||||||
state.amount_virtual = it.value.amount_virtual;
|
state.amount_virtual = it.value.amount_virtual;
|
||||||
state.amount_resident = it.value.amount_resident;
|
state.amount_resident = it.value.amount_resident;
|
||||||
state.icon_id = it.value.icon_id;
|
state.icon_id = it.value.icon_id;
|
||||||
|
|
||||||
|
state.name = thread.name;
|
||||||
|
|
||||||
state.tid = thread.tid;
|
state.tid = thread.tid;
|
||||||
state.times_scheduled = thread.times_scheduled;
|
state.times_scheduled = thread.times_scheduled;
|
||||||
state.priority = thread.priority;
|
state.priority = thread.priority;
|
||||||
|
|
|
@ -46,6 +46,7 @@ HashMap<pid_t, CProcessStatistics> CProcessStatisticsReader::get_all()
|
||||||
CThreadStatistics thread;
|
CThreadStatistics thread;
|
||||||
thread.tid = thread_object.get("tid").to_u32();
|
thread.tid = thread_object.get("tid").to_u32();
|
||||||
thread.times_scheduled = thread_object.get("times_scheduled").to_u32();
|
thread.times_scheduled = thread_object.get("times_scheduled").to_u32();
|
||||||
|
thread.name = thread_object.get("name").to_string();
|
||||||
thread.state = thread_object.get("state").to_string();
|
thread.state = thread_object.get("state").to_string();
|
||||||
thread.ticks = thread_object.get("ticks").to_u32();
|
thread.ticks = thread_object.get("ticks").to_u32();
|
||||||
thread.priority = thread_object.get("priority").to_string();
|
thread.priority = thread_object.get("priority").to_string();
|
||||||
|
|
|
@ -20,6 +20,7 @@ struct CThreadStatistics {
|
||||||
unsigned file_write_bytes;
|
unsigned file_write_bytes;
|
||||||
String state;
|
String state;
|
||||||
String priority;
|
String priority;
|
||||||
|
String name;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct CProcessStatistics {
|
struct CProcessStatistics {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue