1. 28 Jul, 2018 1 commit
  2. 23 May, 2018 1 commit
  3. 25 Mar, 2018 1 commit
  4. 26 Feb, 2018 2 commits
  5. 18 Feb, 2018 2 commits
  6. 17 Feb, 2018 2 commits
  7. 04 Feb, 2018 2 commits
  8. 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
  9. 01 Aug, 2017 1 commit
  10. 27 Jul, 2017 1 commit
  11. 26 Jul, 2017 1 commit
  12. 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
  13. 10 Jul, 2017 1 commit
  14. 05 Jul, 2017 2 commits
  15. 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
  16. 04 Feb, 2017 1 commit
  17. 31 Jan, 2017 1 commit
  18. 01 Oct, 2016 1 commit
  19. 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
  20. 24 Aug, 2016 1 commit
  21. 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
  22. 19 Jun, 2016 1 commit
  23. 15 Jun, 2016 1 commit
  24. 01 Mar, 2016 1 commit
  25. 20 Feb, 2016 1 commit
  26. 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
  27. 16 Feb, 2016 1 commit
  28. 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
  29. 13 Feb, 2016 1 commit
  30. 02 Feb, 2016 2 commits
  31. 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
  32. 02 Jan, 2016 1 commit
  33. 14 Dec, 2015 1 commit
  34. 03 Dec, 2015 1 commit