X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmodules%2Fgui%2Fcontrolflow%2Fprocesslist.c;h=924d8c52501b795eb673f579433b98304250ff9f;hb=4b7dc462963cae143ed66dd82a3d88a792f91b61;hp=6e2ec2c75fcade1b85face1721c7419169496683;hpb=324cdea4f15ec609880790b4eb2add737144c376;p=lttv.git diff --git a/ltt/branches/poly/lttv/modules/gui/controlflow/processlist.c b/ltt/branches/poly/lttv/modules/gui/controlflow/processlist.c index 6e2ec2c7..924d8c52 100644 --- a/ltt/branches/poly/lttv/modules/gui/controlflow/processlist.c +++ b/ltt/branches/poly/lttv/modules/gui/controlflow/processlist.c @@ -233,16 +233,17 @@ gint process_sort_func ( GtkTreeModel *model, } -static guint hash_fct(gconstpointer key) +static guint process_list_hash_fct(gconstpointer key) { - return ((ProcessInfo*)key)->pid ^ ((ProcessInfo*)key)->cpu; + guint pid = ((ProcessInfo*)key)->pid; + return ((pid>>8 ^ pid>>4 ^ pid>>2 ^ pid) ^ ((ProcessInfo*)key)->cpu); } -static gboolean equ_fct(gconstpointer a, gconstpointer b) +static gboolean process_list_equ_fct(gconstpointer a, gconstpointer b) { const ProcessInfo *pa = (const ProcessInfo*)a; const ProcessInfo *pb = (const ProcessInfo*)b; - + if(pa->pid != pb->pid) return 0; @@ -307,7 +308,7 @@ ProcessList *processlist_construct(void) GTK_SORT_ASCENDING); process_list->process_hash = g_hash_table_new_full( - hash_fct, equ_fct, + process_list_hash_fct, process_list_equ_fct, destroy_hash_key, destroy_hash_data );