top: provide a build option to change memory precision

When summary & task area memory scaling was introduced
in release 3.3.6, the memory field widths were widened
slightly so unscaled KiB values could be provided more
consistently and scaled values (beyond MiB) could show
3 decimal places of precision. However, some users may
prefer the former widths/precisions for memory fields.

This commit will provide a build time configure option
to return top to those former defaults as a compliment
to a new %CPU & %MEM field precision configure option.

Reference(s):
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=707648
commit 21e550bc08

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner 2013-05-14 00:00:00 -05:00 committed by Craig Small
parent 77abe18d01
commit 2ede50902f
2 changed files with 9 additions and 1 deletions

View File

@ -203,6 +203,14 @@ if test "x$enable_wide_percent" = xyes; then
AC_DEFINE(BOOST_PERCNT, 1, [provide extra precision under %CPU and %MEM for top]) AC_DEFINE(BOOST_PERCNT, 1, [provide extra precision under %CPU and %MEM for top])
fi fi
AC_ARG_ENABLE([wide-memory],
AS_HELP_STRING([--disable-wide-memory], [disable extra precision under memory fields for top]),
[disable_wide_memory=yes], []
)
if test "x$disable_wide_memory" = xyes; then
AC_DEFINE(NOBOOST_MEMS, 1, [disable extra precision under memory fields for top])
fi
DL_LIB= DL_LIB=
AC_ARG_ENABLE([numa], AC_ARG_ENABLE([numa],
AS_HELP_STRING([--disable-numa], [disable NUMA/Node support in top]), AS_HELP_STRING([--disable-numa], [disable NUMA/Node support in top]),

View File

@ -24,6 +24,7 @@
/* Defines represented in configure.ac ----------------------------- */ /* Defines represented in configure.ac ----------------------------- */
//#define BOOST_PERCNT /* enable extra precision for two % fields */ //#define BOOST_PERCNT /* enable extra precision for two % fields */
//#define NOBOOST_MEMS /* disable extra precision for mem fields */
//#define NUMA_DISABLE /* disable summary area NUMA/Nodes display */ //#define NUMA_DISABLE /* disable summary area NUMA/Nodes display */
//#define OOMEM_ENABLE /* enable the SuSE out-of-memory additions */ //#define OOMEM_ENABLE /* enable the SuSE out-of-memory additions */
//#define SIGNALS_LESS /* favor reduced signal load over response */ //#define SIGNALS_LESS /* favor reduced signal load over response */
@ -39,7 +40,6 @@
//#define INSP_OFFDEMO /* disable demo screens, issue msg instead */ //#define INSP_OFFDEMO /* disable demo screens, issue msg instead */
//#define INSP_SAVEBUF /* preserve 'Insp_buf' contents in a file */ //#define INSP_SAVEBUF /* preserve 'Insp_buf' contents in a file */
//#define INSP_SLIDE_1 /* when scrolling left/right don't move 8 */ //#define INSP_SLIDE_1 /* when scrolling left/right don't move 8 */
//#define NOBOOST_MEMS /* disable extra precision for mem fields */
//#define OFF_HST_HASH /* use BOTH qsort+bsrch vs. hashing scheme */ //#define OFF_HST_HASH /* use BOTH qsort+bsrch vs. hashing scheme */
//#define OFF_STDIOLBF /* disable our own stdout _IOFBF override */ //#define OFF_STDIOLBF /* disable our own stdout _IOFBF override */
//#define PRETEND2_5_X /* pretend we're linux 2.5.x (for IO-wait) */ //#define PRETEND2_5_X /* pretend we're linux 2.5.x (for IO-wait) */