diff options
Diffstat (limited to 'procps/top.c')
-rw-r--r-- | procps/top.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/procps/top.c b/procps/top.c index 8d732d4b2..d1fbfe6e1 100644 --- a/procps/top.c +++ b/procps/top.c | |||
@@ -50,12 +50,13 @@ struct save_hist { | |||
50 | unsigned long ticks; | 50 | unsigned long ticks; |
51 | unsigned pid; | 51 | unsigned pid; |
52 | }; | 52 | }; |
53 | #if ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE | ||
53 | static struct save_hist *prev_hist; | 54 | static struct save_hist *prev_hist; |
54 | static int prev_hist_count; | 55 | static int prev_hist_count; |
55 | /* static int hist_iterations; */ | 56 | /* static int hist_iterations; */ |
56 | static unsigned total_pcpu; | 57 | static unsigned total_pcpu; |
57 | /* static unsigned long total_rss; */ | 58 | /* static unsigned long total_rss; */ |
58 | 59 | #endif | |
59 | 60 | ||
60 | #define OPT_BATCH_MODE (option_mask32 & 0x4) | 61 | #define OPT_BATCH_MODE (option_mask32 & 0x4) |
61 | 62 | ||
@@ -485,7 +486,9 @@ int top_main(int argc, char **argv) | |||
485 | top[n].pid = p->pid; | 486 | top[n].pid = p->pid; |
486 | top[n].ppid = p->ppid; | 487 | top[n].ppid = p->ppid; |
487 | top[n].rss = p->rss; | 488 | top[n].rss = p->rss; |
489 | #if ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE | ||
488 | top[n].ticks = p->stime + p->utime; | 490 | top[n].ticks = p->stime + p->utime; |
491 | #endif | ||
489 | top[n].uid = p->uid; | 492 | top[n].uid = p->uid; |
490 | strcpy(top[n].state, p->state); | 493 | strcpy(top[n].state, p->state); |
491 | strcpy(top[n].comm, p->comm); | 494 | strcpy(top[n].comm, p->comm); |