Commit 5c0d73f7 authored by Benoît Dejean's avatar Benoît Dejean

Fixed #450545. Released 2.19.6.

Fixed #450545.
Released 2.19.6.

svn path=/trunk/; revision=2102
parent 22c0aa45
New in 2.19.6 - 30 July 2007
* Use new Gtk+ treeview tooltip API when available. Christian Persch.
#459598.
* Added many comments for translators. #460511.
* More icons for processes.
* s/Gnome/GNOME/. #455826.
* Fixed CPU% when using dependencies and (My or Active). #450545.
* Little cleanups.
New in 2.19.5 - 9 July 2007
* Dynamically adjust graph lines to the graph height. Toby Dacre. #367016.
* Added kernel info and GNOME version to sysinfo. #399069.
......
......@@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.52)
AC_INIT([gnome-system-monitor], [2.19.5],
AC_INIT([gnome-system-monitor], [2.19.6],
[http://bugzilla.gnome.org/enter_bug.cgi?product=system-monitor])
AC_CONFIG_SRCDIR(configure.in)
AC_CONFIG_HEADERS(config.h)
......
......@@ -144,6 +144,14 @@ class ProcInfo
guint8 pcpu; /* 0% - 100% */
gint8 nice;
// private:
// tracks cpu time per process keeps growing because if a
// ProcInfo is deleted this does not mean that the process is
// not going to be recreated on the next update. For example,
// if dependencies + (My or Active), the proclist is cleared
// on each update. This is a workaround
static std::map<pid_t, guint64> cpu_times;
};
struct ProcData
......
......@@ -58,6 +58,7 @@ extern "C" {
ProcInfo::List ProcInfo::all;
std::map<pid_t, guint64> ProcInfo::cpu_times;
ProcInfo* ProcInfo::find(pid_t pid)
......@@ -757,7 +758,7 @@ update_info (ProcData *procdata, ProcInfo *info)
if (procdata->config.solaris_mode)
info->pcpu /= procdata->config.num_cpus;
info->cpu_time_last = proctime.rtime;
ProcInfo::cpu_times[info->pid] = info->cpu_time_last = proctime.rtime;
info->nice = procuid.nice;
info->ppid = procuid.ppid;
}
......@@ -793,7 +794,14 @@ ProcInfo::ProcInfo(pid_t pid)
info->arguments = g_strescape(info->tooltip, "\\\"");
g_strfreev(arguments);
info->cpu_time_last = proctime.rtime;
guint64 cpu_time = proctime.rtime;
std::map<pid_t, guint64>::iterator it(ProcInfo::cpu_times.find(pid));
if (it != ProcInfo::cpu_times.end())
{
if (proctime.rtime >= it->second)
cpu_time = it->second;
}
info->cpu_time_last = cpu_time;
info->start_time = proctime.start_time;
get_process_selinux_context (info);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment