projects
/
lttv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix bugs uint 64 + no trace
[lttv.git]
/
ltt
/
branches
/
poly
/
lttv
/
modules
/
gui
/
controlflow
/
processlist.c
diff --git
a/ltt/branches/poly/lttv/modules/gui/controlflow/processlist.c
b/ltt/branches/poly/lttv/modules/gui/controlflow/processlist.c
index df492e727e04f65f6ece4328288aeed83702348d..924d8c52501b795eb673f579433b98304250ff9f 100644
(file)
--- a/
ltt/branches/poly/lttv/modules/gui/controlflow/processlist.c
+++ b/
ltt/branches/poly/lttv/modules/gui/controlflow/processlist.c
@@
-32,7
+32,7
@@
* Methods to synchronize process list *
*****************************************************************************/
* Methods to synchronize process list *
*****************************************************************************/
-static guint get_cpu_number_from_name(GQuark name);
+static
__inline
guint get_cpu_number_from_name(GQuark name);
/* Enumeration of the columns */
enum
/* Enumeration of the columns */
enum
@@
-233,16
+233,17
@@
gint process_sort_func ( GtkTreeModel *model,
}
}
-
guint
hash_fct(gconstpointer key)
+
static guint process_list_
hash_fct(gconstpointer key)
{
{
- return ((ProcessInfo*)key)->pid;
+ guint pid = ((ProcessInfo*)key)->pid;
+ return ((pid>>8 ^ pid>>4 ^ pid>>2 ^ pid) ^ ((ProcessInfo*)key)->cpu);
}
}
-
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;
{
const ProcessInfo *pa = (const ProcessInfo*)a;
const ProcessInfo *pb = (const ProcessInfo*)b;
-
+
if(pa->pid != pb->pid)
return 0;
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(
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
);
destroy_hash_key, destroy_hash_data
);
@@
-434,7
+435,7
@@
GtkWidget *processlist_get_widget(ProcessList *process_list)
-__inline gint get_cell_height(ProcessList *process_list, GtkTreeView *tree_view)
+
static
__inline gint get_cell_height(ProcessList *process_list, GtkTreeView *tree_view)
{
gint height = process_list->cell_height_cache;
if(height != -1) return height;
{
gint height = process_list->cell_height_cache;
if(height != -1) return height;
@@
-541,7
+542,10
@@
int processlist_remove( ProcessList *process_list,
GtkTreeIter iter;
Process_Info.pid = pid;
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;
Process_Info.birth = *birth;
Process_Info.trace_num = trace_num;
@@
-575,7
+579,7
@@
guint processlist_get_height(ProcessList *process_list)
}
}
-gint processlist_get_process_pixels( ProcessList *process_list,
+
__inline
gint processlist_get_process_pixels( ProcessList *process_list,
guint pid, guint cpu, LttTime *birth, guint trace_num,
guint *y,
guint *height,
guint pid, guint cpu, LttTime *birth, guint trace_num,
guint *y,
guint *height,
@@
-587,7
+591,10
@@
gint processlist_get_process_pixels( ProcessList *process_list,
HashedProcessData *hashed_process_data = NULL;
Process_Info.pid = pid;
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;
Process_Info.birth = *birth;
Process_Info.trace_num = trace_num;
@@
-616,7
+623,7
@@
gint processlist_get_process_pixels( ProcessList *process_list,
}
}
-gint processlist_get_pixels_from_data( ProcessList *process_list,
+
__inline
gint processlist_get_pixels_from_data( ProcessList *process_list,
ProcessInfo *process_info,
HashedProcessData *hashed_process_data,
guint *y,
ProcessInfo *process_info,
HashedProcessData *hashed_process_data,
guint *y,
@@
-638,9
+645,8
@@
gint processlist_get_pixels_from_data( ProcessList *process_list,
}
}
-static guint get_cpu_number_from_name(GQuark name)
+static
__inline
guint get_cpu_number_from_name(GQuark name)
{
{
- /* remember / */
const gchar *string;
char *begin;
guint cpu;
const gchar *string;
char *begin;
guint cpu;
This page took
0.025665 seconds
and
4
git commands to generate.