Commit Graph

64 Commits

Author SHA1 Message Date
Christian Göttsche d72b0a682e Mark several non-modified pointer variables const 2021-01-11 20:12:34 +01:00
Maxim Zhiburt cf306ff86e Implement sorting in tree mode 2020-12-02 23:50:05 +01:00
Nathan Scott f704baeb82 Drop unused global ProcessList memory fields
The global ProcessList structure contains a couple of unused
fields.  'sharedMem' has never been used by any Meter, since
its not been anything other than zero in Linux /proc/meminfo
for many, many years.  The freeMem field is only used in the
usedMem calculation, so it can reside on the stack like some
other memory variables used within-calculations-only and not
exposed to the user via a Meter.
2020-11-27 07:55:58 +01:00
Daniel Lange 8f2d129dce Apply patch from BenBE as per https://github.com/htop-dev/htop/pull/241#issuecomment-720081138 2020-11-16 12:55:32 +01:00
Daniel Lange 0951090fa4 Merge branch 'hili-new-old' of adsr/htop into highlight-new-old-processes 2020-11-16 12:55:07 +01:00
Christian Göttsche 91317322fe Mark ProcessList_keyAt argument const 2020-11-15 18:35:30 +01:00
Adam Saponara dde71c6637 Highlight new and old processes (#74) 2020-10-30 21:56:16 -04:00
Christian Göttsche 61bae4c9d2 Unify function argument names
Name first argument of ProcessList_goThroughEntries consistently super
Name first argument of ProcessList_new consistently userTable
2020-10-28 19:57:10 +01:00
Christian Göttsche a3bb7cbe64 Hold only a const version of Settings in ProcessList 2020-10-26 19:30:38 +01:00
Christian Göttsche 96e2a4259e Continue to update generic data in paused mode
Generic data, as CPU and memory usage, are used by Meters.
In paused mode they would stop receiving updates and especially Graph
Meters would stop showing continuous data.

Improves: #214
Closes: #253
2020-10-19 14:45:39 +02:00
Benny Baumann 0f5262917f Make all required includes explicit
Information as seen by IWYU 0.12 + clang 9 on Linux
2020-10-18 20:09:05 +02:00
Christian Göttsche 08d85e6143 Mark Object classes and Object class fields const 2020-10-07 13:01:53 +02:00
Daniel Lange 079c2abf8e Update License consistently to GPLv2 as per COPYING file 2020-10-05 10:13:12 +02:00
Benny Baumann e1c96879f4 Sort headers/includes 2020-09-29 17:41:49 +02:00
Nathan Scott 4597332959 Switch variable/field naming from WhiteList to MatchList 2020-09-09 19:38:15 +10:00
Zev Weiss 7b7822b896 Remove superfluous 'extern's from function declarations.
Applied via:

  $ find * -name '*.h' -exec sed -i -r 's/^extern (.+\()/\1/;' {} +

Suggested-by: Bert Wesarg <bert.wesarg@googlemail.com>
2020-09-03 11:59:26 -05:00
Zev Weiss a1a027b9bd Axe automated header generation.
Reasoning:
 - implementation was unsound -- broke down when I added a fairly
   basic macro definition expanding to a struct initializer in a *.c
   file.

 - made it way too easy (e.g. via otherwise totally innocuous git
   commands) to end up with timestamps such that it always ran
   MakeHeader.py but never used its output, leading to overbuild noise
   when running what should be a null 'make'.

 - but mostly: it's just an awkward way of dealing with C code.
2020-09-03 11:58:58 -05:00
Nathan Scott 7ac1c709b7 Re-generate all headers with latest scripts/MakeHeader.py
Sync-up missing extern declarations for many functions.
2020-08-18 17:41:49 +10:00
Hisham 474d26cea8 Portable affinity using hwloc 2016-02-14 19:57:29 -02:00
Hisham Muhammad b291fba02b Fixes to use platform-specific compare routines. 2015-04-09 15:40:46 -03:00
Hisham Muhammad d880def0e9 Merge branch 'master' into wip
Conflicts:
	Process.c
	Process.h
	htop.c
	linux/LinuxProcess.c
	linux/LinuxProcess.h
	test_spec.lua
2015-04-02 01:57:37 -03:00
Hisham Muhammad 272e2d9b34 Major advances in FreeBSD port. 2015-03-16 23:02:03 -03:00
Hisham Muhammad adbfe3c3f1 Get FreeBSD tree to compile again with latest changes. 2015-03-16 03:14:20 -03:00
Hisham Muhammad 3383d8e556 Sorry about the mega-patch.
This is a work-in-progress, code is currently broken.
(Some actions, and notably, the header, are missing.)
2015-01-21 23:27:31 -02:00
Hisham Muhammad cda6bdd56b Add ProcessList_delete to the variable interface. 2014-11-27 17:48:38 -02:00
Hisham Muhammad eb229d9aef Changes for supporting separate platform subdirectories. 2014-11-24 18:55:03 -02:00
Hisham Muhammad 9faf4938b8 Refactored key handlers.
Made the logic more modular, hopefully easier to follow,
and removed repeated code.
Plus, some optimization in RichString code.
2014-11-19 23:17:52 -02:00
Hisham Muhammad 6d90e58c01 alignment improvements 2014-02-27 16:35:22 -03:00
Leigh Simpson da236ca318 Added additional column to monitor OOM killer score of each process 2014-01-29 22:41:55 +00:00
Hisham Muhammad 8ace29c267 Make CPU meter optionally account guest time in its percentages 2013-12-18 02:58:34 +00:00
Hisham Muhammad 6cfa9e0bf2 Performance improvements due to conditional parsing of IO data depending on selected fields.
On my machine, this gives a ~20% improvement in htop process time use with the default config.
2013-05-24 22:46:01 +00:00
Hisham Muhammad 322ba274ea Performance improvements
(thanks to Jann Horn)
2013-04-29 23:00:15 +00:00
Hisham Muhammad 00b324bfc1 Changes in object model: separate class objects to store vtable. Also, nicer UTF-8 display of big numbers. 2012-12-05 15:12:20 +00:00
Hisham Muhammad 2a73405cd0 search and filter for the strace and lsof screens! 2012-11-10 00:31:37 +00:00
Hisham Muhammad f44a8f2009 Option to update process names on every refresh
(thanks to Rob Hoelz)
2012-10-20 00:43:25 +00:00
Hisham Muhammad e6c6d7fbf7 Add -p flag, contributed by Rob Hoelz 2012-08-10 21:54:41 +00:00
Hisham Muhammad 1a604a05a5 BUGFIX: behavior of 'F' (follow) key was broken, also affecting the
persistence of mouse selections. Closes #3165065.
2012-02-02 23:45:40 +00:00
Hisham Muhammad 84281bdc44 major header cleanup 2011-12-26 21:35:57 +00:00
Hisham Muhammad bfd86a60cc Keep panel structure up-to-date as process list changes when headers are updated during the screen manager. Hopefully closes #3444533. 2011-12-01 12:31:57 +00:00
Hisham Muhammad bc87a8ff8c Remove bundled hwloc-1.2.1. Use either native Linux affinity support or an external libhwloc.
(for details see https://sourceforge.net/mailarchive/forum.php?thread_name=CAJpkDYeZpwqcWxZ77wq6bMrnhn-KzkU1xAqb3cU0drfnA3n9FQ%40mail.gmail.com&forum_name=htop-general )
2011-11-21 02:52:41 +00:00
Hisham Muhammad ca6b9238a3 Support for UTF-8 tree drawing
(thanks to Bin Guo)
2011-11-03 22:12:12 +00:00
Hisham Muhammad ec17b7029a Convert affinity control from the deprecated PLPA to HWLOC 2011-09-24 00:30:47 +00:00
Hisham Muhammad f7fe4b4722 Fix off-by-one error in PROCESSOR display 2011-09-08 02:48:53 +00:00
Hisham Muhammad a9c0ea3753 * Option for counting CPUs from zero
(thanks to Sean Noonan)
* Meters update in every screen (no longer halting while on Setup, etc.)
2011-03-22 20:37:08 +00:00
Hisham Muhammad 831538b0f9 Split process and thread counts in tasks meter 2010-11-23 13:28:47 +00:00
Hisham Muhammad d8e1480a27 Remove arbitrary limit from rich strings
Fix subtree hiding
Fix reading of CPU values in hidden threads
Fix hiding of zombie processes as kernel threads
Remove "debug proc" code
Code cleanup in processElements
2010-11-22 12:40:20 +00:00
Hisham Muhammad 6486229308 add support for steal/guest CPU time measurement
simplify processor data accounting (add CPUData structure)
remove Process_clone trick
2010-08-24 23:20:38 +00:00
Hisham Muhammad 02a30bfecd warning fixes 2010-02-25 01:43:18 +00:00
Hisham Muhammad 8f230920cd show custom thread names 2010-02-25 01:37:31 +00:00
Hisham Muhammad 2338ad5820 Ability to change sort column with the mouse by
clicking column titles (click again to invert order).
Also, add a consolidated IO kbyte/s column.
2008-03-14 18:50:49 +00:00