1 diff -Nrup gnome-system-monitor-2.25.91/configure.in gnome-system-monitor-2.25.91.mod/configure.in 2 --- gnome-system-monitor-2.25.91/configure.in 2009-02-17 02:07:36.000000000 +0800 3 +++ gnome-system-monitor-2.25.91.mod/configure.in 2009-03-04 10:31:31.831892000 +0800 4 @@ -56,13 +56,13 @@ if test "$GCC" = "yes" -a "$set_more_war 5 -Wcast-align -Wsign-compare \ 6 -std=gnu89 \ 7 $CFLAGS" 8 - CXXFLAGS="-Wall -std=c++98 $CXXFLAGS" 9 + CXXFLAGS="-Wall -std=c++98 $CXXFLAGS -features=extensions" 10 else 11 AC_MSG_RESULT(no) 12 fi 13 14 -dnl CXXFLAGS="-fvisibility=hidden -fvisibility-inlines-hidden $CXXFLAGS" 15 -dnl CXXFLAGS="-fvisibility-inlines-hidden $CXXFLAGS" 16 +dnl CXXFLAGS="-fvisibility=hidden -fvisibility-inlines-hidden -features=extensions $CXXFLAGS" 17 +dnl CXXFLAGS="-fvisibility-inlines-hidden -features=extensions $CXXFLAGS" 18 19 AM_GCONF_SOURCE_2 20 21 diff -Nrup gnome-system-monitor-2.25.91/src/load-graph.cpp gnome-system-monitor-2.25.91.mod/src/load-graph.cpp 22 --- gnome-system-monitor-2.25.91/src/load-graph.cpp 2008-08-31 21:29:57.000000000 +0800 23 +++ gnome-system-monitor-2.25.91.mod/src/load-graph.cpp 2009-03-04 11:26:07.230508000 +0800 24 @@ -405,7 +405,7 @@ net_scale (LoadGraph *g, unsigned din, u 25 // where factor10 is integer and x < 10 26 // so we new_max has only 1 significant digit 27 28 - unsigned factor10 = std::pow(10.0, std::floor(std::log10(coef10))); 29 + unsigned factor10 = std::pow(10.0, std::floor(std::log10((double)coef10))); 30 coef10 = std::ceil(coef10 / double(factor10)) * factor10; 31 32 // then make coef10 divisible by num_bars 33 @@ -414,10 +414,10 @@ net_scale (LoadGraph *g, unsigned din, u 34 g_assert(coef10 % g->num_bars() == 0); 35 36 new_max = coef10 * (1UL << (base10 * 10)); 37 - procman_debug("bak %u new_max %u pow2 %u coef10 %u", bak_max, new_max, pow2, coef10); 38 + //procman_debug("bak %u new_max %u pow2 %u coef10 %u", bak_max, new_max, pow2, coef10); 39 40 if (bak_max > new_max) { 41 - procman_debug("overflow detected: bak=%u new=%u", bak_max, new_max); 42 + //procman_debug("overflow detected: bak=%u new=%u", bak_max, new_max); 43 new_max = bak_max; 44 } 45 46 @@ -435,7 +435,7 @@ net_scale (LoadGraph *g, unsigned din, u 47 } 48 } 49 50 - procman_debug("rescale dmax = %u max = %u new_max = %u", dmax, g->net.max, new_max); 51 + //procman_debug("rescale dmax = %u max = %u new_max = %u", dmax, g->net.max, new_max); 52 53 g->net.max = new_max; 54 55 @@ -457,6 +457,24 @@ get_net (LoadGraph *g) 56 unsigned din, dout; 57 gchar *text1; 58 59 + /* we have to optimize the performance of libgtop, because in some low 60 + level machine, to update the information will occupy too much cpu. 61 + 62 + Here I would like to make a little update: 63 + set netlist.flags=1 64 + so as to let glibtop_get_netlist() only return the ones whose first 65 + character of name is the same withthe first one in their module, 66 + glibtop_get_netload() just try to find these devices, for example, 67 + bge0 and bge... 68 + 69 + We do the check in glibtop_get_netlist(), I think this will 70 + accelerate the transaction lots. Also this will not affect the 71 + existing codes, because when nobody set glibtop_netlist.flags, 72 + glibtop_get_netlist() will return all devices with class "net". 73 + */ 74 + 75 + netlist.flags = 1; 76 + 77 ifnames = glibtop_get_netlist(&netlist); 78 79 for (i = 0; i < netlist.number; ++i) 80 diff -Nrup gnome-system-monitor-2.25.91/src/lsof.cpp gnome-system-monitor-2.25.91.mod/src/lsof.cpp 81 --- gnome-system-monitor-2.25.91/src/lsof.cpp 2008-05-24 05:44:00.000000000 +0800 82 +++ gnome-system-monitor-2.25.91.mod/src/lsof.cpp 2009-03-04 10:16:57.082704000 +0800 83 @@ -95,13 +95,13 @@ namespace 84 85 GUI() 86 { 87 - procman_debug("New Lsof GUI %p", this); 88 + //procman_debug("New Lsof GUI %p", this); 89 } 90 91 92 ~GUI() 93 { 94 - procman_debug("Destroying Lsof GUI %p", this); 95 + //procman_debug("Destroying Lsof GUI %p", this); 96 } 97 98 99 diff -Nrup gnome-system-monitor-2.25.91/src/openfiles.cpp gnome-system-monitor-2.25.91.mod/src/openfiles.cpp 100 --- gnome-system-monitor-2.25.91/src/openfiles.cpp 2008-09-12 03:55:34.000000000 +0800 101 +++ gnome-system-monitor-2.25.91.mod/src/openfiles.cpp 2009-03-04 11:54:44.460430000 +0800 102 @@ -67,7 +67,7 @@ friendlier_hostname(const char *addr_str 103 goto failsafe; 104 105 if (getnameinfo(res->ai_addr, res->ai_addrlen, hostname, 106 - sizeof hostname, service, sizeof service, NI_IDN)) 107 + sizeof hostname, service, sizeof service, NI_MAXSERV)) 108 goto failsafe; 109 110 if (res) freeaddrinfo(res); 111 diff -Nrup gnome-system-monitor-2.25.91/src/prettytable.cpp gnome-system-monitor-2.25.91.mod/src/prettytable.cpp 112 --- gnome-system-monitor-2.25.91/src/prettytable.cpp 2009-01-19 02:01:09.000000000 +0800 113 +++ gnome-system-monitor-2.25.91.mod/src/prettytable.cpp 2009-03-04 10:17:07.130460000 +0800 114 @@ -77,7 +77,7 @@ PrettyTable::register_application(pid_t 115 info->set_icon(icon); 116 // move the ref to the map 117 this->apps[pid] = icon; 118 - procman_debug("WNCK OK for %u", unsigned(pid)); 119 + //procman_debug("WNCK OK for %u", unsigned(pid)); 120 } 121 } 122 123 @@ -229,7 +229,7 @@ PrettyTable::set_icon(ProcInfo &info) 124 getters.push_back(&PrettyTable::get_icon_from_name); 125 if (has_kthreadd()) 126 { 127 - procman_debug("kthreadd is running with PID 2"); 128 + //procman_debug("kthreadd is running with PID 2"); 129 getters.push_back(&PrettyTable::get_icon_for_kernel); 130 } 131 getters.push_back(&PrettyTable::get_icon_dummy); 132 diff -Nrup gnome-system-monitor-2.25.91/src/procactions.cpp gnome-system-monitor-2.25.91.mod/src/procactions.cpp 133 --- gnome-system-monitor-2.25.91/src/procactions.cpp 2007-01-03 06:15:36.000000000 +0800 134 +++ gnome-system-monitor-2.25.91.mod/src/procactions.cpp 2009-02-22 19:58:20.190256000 +0800 135 @@ -128,6 +128,15 @@ kill_single_process (GtkTreeModel *model 136 if (!info) 137 return; 138 139 + /* 140 + * If the process 0 is a system process, we can't control it even as root 141 + */ 142 + if ((args->signal == SIGTERM) || (args->signal == SIGKILL)){ 143 + if (info->pid == 0) 144 + return; 145 + } 146 + /* if it is not a system process, we can kill it now */ 147 + 148 error = kill (info->pid, args->signal); 149 150 /* success */ 151 diff -Nrup gnome-system-monitor-2.25.91/src/procdialogs.cpp gnome-system-monitor-2.25.91.mod/src/procdialogs.cpp 152 --- gnome-system-monitor-2.25.91/src/procdialogs.cpp 2008-05-24 05:44:00.000000000 +0800 153 +++ gnome-system-monitor-2.25.91.mod/src/procdialogs.cpp 2009-03-04 10:17:21.908309000 +0800 154 @@ -342,7 +342,7 @@ private: 155 g_error_free(e); 156 } 157 158 - procman_debug("set %s to %d", this->gconf_key.c_str(), new_value); 159 + //procman_debug("set %s to %d", this->gconf_key.c_str(), new_value); 160 } 161 162 const string gconf_key; 163 @@ -659,7 +659,10 @@ procdialog_create_preferences_dialog (Pr 164 gtk_box_pack_start (GTK_BOX (hbox2), hbox3, TRUE, TRUE, 0); 165 166 update = (gfloat) procdata->config.graph_update_interval; 167 - adjustment = (GtkAdjustment *) gtk_adjustment_new(update / 1000.0, 0.25, 168 + /* The interval is too small, and in some low level machine, 169 + cause gconf can't work, so set its min value 1 sec*/ 170 + /*adjustment = (GtkAdjustment *) gtk_adjustment_new(update / 1000.0, 0.25,*/ 171 + adjustment = (GtkAdjustment *) gtk_adjustment_new(update / 1000.0, 1, 172 100.0, 0.25, 1.0, 1.0); 173 spin_button = gtk_spin_button_new (adjustment, 1.0, 2); 174 g_signal_connect (G_OBJECT (spin_button), "focus_out_event", 175 @@ -803,7 +806,7 @@ procdialog_create_root_password_dialog(P 176 177 command = procman_action_to_command(type, pid, extra_value); 178 179 - procman_debug("Trying to run '%s' as root", command); 180 + //procman_debug("Trying to run '%s' as root", command); 181 182 if (procman_has_gksu()) 183 ret = procman_gksu_create_root_password_dialog(command); 184 diff -Nrup gnome-system-monitor-2.25.91/src/procman.cpp gnome-system-monitor-2.25.91.mod/src/procman.cpp 185 --- gnome-system-monitor-2.25.91/src/procman.cpp 2009-01-03 20:06:10.000000000 +0800 186 +++ gnome-system-monitor-2.25.91.mod/src/procman.cpp 2009-03-04 10:22:32.037096000 +0800 187 @@ -147,7 +147,10 @@ timeouts_changed_cb (GConfClient *client 188 procdata->config.graph_update_interval = gconf_value_get_int (value); 189 procdata->config.graph_update_interval = 190 MAX (procdata->config.graph_update_interval, 191 - 250); 192 + /* The interval is too small, and in some low level machine, 193 + cause gconf can't work, so set its min value 1 sec*/ 194 + /* 250);*/ 195 + 1000); 196 load_graph_change_speed(procdata->cpu_graph, 197 procdata->config.graph_update_interval); 198 load_graph_change_speed(procdata->mem_graph, 199 @@ -332,10 +335,14 @@ procman_data_new (GConfClient *client) 200 /* Sanity checks */ 201 swidth = gdk_screen_width (); 202 sheight = gdk_screen_height (); 203 - pd->config.width = CLAMP (pd->config.width, 50, swidth); 204 - pd->config.height = CLAMP (pd->config.height, 50, sheight); 205 + pd->config.width = CLAMP (pd->config.width, 50, swidth-2); /* there is a bug in gtk I think, when the width/height 206 + become the biggest, the windows alway biggest, so -2 */ 207 + pd->config.height = CLAMP (pd->config.height, 50, sheight-2); 208 pd->config.update_interval = MAX (pd->config.update_interval, 1000); 209 - pd->config.graph_update_interval = MAX (pd->config.graph_update_interval, 250); 210 + /* The interval is too small, and in some low level machine, 211 + cause gconf can't work, so set its min value 1 sec*/ 212 + /*pd->config.graph_update_interval = MAX (pd->config.graph_update_interval, 250);*/ 213 + pd->config.graph_update_interval = MAX (pd->config.graph_update_interval, 1000); 214 pd->config.disks_update_interval = MAX (pd->config.disks_update_interval, 1000); 215 pd->config.whose_process = CLAMP (pd->config.whose_process, 0, 2); 216 pd->config.current_tab = CLAMP(pd->config.current_tab, 217 @@ -598,9 +605,9 @@ cb_server (const gchar *msg, gpointer us 218 procdata = *(ProcData**)user_data; 219 g_assert (procdata != NULL); 220 221 - procman_debug("cb_server(%s)", msg); 222 + //procman_debug("cb_server(%s)", msg); 223 if (msg != NULL && procman::SHOW_SYSTEM_TAB_CMD == msg) { 224 - procman_debug("Changing to PROCMAN_TAB_SYSINFO via bacon message"); 225 + //procman_debug("Changing to PROCMAN_TAB_SYSINFO via bacon message"); 226 gtk_notebook_set_current_page(GTK_NOTEBOOK(procdata->notebook), PROCMAN_TAB_SYSINFO); 227 cb_change_current_page(GTK_NOTEBOOK(procdata->notebook), PROCMAN_TAB_SYSINFO, procdata); 228 } else 229 @@ -677,7 +684,7 @@ main (int argc, char *argv[]) 230 231 Gio::init(); 232 Gtk::Main kit(&argc, &argv); 233 - procman_debug("post gtk_init"); 234 + //procman_debug("post gtk_init"); 235 236 conn = bacon_message_connection_new ("gnome-system-monitor"); 237 if (!conn) g_error("Couldn't connect to gnome-system-monitor"); 238 @@ -715,14 +722,14 @@ main (int argc, char *argv[]) 239 240 glibtop_init (); 241 242 - procman_debug("end init"); 243 + //procman_debug("end init"); 244 245 procdata = procman_data_new (client); 246 procdata->client = client; 247 248 - procman_debug("begin create_main_window"); 249 + //procman_debug("begin create_main_window"); 250 create_main_window (procdata); 251 - procman_debug("end create_main_window"); 252 + //procman_debug("end create_main_window"); 253 254 // proctable_update_all (procdata); 255 256 @@ -731,14 +738,14 @@ main (int argc, char *argv[]) 257 g_assert(procdata->app); 258 259 if (option_group.show_system_tab) { 260 - procman_debug("Starting with PROCMAN_TAB_SYSINFO by commandline request"); 261 + //procman_debug("Starting with PROCMAN_TAB_SYSINFO by commandline request"); 262 gtk_notebook_set_current_page(GTK_NOTEBOOK(procdata->notebook), PROCMAN_TAB_SYSINFO); 263 cb_change_current_page (GTK_NOTEBOOK(procdata->notebook), PROCMAN_TAB_SYSINFO, procdata); 264 } 265 266 gtk_widget_show(procdata->app); 267 268 - procman_debug("begin gtk_main"); 269 + //procman_debug("begin gtk_main"); 270 kit.run(); 271 272 procman_free_data (procdata); 273 diff -Nrup gnome-system-monitor-2.25.91/src/proctable.cpp gnome-system-monitor-2.25.91.mod/src/proctable.cpp 274 --- gnome-system-monitor-2.25.91/src/proctable.cpp 2008-09-14 05:25:03.000000000 +0800 275 +++ gnome-system-monitor-2.25.91.mod/src/proctable.cpp 2009-03-04 12:05:57.166912000 +0800 276 @@ -197,7 +197,7 @@ search_equal_func(GtkTreeModel *model, 277 278 279 GtkWidget * 280 -proctable_new (ProcData * const procdata) 281 +proctable_new (ProcData * procdata) 282 { 283 GtkWidget *proctree; 284 GtkWidget *scrolled; 285 @@ -487,6 +487,18 @@ static void get_process_memory_writable( 286 glibtop_proc_map buf; 287 glibtop_map_entry *maps; 288 289 + /* we have to optimize the performance of libgtop, because update the information will occupy too much cpu. 290 + 291 + here I would like to make a little update:set glibtop_proc_map.flags=1,so as to let glibtop_get_proc_map_s() 292 + only return the ones this function need: memwritable 293 + 294 + we do the check in glibtop_get_proc_map_s(), don't run the others part which don't need by this function, 295 + I think this will accelerate the transaction lots, 296 + Also this will not affect the existing codes, because when nobody set glibtop_proc_map.flags, 297 + glibtop_get_proc_map() will return all as before. zhua 298 + */ 299 + buf.flags = 1; 300 + 301 maps = glibtop_get_proc_map(&buf, info->pid); 302 303 gulong memwritable = 0; 304 @@ -498,6 +510,9 @@ static void get_process_memory_writable( 305 #else 306 if (maps[i].perm & GLIBTOP_MAP_PERM_WRITE) 307 memwritable += maps[i].size; 308 + 309 + if (maps[i].perm & GLIBTOP_MAP_PERM_SHARED) 310 + info->memshared += maps[i].shared_clean; 311 #endif 312 } 313 314 @@ -517,13 +532,20 @@ get_process_memory_info(ProcInfo *info) 315 info->pid, 316 &xresources); 317 318 - glibtop_get_proc_mem(&procmem, info->pid); 319 + info->memxserver = xresources.total_bytes_estimate; 320 + 321 +/* zhua: use get_process_memory_writable(), because it just call glibtop_get_proc_map_s(), 322 + can get shared memory and writable memory, others: vmsize & memres, will be 323 + get in procstate from glibtop_get_proc_state()*/ 324 +/* glibtop_get_proc_mem(&procmem, info->pid); 325 + 326 327 info->vmsize = procmem.vsize; 328 info->memres = procmem.resident; 329 info->memshared = procmem.share; 330 331 info->memxserver = xresources.total_bytes_estimate; 332 +*/ 333 334 get_process_memory_writable(info); 335 336 @@ -597,7 +619,7 @@ insert_info_to_tree (ProcInfo *info, Pro 337 338 procdata->pretty_table.set_icon(*info); 339 340 - procman_debug("inserted %d%s", info->pid, (forced ? " (forced)" : "")); 341 + //procman_debug("inserted %d%s", info->pid, (forced ? " (forced)" : "")); 342 } 343 344 345 @@ -612,12 +634,12 @@ remove_info_from_tree (ProcData *procdat 346 GtkTreeIter child_node; 347 348 if (std::find(orphans.begin(), orphans.end(), current) != orphans.end()) { 349 - procman_debug("[%u] %d already removed from tree", lvl, int(current->pid)); 350 + //procman_debug("[%u] %d already removed from tree", lvl, int(current->pid)); 351 return; 352 } 353 354 - procman_debug("[%u] pid %d, %d children", lvl, int(current->pid), 355 - gtk_tree_model_iter_n_children(model, ¤t->node)); 356 + //procman_debug("[%u] pid %d, %d children", lvl, int(current->pid), 357 + // gtk_tree_model_iter_n_children(model, ¤t->node)); 358 359 // it is not possible to iterate&erase over a treeview so instead we 360 // just pop one child after another and recursively remove it and 361 @@ -655,15 +677,20 @@ update_info (ProcData *procdata, ProcInf 362 glibtop_get_proc_state (&procstate, info->pid); 363 info->status = procstate.state; 364 365 + /* zhua: let's delete this call, because we can get the value 366 + from glibtop_get_proc_state 367 glibtop_get_proc_uid (&procuid, info->pid); 368 + */ 369 glibtop_get_proc_time (&proctime, info->pid); 370 371 - get_process_memory_info(info); 372 + get_process_memory_info(info);/* get shared/writable/xserver memory */ 373 374 - info->set_user(procstate.uid); 375 + info->set_user(procstate.uid);/* get user of process */ 376 377 + /* zhua: let's get from file directly 378 info->pcpu = (proctime.rtime - info->cpu_time) * 100 / procdata->cpu_total_time; 379 info->pcpu = MIN(info->pcpu, 100); 380 + */ 381 382 if (procdata->config.solaris_mode) 383 info->pcpu /= procdata->config.num_cpus; 384 @@ -671,6 +698,17 @@ update_info (ProcData *procdata, ProcInf 385 ProcInfo::cpu_times[info->pid] = info->cpu_time = proctime.rtime; 386 info->nice = procuid.nice; 387 info->ppid = procuid.ppid; 388 + 389 + /* zhua: get nice/ppid from procstate */ 390 + // info->nice = procstate.nice; 391 + 392 + /* zhua: get start_time from procstate */ 393 + info->start_time = procstate.start_time; 394 + 395 + info->vmsize = procstate.vsize; 396 + info->memres = procstate.resident; 397 + 398 + // info->pcpu = procstate.load; 399 } 400 401 402 @@ -712,7 +750,13 @@ ProcInfo::ProcInfo(pid_t pid) 403 cpu_time = it->second; 404 } 405 info->cpu_time = cpu_time; 406 - info->start_time = proctime.start_time; 407 + /* zhua: get start_time/nice/ppid from procstate */ 408 + info->start_time = procstate.start_time; 409 + info->nice = procstate.nice; 410 + /* zhua */ 411 + info->vmsize = procstate.vsize; 412 + info->memres = procstate.resident; 413 + info->pcpu = procstate.load; 414 415 get_process_selinux_context (info); 416 } 417 @@ -757,7 +801,7 @@ refresh_list (ProcData *procdata, const 418 ++next; 419 420 if (pids.find(info->pid) == pids.end()) { 421 - procman_debug("ripping %d", info->pid); 422 + //procman_debug("ripping %d", info->pid); 423 remove_info_from_tree(procdata, model, info, addition); 424 addition.remove(info); 425 ProcInfo::all.erase(it); 426 @@ -785,12 +829,12 @@ refresh_list (ProcData *procdata, const 427 428 429 while (not addition.empty()) { 430 - procman_debug("looking for %d parents", int(addition.size())); 431 + //procman_debug("looking for %d parents", int(addition.size())); 432 ProcList::iterator it(addition.begin()); 433 434 while (it != addition.end()) { 435 - procman_debug("looking for %d's parent with ppid %d", 436 - int((*it)->pid), int((*it)->ppid)); 437 + //procman_debug("looking for %d's parent with ppid %d", 438 + //int((*it)->pid), int((*it)->ppid)); 439 440 441 // inserts the process in the treeview if : 442 @@ -880,9 +924,11 @@ proctable_update_list (ProcData * const 443 444 /* FIXME: total cpu time elapsed should be calculated on an individual basis here 445 ** should probably have a total_time_last gint in the ProcInfo structure */ 446 +/* zhua: delete these sentences, we can get cpu% from file directly. 447 glibtop_get_cpu (&cpu); 448 procdata->cpu_total_time = MAX(cpu.total - procdata->cpu_total_time_last, 1); 449 procdata->cpu_total_time_last = cpu.total; 450 +*/ 451 452 refresh_list (procdata, pid_list, proclist.number); 453 454 @@ -895,7 +941,7 @@ proctable_update_list (ProcData * const 455 456 457 void 458 -proctable_update_all (ProcData * const procdata) 459 +proctable_update_all (ProcData * procdata) 460 { 461 char* string; 462 463 diff -Nrup gnome-system-monitor-2.25.91/src/selection.cpp gnome-system-monitor-2.25.91.mod/src/selection.cpp 464 --- gnome-system-monitor-2.25.91/src/selection.cpp 2007-06-30 02:28:26.000000000 +0800 465 +++ gnome-system-monitor-2.25.91.mod/src/selection.cpp 2009-03-04 12:00:41.995124000 +0800 466 @@ -33,10 +33,10 @@ namespace procman 467 if (ProcInfo* proc = ProcInfo::find(*it)) 468 { 469 gtk_tree_selection_select_iter(selection, &proc->node); 470 - procman_debug("Re-selected process %u", unsigned(*it)); 471 + //procman_debug("Re-selected process %u", unsigned(*it)); 472 } 473 - else 474 - procman_debug("Could not find process %u, cannot re-select it", unsigned(*it)); 475 + //else 476 + //procman_debug("Could not find process %u, cannot re-select it", unsigned(*it)); 477 } 478 } 479 } 480 diff -Nrup gnome-system-monitor-2.25.91/src/smooth_refresh.cpp gnome-system-monitor-2.25.91.mod/src/smooth_refresh.cpp 481 --- gnome-system-monitor-2.25.91/src/smooth_refresh.cpp 2009-01-19 02:16:39.000000000 +0800 482 +++ gnome-system-monitor-2.25.91.mod/src/smooth_refresh.cpp 2009-03-04 11:31:10.615230000 +0800 483 @@ -65,7 +65,7 @@ void SmoothRefresh::load_gconf_value(GCo 484 this->active = value ? gconf_value_get_bool(value) : KEY_DEFAULT_VALUE; 485 486 if (this->active) 487 - procman_debug("smooth_refresh is enabled"); 488 + //procman_debug("smooth_refresh is enabled"); 489 490 if (own_value and value) 491 gconf_value_free(value); 492 @@ -159,10 +159,10 @@ SmoothRefresh::get(guint &new_interval) 493 494 495 if (changed) { 496 - procman_debug("CPU usage is %3u%%, changed refresh_interval to %u (config %u)", 497 + /*procman_debug("CPU usage is %3u%%, changed refresh_interval to %u (config %u)", 498 this->last_pcpu, 499 this->interval, 500 - config_interval); 501 + config_interval);*/ 502 } 503 504 g_assert(this->interval == new_interval); 505 diff -Nrup gnome-system-monitor-2.25.91/src/sysinfo.cpp gnome-system-monitor-2.25.91.mod/src/sysinfo.cpp 506 --- gnome-system-monitor-2.25.91/src/sysinfo.cpp 2009-01-21 05:13:28.000000000 +0800 507 +++ gnome-system-monitor-2.25.91.mod/src/sysinfo.cpp 2009-03-04 10:18:54.373979000 +0800 508 @@ -273,7 +273,7 @@ namespace { 509 channel->close(); 510 Glib::spawn_close_pid(pid); 511 512 - procman_debug("lsb_release output = '%s'", content.c_str()); 513 + //procman_debug("lsb_release output = '%s'", content.c_str()); 514 515 string release, codename; 516 std::istringstream input(content); 517 diff -Nrup gnome-system-monitor-2.25.91/src/util.cpp gnome-system-monitor-2.25.91.mod/src/util.cpp 518 --- gnome-system-monitor-2.25.91/src/util.cpp 2009-02-17 02:21:44.000000000 +0800 519 +++ gnome-system-monitor-2.25.91.mod/src/util.cpp 2009-03-04 10:21:38.634398000 +0800 520 @@ -192,7 +192,7 @@ load_symbols(const char *module, ...) 521 if (!mod) 522 return FALSE; 523 524 - procman_debug("Found %s", module); 525 + //procman_debug("Found %s", module); 526 527 va_start(args, module); 528 529 @@ -208,10 +208,10 @@ load_symbols(const char *module, ...) 530 symbol = va_arg(args, void**); 531 532 if (g_module_symbol(mod, name, symbol)) { 533 - procman_debug("Loaded %s from %s", name, module); 534 + //procman_debug("Loaded %s from %s", name, module); 535 } 536 else { 537 - procman_debug("Could not load %s from %s", name, module); 538 + //procman_debug("Could not load %s from %s", name, module); 539 found_all = FALSE; 540 break; 541 } 542 diff -Nrup gnome-system-monitor-2.26.0/src/util.h gnome-system-monitor-2.26.0-new/src/util.h 543 --- gnome-system-monitor-2.26.0/src/util.h 2009-02-27 21:50:16.000000000 +0000 544 +++ gnome-system-monitor-2.26.0-new/src/util.h 2009-04-09 13:50:15.164866011 +0100 545 @@ -46,7 +46,7 @@ procman_debug_real(const char *file, int 546 inline string make_string(char *c_str) 547 { 548 if (!c_str) { 549 - procman_debug("NULL string"); 550 + //procman_debug("NULL string"); 551 return string(); 552 } 553