diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2024-09-21 16:24:02 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2024-09-21 16:24:02 -0700 |
commit | 8a49d1650f8b7c223c921af0bbf6f5204b93402e (patch) | |
tree | 3d4093a9877f7b0954cbd809688331f83ea1661d /src/libvmon/vmon.c | |
parent | e02654ff390253854338f4f586286f4e07912a96 (diff) |
libvmon: maintain a flag indicating if a process is threaded
Preparatory commit for enabling charts to apply % scaling to
non-threaded procesess, to make better use of the row's available
space.
A non-threaded process can't use more than a single core, so it
should be able to scale its %age out to the full row height. The
same will be applied to individual thread rows, as those can at
most use a single core.
The exception is a threaded process - its CPU %ages are
aggregate, and must represent up to the number of CPUs in the
system within their row.
Diffstat (limited to 'src/libvmon/vmon.c')
-rw-r--r-- | src/libvmon/vmon.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libvmon/vmon.c b/src/libvmon/vmon.c index 2815d2e..baee17d 100644 --- a/src/libvmon/vmon.c +++ b/src/libvmon/vmon.c @@ -1178,6 +1178,7 @@ vmon_proc_t * vmon_proc_monitor(vmon_t *vmon, vmon_proc_t *parent, int pid, vmon if (is_thread) { list_add_tail(&proc->threads, &parent->threads); parent->threads_changed = 1; + parent->is_threaded = 1; } else { list_add_tail(&proc->siblings, &parent->children); parent->children_changed = 1; |