gnome-system-monitor r2420 - trunk/src



Author: bdejean
Date: Mon May 26 17:05:14 2008
New Revision: 2420
URL: http://svn.gnome.org/viewvc/gnome-system-monitor?rev=2420&view=rev

Log:
Merge branch 'wchan'


Modified:
   trunk/src/procman.h
   trunk/src/proctable.cpp
   trunk/src/proctable.h

Modified: trunk/src/procman.h
==============================================================================
--- trunk/src/procman.h	(original)
+++ trunk/src/procman.h	Mon May 26 17:05:14 2008
@@ -103,6 +103,8 @@
   // shared, don't free it !
   const gchar* user;
 
+  gchar wchan[40];
+
   // all these members are filled with libgtop which uses
   // guint64 (to have fixed size data) but we don't need more
   // than an unsigned long (even for 32bit apps on a 64bit

Modified: trunk/src/proctable.cpp
==============================================================================
--- trunk/src/proctable.cpp	(original)
+++ trunk/src/proctable.cpp	Mon May 26 17:05:14 2008
@@ -33,6 +33,7 @@
 #include <glibtop/proctime.h>
 #include <glibtop/procuid.h>
 #include <glibtop/procargs.h>
+#include <glibtop/prockernel.h>
 #include <glibtop/mem.h>
 #include <glibtop/swap.h>
 #include <sys/stat.h>
@@ -222,12 +223,11 @@
 		N_("Security Context"),
 		N_("Command Line"),
 		N_("Memory"),
+		N_("wchan"),
 		NULL,
 		"POINTER"
 	};
 
-	g_assert(COL_MEM == 15);
-
 	gint i;
 
 	scrolled = gtk_scrolled_window_new (NULL, NULL);
@@ -252,6 +252,7 @@
 				    G_TYPE_STRING,	/* Security Context */
 				    G_TYPE_STRING,	/* Arguments	*/
 				    G_TYPE_ULONG,	/* Memory       */
+				    G_TYPE_STRING,	/* wchan	*/
 				    GDK_TYPE_PIXBUF,	/* Icon		*/
 				    G_TYPE_POINTER,	/* ProcInfo	*/
 				    G_TYPE_STRING	/* Sexy tooltip */
@@ -294,7 +295,7 @@
 	gtk_tree_view_set_expander_column (GTK_TREE_VIEW (proctree), column);
 
 
-	for (i = COL_USER; i <= COL_MEM; i++) {
+	for (i = COL_USER; i <= COL_WCHAN; i++) {
 
 		GtkCellRenderer *cell;
 		GtkTreeViewColumn *col;
@@ -547,6 +548,7 @@
 	tree_store_update(model, &info->node, COL_START_TIME, info->start_time);
 	tree_store_update(model, &info->node, COL_NICE, info->nice);
 	tree_store_update(model, &info->node, COL_MEM, info->mem);
+	tree_store_update(model, &info->node, COL_WCHAN, info->wchan);
 }
 
 
@@ -639,6 +641,10 @@
 	glibtop_proc_state procstate;
 	glibtop_proc_uid procuid;
 	glibtop_proc_time proctime;
+	glibtop_proc_kernel prockernel;
+
+	glibtop_get_proc_kernel(&prockernel, info->pid);
+	g_strlcpy(info->wchan, prockernel.wchan, sizeof info->wchan);
 
 	glibtop_get_proc_state (&procstate, info->pid);
 	info->status = procstate.state;

Modified: trunk/src/proctable.h
==============================================================================
--- trunk/src/proctable.h	(original)
+++ trunk/src/proctable.h	Mon May 26 17:05:14 2008
@@ -42,6 +42,7 @@
 	COL_SECURITYCONTEXT,
 	COL_ARGS,
 	COL_MEM,
+	COL_WCHAN,
 	COL_PIXBUF,
 	COL_POINTER,
 	COL_TOOLTIP,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]