From: Jim Warner Date: Sun, 24 May 2020 05:00:00 +0000 (-0500) Subject: top: bump up that PRETEND8CPUS #define to PRETEND48CPU X-Git-Tag: v3.3.17rc1~66 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a8a6005d3244a986cf96c267dce19dfe480a5c7b;p=procps-ng top: bump up that PRETEND8CPUS #define to PRETEND48CPU This patch simply allows for better testing of our two new toggles: '4' (2 abreast) plus '!' (combined cpus). Signed-off-by: Jim Warner --- diff --git a/top/top.c b/top/top.c index 9a0ce86e..2ba64f07 100644 --- a/top/top.c +++ b/top/top.c @@ -2547,7 +2547,7 @@ static void cpus_refresh (void) { // now value each separate cpu's tics... for (i = 0; i < sumSLOT; i++) { CPU_t *cpu_ptr = &Cpu_tics[i]; // avoid gcc subscript bloat -#ifdef PRETEND8CPUS +#ifdef PRETEND48CPU bp = buf; #endif bp = 1 + strchr(bp, '\n'); @@ -2563,7 +2563,7 @@ static void cpus_refresh (void) { #ifndef CPU_ZEROTICS cpu_ptr->edge = sum_ptr->edge; #endif -#ifdef PRETEND8CPUS +#ifdef PRETEND48CPU cpu_ptr->id = i; #endif /* henceforth, with just a little more arithmetic we can avoid @@ -2822,7 +2822,7 @@ static void sysinfo_refresh (int forced) { /*** hotplug_acclimated ***/ if (3 <= cur_secs - sav_secs) { meminfo(); -#ifndef PRETEND8CPUS +#ifndef PRETEND48CPU cpuinfo(); #endif Numa_node_tot = numa_max_node() + 1; @@ -3644,8 +3644,8 @@ static void before (char *me) { // establish cpu particulars cpuinfo(); -#ifdef PRETEND8CPUS - smp_num_cpus = 8; +#ifdef PRETEND48CPU + smp_num_cpus = 48; #endif Cpu_States_fmts = N_unq(STATE_lin2x4_fmt); if (linux_version_code > LINUX_VERSION(2, 5, 41)) diff --git a/top/top.h b/top/top.h index 7ec39922..2865d9ff 100644 --- a/top/top.h +++ b/top/top.h @@ -45,7 +45,7 @@ //#define OFF_STDIOLBF /* disable our own stdout _IOFBF override */ //#define OFF_XTRAWIDE /* disable our extra wide multi-byte logic */ //#define PRETEND2_5_X /* pretend we're linux 2.5.x (for IO-wait) */ -//#define PRETEND8CPUS /* pretend we're smp with 8 ticsers (sic) */ +//#define PRETEND48CPU /* pretend we're smp with 48 ticsers (sic) */ //#define PRETENDNOCAP /* use a terminal without essential caps */ //#define QUICK_GRAPHS /* use fast algorithm, accept +2% distort */ //#define RCFILE_NOERR /* rcfile errs silently default, vs. fatal */