1. 17 Feb, 2018 5 commits
  2. 04 Feb, 2018 2 commits
  3. 04 Dec, 2017 1 commit
    • André Carvalho's avatar
      Adds support for linux delay accounting (#667) · b7b66b76
      André Carvalho authored
      Adds support for showing columns with linux delay accounting.
      
      This information can be read from the netlink interface, and thus we set up a socket to read from that when initializing the LinuxProcessList (LinuxProcessList_initNetlinkSocket). After that, for each process we call LinuxProcessList_readDelayAcctData, which sends a message thru the socket after setting up a callback to get the answer from the Kernel. That callback sets the process total delay time attribute. We then set the delay percent as the percentage of time process cpu time since last scan.
      b7b66b76
  4. 01 Aug, 2017 1 commit
  5. 27 Jul, 2017 1 commit
  6. 26 Jul, 2017 1 commit
  7. 23 Jul, 2017 1 commit
    • Richard's avatar
      Mark some things as const · d5faf643
      Richard authored
      Several string pointer arrays pointed to const strings
      but were not const themselves.
      
      A few various structures and arrays were also marked const.
      d5faf643
  8. 10 Jul, 2017 1 commit
  9. 05 Jul, 2017 2 commits
  10. 16 Feb, 2017 1 commit
    • Hisham's avatar
      Cap battery at 100%. · bb8dec15
      Hisham authored
      Apparently invalid results can be returned by buggy drivers in old laptops,
      as reported by @thukydides. See #596.
      bb8dec15
  11. 04 Feb, 2017 1 commit
  12. 31 Jan, 2017 1 commit
  13. 01 Oct, 2016 1 commit
  14. 30 Aug, 2016 1 commit
    • Explorer09's avatar
      Mark signal tables 'const' · 1f3d85b6
      Explorer09 authored
      
      
      Specifically, Platform_signals[] and Platform_numberOfSignals. Both are
      not supposed to be mutable. Marking them 'const' puts them into rodata
      sections in binary. And for Platform_numberOfSignals, this aids
      optimization (aids only Link Time Optimization for now). :)
      Signed-off-by: default avatarKang-Che Sung <explorer09@gmail.com>
      1f3d85b6
  15. 24 Aug, 2016 1 commit
  16. 11 Aug, 2016 1 commit
    • Explorer09's avatar
      Optimize Strings_startWith() · bf35921a
      Explorer09 authored
      Use strncmp() combined with a strlen() will give better performance
      than a strstr in worst case. Especially when the match prefix is a
      constant and not a variable.
      
      While we are at it, replace the match() function in linux/Battery.c,
      which uses a naive algorithm, with a macro that does better job by
      utilizing Strings_startWith().
      
          $ gcc --version | head -n 1
          gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
          $ uname -m
          x86_64
          $ size htop.old htop.new
             text   data    bss    dec    hex filename
           137929  15112   3776 156817  26491 htop.old
           137784  15104   3776 156664  263f8 htop.new
      
      Signed-off-by: Kang-Che Sung <explorer09 @ gmail.com>
      bf35921a
  17. 19 Jun, 2016 1 commit
  18. 15 Jun, 2016 1 commit
  19. 01 Mar, 2016 1 commit
  20. 20 Feb, 2016 1 commit
  21. 19 Feb, 2016 1 commit
    • Hisham's avatar
      Try to retain last full name of a zombie process. · baec4bdc
      Hisham authored
      Once a process goes zombie on Linux, /proc/PID/cmdline
      gets empty. So, when we detect it is a zombie we stop
      reading this file.
      For processes that were zombies before htop started,
      there's no way to get the full name.
      Closes #49.
      baec4bdc
  22. 16 Feb, 2016 1 commit
  23. 14 Feb, 2016 1 commit
    • Hisham's avatar
      Disable the syscall on systems that don't have it. · 35657208
      Hisham authored
      Got a report in #397 that htop runs in NetBSD
      masquerading as Linux and using a compatibility /proc
      (like we used to in FreeBSD) and that it builds fine
      apart from this syscall.
      35657208
  24. 13 Feb, 2016 1 commit
  25. 02 Feb, 2016 2 commits
  26. 15 Jan, 2016 1 commit
    • Explorer09's avatar
      Introduce CLAMP macro. Unify all MIN(MAX(a,b),c) uses. · 6dae8108
      Explorer09 authored
      With the CLAMP macro replacing the combination of MIN and MAX, we will
      have at least two advantages:
      1. It's more obvious semantically.
      2. There are no more mixes of confusing uses like MIN(MAX(a,b),c) and
         MAX(MIN(a,b),c) and MIN(a,MAX(b,c)) appearing everywhere. We unify
         the 'clamping' with a single macro.
      Note that the behavior of this CLAMP macro is different from
      the combination `MAX(low,MIN(x,high))`.
      * This CLAMP macro expands to two comparisons instead of three from
        MAX and MIN combination. In theory, this makes the code slightly
        smaller, in case that (low) or (high) or both are computed at
        runtime, so that compilers cannot optimize them. (The third
        comparison will matter if (low)>(high); see below.)
      * CLAMP has a side effect, that if (low)>(high) it will produce weird
        results. Unlike MIN & MAX which will force either (low) or (high) to
        win. No assertion of ((low)<=(high)) is done in this macro, for now.
      
      This CLAMP macro is implemented like described in glib
      <http://developer.gnome.org/glib/stable/glib-Standard-Macros.html>
      and does not handle weird uses like CLAMP(a++, low++, high--) .
      6dae8108
  27. 02 Jan, 2016 1 commit
  28. 14 Dec, 2015 1 commit
  29. 03 Dec, 2015 1 commit
  30. 30 Nov, 2015 1 commit
  31. 29 Nov, 2015 1 commit
  32. 23 Oct, 2015 1 commit
  33. 06 Oct, 2015 1 commit