From: compudj Date: Thu, 12 Aug 2004 16:38:27 +0000 (+0000) Subject: ameliorate process list hash function X-Git-Tag: v0.12.20~2772 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=324cdea4f15ec609880790b4eb2add737144c376;p=lttv.git ameliorate process list hash function git-svn-id: http://ltt.polymtl.ca/svn@717 04897980-b3bd-0310-b5e0-8ef037075253 --- diff --git a/ltt/branches/poly/lttv/modules/gui/controlflow/processlist.c b/ltt/branches/poly/lttv/modules/gui/controlflow/processlist.c index 0a29dfe1..6e2ec2c7 100644 --- a/ltt/branches/poly/lttv/modules/gui/controlflow/processlist.c +++ b/ltt/branches/poly/lttv/modules/gui/controlflow/processlist.c @@ -235,7 +235,7 @@ gint process_sort_func ( GtkTreeModel *model, static guint hash_fct(gconstpointer key) { - return ((ProcessInfo*)key)->pid; + return ((ProcessInfo*)key)->pid ^ ((ProcessInfo*)key)->cpu; } static gboolean equ_fct(gconstpointer a, gconstpointer b) @@ -541,7 +541,10 @@ int processlist_remove( ProcessList *process_list, GtkTreeIter iter; Process_Info.pid = pid; - Process_Info.cpu = cpu; + if(pid == 0) + Process_Info.cpu = cpu; + else + Process_Info.cpu = 0; Process_Info.birth = *birth; Process_Info.trace_num = trace_num; @@ -587,7 +590,10 @@ __inline gint processlist_get_process_pixels( ProcessList *process_list, HashedProcessData *hashed_process_data = NULL; Process_Info.pid = pid; - Process_Info.cpu = cpu; + if(pid == 0) + Process_Info.cpu = cpu; + else + Process_Info.cpu = 0; Process_Info.birth = *birth; Process_Info.trace_num = trace_num;