Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
This way the frequency is read from sysfs only once per update cycle
instead of every time the UI is redrawn.
This also changes the code to read from /proc/cpuinfo instead. This is because
reading from scaling_cur_freq stalls for 10ms if the previous read for the file
was more than one second ago. [1] Since htop's update cycle is
longer than that, it would cause the read of each CPU's scaling_cur_freq file
to block the UI for 20ms. This easily led to a noticeable half-second lag on
a 20+ CPU machine.
/proc/cpuinfo also has a 10ms delay, but this applies for the whole file
so the delay does not scale with the number of CPUs. [2]
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=4815d3c56d1e10449a44089a47544d9ba84fad0d
[2]: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=7d5905dc14a87805a59f3c5bf70173aac2bb18f8
|
|
|
|
|
|
|
|
|
|
The option is only implemented on Linux. On other platforms, and on Linuxes
that do not expose the relevant sysfs file, the frequency will be 0.
The "CPU average" meter does not show a frequency, only
the individual per-CPU meters.
|
|
|
|
Calls marked with xSnprintf shouldn't fail.
Abort program cleanly if any of them does.
|
|
In all the cases where sprintf was being used within htop, snprintf
could have been used. This patch replaces all uses of sprintf with
snprintf which makes sure that if a buffer is too small to hold the
resulting string, the string is simply cut short instead of causing
a buffer overflow which leads to undefined behaviour.
`sizeof(variable)` was used in these cases, as opposed to `sizeof
variable` which is my personal preference because `sizeof(variable)`
was already used in one way or another in other parts of the code.
|
|
Rationale (copied from htop issue #471):
The function name "setValues" is misleading. For most OOP (object-
oriented programming) contexts, setXXX functions mean they will change
some member variables of an object into something specified in
function arguments. But in the *Meter_setValues() case, the new values
are not from the arguments, but from a hard-coded source. The caller
is not supposed to change the values[] to anything it likes, but
rather to "update" the values from the source. Hence, updateValues is
a better name for this family of functions.
|
|
Two changes in this commit:
- All meters now explicitly specify "maxItems" property, even for just
1 item. (Exception is "container" CPU meter classes, which use
CUSTOM_METERMODE.)
- "maxItems" being 0 is now allowed. This will let bar meters and graph
meters render an empty meter.
|
|
|
|
|
|
|
|
|
|
This is a work-in-progress, code is currently broken.
(Some actions, and notably, the header, are missing.)
|
|
|
|
(Patch by Dawid Gajownik)
|
|
See https://bugzilla.redhat.com/show_bug.cgi?id=987805 for details.
(thanks to Dawid Gajownik for the detailed analysis!)
|
|
|
|
|
|
UTF-8 display of big numbers.
|
|
|
|
|
|
* Performance improvements
* Support for splitting CPU meters into two or four columns
(thanks to Wim Heirman)
* Switch from PLPA, which is now deprecated, to HWLOC.
* Bring back support for native Linux sched_setaffinity,
so we don't have to use HWLOC where we don't need to.
* Support for typing in user names and column fields in selection panels.
|
|
|
|
|
|
|
|
|
|
|
|
(thanks to Sean Noonan)
* Meters update in every screen (no longer halting while on Setup, etc.)
|
|
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
|
|
simplify processor data accounting (add CPUData structure)
remove Process_clone trick
|
|
(Fix by Steven Hampson)
|
|
|
|
|
|
|
|
Reduces resulting code size.
|
|
accurate description. It is still available in
split time, now called detailed CPU time.
(thanks to Samuel Thibault for the report)
|
|
status bar
(minor modifications: default to false, add help)
|
|
Avoid unnecessary operations when processing entries on ProcessList.
|
|
|
|
|
|
- add AllCPUsMeter;
- because of that, the new .htoprc is incompatible with previous released versions.
|
|
|
|
|