diff --git a/src/bin/system/process.c b/src/bin/system/process.c
index 14572cc..8a508b2 100644
--- a/src/bin/system/process.c
+++ b/src/bin/system/process.c
@@ -350,7 +350,10 @@ _proc_thread_info(Proc_Info *p)
t->numthreads = st.numthreads;
t->mem_virt = st.mem_virt;
t->mem_rss = st.mem_rss;
- t->command = strdup(st.name);
+
+ t->tid = tid;
+ t->thread_name = strdup(st.name);
+
p->threads = eina_list_append(p->threads, t);
}
@@ -1085,6 +1088,9 @@ proc_info_free(Proc_Info *proc)
free(proc->command);
if (proc->arguments)
free(proc->arguments);
+ if (proc->thread_name)
+ free(proc->thread_name);
+
free(proc);
}
diff --git a/src/bin/system/process.h b/src/bin/system/process.h
index fbade11..c1d97ca 100644
--- a/src/bin/system/process.h
+++ b/src/bin/system/process.h
@@ -46,6 +46,9 @@ typedef struct _Proc_Info
// Not used yet in UI.
long cpu_time;
+ int tid;
+ char *thread_name;
+
Eina_List *threads;
} Proc_Info;
diff --git a/src/bin/ui/ui_process.c b/src/bin/ui/ui_process.c
index 9e88c8a..5b10d0f 100644
--- a/src/bin/ui/ui_process.c
+++ b/src/bin/ui/ui_process.c
@@ -48,7 +48,7 @@ _thread_info_set(Ui_Process *ui, Proc_Info *proc)
{
long *cpu_time, *cpu_time_prev;
double cpu_usage = 0.0;
- const char *key = t->command;
+ const char *key = eina_slstr_printf("%s:%d", t->thread_name, t->tid);
if ((cpu_time_prev = eina_hash_find(ui->hash_cpu_times, key)) == NULL)
{
@@ -62,7 +62,7 @@ _thread_info_set(Ui_Process *ui, Proc_Info *proc)
*cpu_time_prev = t->cpu_time;
}
- eina_strbuf_append_printf(buf, "Name %s
", t->command);
+ eina_strbuf_append_printf(buf, "Name %s
", t->thread_name);
eina_strbuf_append_printf(buf, "State %s
", t->state);
eina_strbuf_append_printf(buf, "CPU %d
", t->cpu_id);
eina_strbuf_append_printf(buf, "CPU %1.1f%%", cpu_usage);