summaryrefslogtreecommitdiffstats
path: root/Settings.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2008-03-08 23:39:48 +0000
committerHisham Muhammad <hisham@gobolinux.org>2008-03-08 23:39:48 +0000
commit93f091c47e54f8d5d150770a687c4cc76761c954 (patch)
treee789f43adeaa3e77e789d639703dab082bcc6e09 /Settings.c
parent52840406ac85943d47ed9311be8db86eedc1ea7a (diff)
BUGFIX: Fix display of CPU count for threaded processes.
When user threads are hidden, process now shows the sum of processor usage for all processors. When user threads are displayed, each thread shows its own processor usage, including the root thread. (thanks to Bert Wesarg for the report) Also, add option to display thread colors differently.
Diffstat (limited to 'Settings.c')
-rw-r--r--Settings.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Settings.c b/Settings.c
index a8ddc456..380bcc76 100644
--- a/Settings.c
+++ b/Settings.c
@@ -55,6 +55,7 @@ Settings* Settings_new(ProcessList* pl, Header* header) {
Header_defaultMeters(this->header);
pl->hideKernelThreads = true;
pl->highlightMegabytes = true;
+ pl->highlightThreads = false;
}
}
return this;
@@ -137,6 +138,8 @@ bool Settings_read(Settings* this, char* fileName) {
this->pl->highlightBaseName = atoi(option[1]);
} else if (String_eq(option[0], "highlight_megabytes")) {
this->pl->highlightMegabytes = atoi(option[1]);
+ } else if (String_eq(option[0], "highlight_threads")) {
+ this->pl->highlightThreads = atoi(option[1]);
} else if (String_eq(option[0], "header_margin")) {
this->header->margin = atoi(option[1]);
} else if (String_eq(option[0], "expand_system_time")) {
@@ -198,6 +201,7 @@ bool Settings_write(Settings* this) {
fprintf(fd, "shadow_other_users=%d\n", (int) this->pl->shadowOtherUsers);
fprintf(fd, "highlight_base_name=%d\n", (int) this->pl->highlightBaseName);
fprintf(fd, "highlight_megabytes=%d\n", (int) this->pl->highlightMegabytes);
+ fprintf(fd, "highlight_threads=%d\n", (int) this->pl->highlightThreads);
fprintf(fd, "tree_view=%d\n", (int) this->pl->treeView);
fprintf(fd, "header_margin=%d\n", (int) this->header->margin);
fprintf(fd, "detailed_cpu_time=%d\n", (int) this->pl->detailedCPUTime);

© 2014-2024 Faster IT GmbH | imprint | privacy policy