summaryrefslogtreecommitdiff
path: root/external/bsd/top
AgeCommit message (Collapse)Author
2023-06-03bsd.own.mk: rename GCC_NO_* to CC_WNO_*lukem
Rename compiler-warning-disable variables from GCC_NO_warning to CC_WNO_warning where warning is the full warning name as used by the compiler. GCC_NO_IMPLICIT_FALLTHRU is CC_WNO_IMPLICIT_FALLTHROUGH Using the convention CC_compilerflag, where compilerflag is based on the full compiler flag name.
2022-07-15add pool usage to the output, sharing the line with swap data.mrg
looks like, eg: Swap: 64G Total, 135M Used, 64G Free / Pools: 16G Used future work: figure out the utilisation percentage like vmstat -m
2021-04-16go back to right-aligning the titles for CPU and WCPU.christos
2021-04-13apply -fcommon to sources that still rely upon it.mrg
2021-04-03- Bump field width for state to accommodate > 9 CPUschristos
- When star formatting to adjust the width, count the trailing number of digits starting backwards instead of using strcspn because the lwp name might contain other digits like wm0TxRx/10.
2020-11-17Support aarch64eb in */config.guess.rin
Cherry-picked from upstream: https://git.savannah.gnu.org/gitweb/?p=config.git;a=commit;h=1c4398015583eb77bc043234f5734be055e64bea Everything except external/apache2/llvm/dist/llvm/cmake/config.guess is patched, which is under vendor tag and cannot be modified. I expect that this file is not actually used as we use hand-crafted version of configure script instead of cmake for building LLVM. Note that external/apache2/llvm/autoconf/autoconf/config.guess has already been committed on Oct. 20, but commit message disappeared as cvs aborted due to "permission denied" when trying to modify the file mentioned above. Sorry for confusing you. Also note that GMP uses its own config.guess Patch for external/lgpl3/gmp/dist/config.guess is provided by ryo@. Thanks!
2019-10-13expand a buffer size to properly handle full-size 64 bit valuesmrg
2019-10-13introduce some common variables for use in GCC warning disables:mrg
GCC_NO_FORMAT_TRUNCATION -Wno-format-truncation (GCC 7/8) GCC_NO_STRINGOP_TRUNCATION -Wno-stringop-truncation (GCC 8) GCC_NO_STRINGOP_OVERFLOW -Wno-stringop-overflow (GCC 8) GCC_NO_CAST_FUNCTION_TYPE -Wno-cast-function-type (GCC 8) use these to turn off warnings for most GCC-8 complaints. many of these are false positives, most of the real bugs are already commited, or are yet to come. we plan to introduce versions of (some?) of these that use the "-Wno-error=" form, which still displays the warnings but does not make it an error, and all of the above will be re-considered as either being "fix me" (warning still displayed) or "warning is wrong."
2019-04-27simplify and explainchristos
2019-04-26for "countable" lwp names, try to display name*<count> instead of truncating.christos
2018-11-05Fix typo s/fron/from/maya
From dfive on freenode, thanks!
2018-10-30sysctl(KERN_BOPOTIME) started returning a struct timespec in 2009.kre
Update to match.... We're slow but we get there eventually! NFC for any of these programs, struct timeval and struct timespec are the same size, and only the tv_sec field of boottime is used, and that's unchanged.
2018-08-26Document the WCPU field.sevan
2018-06-06rats in my attic, mice in my top. i've had enough of these damn rodents.snj
2018-06-03top(1): revert 1.11eadler
This change breaks the expectations of users that would like a coredump of top(1). Other similar applications such as vmstat(1) don't do this. Since the change was just a courtesy, revert.
2018-06-02top(1): chdir to / at initeadler
This allows us to unmount whatever directory we happen to be in when we started top(1). ok phone
2018-05-31Fix read of unitialized array elements in top(1)kamil
The cp_old array is allocated with malloc(3) and its pointer is passed to percentages64(). In this function there happens a calculation of total_change, which value depends on the value inside the unitialized cp_old[] array. ==26662==WARNING: MemorySanitizer: use-of-uninitialized-value #0 0x268a2c in percentages64 /usr/src/external/bsd/top/bin/../dist/machine/m_netbsd.c:1341:6 #1 0x26748b in get_system_info /usr/src/external/bsd/top/bin/../dist/machine/m_netbsd.c:478:6 #2 0x25518e in do_display /usr/src/external/bsd/top/bin/../dist/top.c:507:5 #3 0x253038 in main /usr/src/external/bsd/top/bin/../dist/top.c:975:2 #4 0x21cad1 in ___start (/usr/bin/top+0x1cad1) SUMMARY: MemorySanitizer: use-of-uninitialized-value /usr/src/external/bsd/top/bin/../dist/machine/m_netbsd.c:1341:6 in percentages64 Exiting Fix this issue by changling malloc(3) with calloc(3). Detected with Memory Sanitizer during the integration of sanitizers with the NetBSD basesystem. Reported by <Yang Zheng>
2018-05-31Fix unitialized signal mask passed to sigaction(2) in top(1)kamil
Detected with Memory Sanitizer during the integration of sanitizers with the NetBSD basesystem. Reported by <Yang Zheng>
2017-02-01Update supporting files for components which rely on autoconf to allow systemssevan
introducing since release of software to be recognised. This should hopefully allow the builds to progress a littles further on systems such as the POWER8 which features a little endian 64-bit PowerPC CPU identified as ppc64le.
2017-01-12Fix couple of typos:abhinav
s/summay/summary s/highligting/highlighting
2016-12-28Document the `p' command in "interactive mode" that filters processes by pid.leot
While here add date to the `.TH' macro 3rd argument. Reviewed by and thanks to <wiz>
2016-12-26Implement the `c' command in "interactive mode" that displays only commandsleot
that match a specified string. Reviewed by and thanks to <Riastradh>
2016-08-27Be more careful/explicit with FP rounding when converting floating timedholland
to timeval. Also, don't truncate the seconds part to int for y2038. I've had this patch sitting around since 2010 and I completely forget what motivated it.
2016-01-23PR/5068: Ingo Schwarze: Don't use the .af (alter format) request to displaychristos
a named register.
2016-01-23Define _KERNTYPES for things that need it.christos
2015-01-23use more markupchristos
2014-05-13Don't die if we resize to smaller than Y_LINES. The display could do better,christos
but it recovers if we grow.
2013-10-20remove unused variableschristos
2013-10-01Allow interactive displays if the termcap entry does not have the `li'roy
setting but we can calculate the lines from ioctl.
2013-03-21mandoc can now print numbered registers.christos
2013-03-21The man page has numbered registers and conditionals and cannot be handledchristos
by mandoc, so make it use groff. Unfortunately since we don't install cat pages, this does not work. At least it works for html!
2013-03-21revert previous, this is a mandoc issue (does not handle .if and .nr)christos
2013-03-21PR/47675: Nick Hudson: top(1) man page missing default number of secondschristos
2013-01-03explicitly include sys/resource.hpara
2012-03-23Switch off per-cpu states by default (i.e. display a single CPU line with asborrill
mean average). Program behaviour now tallies with the man page, but more importantly, the default behaviour is now sensible for modern multi-core machines. If you want the previous behaviour, please set TOP="-1" in your environment. Fix multiple "1" options not toggling and thus allow settings in TOP environmental variable to be reversed by a command line option. Tweak description of "1" command in interactive mode. OK christos@
2012-03-23Mention that 1 can be used as an interactive command.sborrill
2011-12-24PR/45739: Moritz Wilhelmy: top(1) segfaults on WINCH with unknown terminalchristos
2011-10-08Adjust UID header position, to be aligned with the datas.njoly
2011-09-16Disable noreturn checks for remaining external codejoerg
2011-08-14document that display.c uses non-literal format stringschristos
2011-04-15Swap the command and the thread name in the thread view and let the commandchristos
be as long as it wants. (Vladimir Kirillov)
2010-07-03PR/43562: Witold Jan Wnuk: top: CPU percentages overlap labelschristos
2010-06-30Avoid steps and other artefacts in head for more than 9 CPUs.is
2010-05-31Fix previous, so it builds on some ports.rmind
2010-05-31Fix ps(1) and top(1) to show reasonable CPU numbers i.e. cpu_index() providedrmind
by the kernel, instead of CPU order number, which is generally random.
2010-05-12implement fullcmd mode. Now we need to modernize the machine specific codechristos
to handle displays > 80 columns to make this work effectively.
2010-02-03Userland now builds and uses terminfo instead of termcap.roy
OK: core@, jdc@
2009-10-21Remove uarea swap-out functionality:rmind
- Addresses the issue described in PR/38828. - Some simplification in threading and sleepq subsystems. - Eliminates pmap_collect() and, as a side note, allows pmap optimisations. - Eliminates XS_CTL_DATA_ONSTACK in scsipi code. - Avoids few scans on LWP list and thus potentially long holds of proc_lock. - Cuts ~1.5k lines of code. Reduces amd64 kernel size by ~4k. - Removes __SWAP_BROKEN cases. Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on acorn26 (thanks to <bjh21>). Discussed on <tech-kern>, reviewed by <ad>.
2009-07-27Make process CPU value drop the decimal part when reaching 100%, likenjoly
WCPU.
2009-05-05PR/41358: YAMAMOTO Takashi: top -n is broken, don't return -1 early ifchristos
!smartterminal