1. 15 Oct, 2016 1 commit
    • jim warner's avatar
      top: make that 'forest view' just a tad more efficient · c6407ef1
      jim warner authored
      It makes no sense to begin our tracked nested level at
      '1' then later require a '1' to be subtracted from the
      level as artwork and indentation is added for display.
      
      By beginning such tracked levels at zero, we can avoid
      the need to adjust it & use it directly in a snprintf.
      
      [ this commit parallels a patch in our newlib branch ]
      Signed-off-by: jim warner's avatarJim Warner <james.warner@comcast.net>
      c6407ef1
  2. 09 Oct, 2016 1 commit
  3. 25 Sep, 2016 1 commit
  4. 21 Sep, 2016 1 commit
  5. 19 Sep, 2016 2 commits
  6. 18 Sep, 2016 1 commit
    • jim warner's avatar
      top: finally circumvent that minor libnuma memory leak · 18b1a887
      jim warner authored
      Still unhappy with a minor memory leak associated with
      libnuma, I experimented with omitting the dlclose that
      was issued at module's end. For some reason which will
      remain a mystery, the valgrind leak then went bye-bye.
      
      So this patch just omits one use of dlclose and relies
      on whatever kernel magic is at work to free the memory
      when each process ends. We kept, however, the original
      code (now commented-out) to serve as a future caution.
      
      There remains one potential (but unlikely) dlclose use
      near the original dlopen. But there will be no leak as
      that 'numa_node_of_cpu' will not yet have been called.
      This seems to be the culprit that triggers such leaks.
      
      None of this libnuma shit would likely have come close
      to hitting our fan had the numa developers provided us
      with 'new' and 'unref' functions like our newlib does.
      
      [ this commit parallels a patch in our newlib branch ]
      Signed-off-by: jim warner's avatarJim Warner <james.warner@comcast.net>
      18b1a887
  7. 11 Sep, 2016 2 commits
    • Craig Small's avatar
      pgrep: Fix off by one error in line check · 24fd2605
      Craig Small authored
      There is now a warning if your command is longer than 15 characters
      and therefore can never match. Except it was checking for more than
      16 characters.
      
      Adjusted this and added a test case.
      
      References:
       !25
       commit 8e8835b2
      24fd2605
    • Craig Small's avatar
      Merge branch 'fifteen_chars_warning' into 'master' · 8e8835b2
      Craig Small authored
      pgrep - adds warning that pattern exceeds 15 chars without '-f' option
      
      Resolves many questions seen on forums around the web. Adds a decent warning about the behaviour.<br>
      Ideas about better text?
      
      See merge request !25
      8e8835b2
  8. 10 Sep, 2016 2 commits
    • Craig Small's avatar
      Merge branch 'fix-kill-l-bad-free-sig-prefix' into 'master' · 18e7ebd2
      Craig Small authored
      kill: Fix free() with bad pointer on SIG-prefixed signal-name
      
      kill -l SIGHUP (or any other signal-name prefixed with "SIG")
      would cause free() to be called with a bad pointer instead of
      a pointer to what was allocated. Fix this and add test-case.
      
      See merge request !26
      18e7ebd2
    • jim warner's avatar
      pmap: fix printing bug associated with the '-x' option · b899c55d
      jim warner authored
      Ever since its introduction, the 'x' (extended format)
      option has employed strncmp to parse those smaps keys.
      
      Such an approach worked well as long as those prefixes
      were guaranteed to be unique. But, with the 4.3 kernel
      a new 'SwapPss' field was added to those within smaps.
      
      That triggered a 2nd match for the 'Swap' logic which,
      in turn, resulted in a duplicate output line of zeros.
      
      So this patch just trades strncmp for strcmp, avoiding
      potential future problems when /proc/$$/smaps evolves.
      
      Reference(s):
      . recent bug report
      https://bugzilla.redhat.com/show_bug.cgi?id=1374061
      . linux 4.3 kernel introduces SwapPss
      commit 8334b96221ff0dcbde4873d31eb4d84774ed8ed4
      . original pmap -x option introduction
      commit 380cc1e9Signed-off-by: jim warner's avatarJim Warner <james.warner@comcast.net>
      b899c55d
  9. 08 Sep, 2016 1 commit
  10. 06 Sep, 2016 1 commit
  11. 28 Aug, 2016 1 commit
  12. 23 Aug, 2016 4 commits
    • jim warner's avatar
      top: avoid yet more overhead of accessing /proc/status · 53138525
      jim warner authored
      After discovering those terrible costs associated with
      /proc/status vs. /proc/stat, the build_header function
      changed to favor the latter for a field found in both.
      
      Well, low-and-behold, this top program still used some
      flags that needlessly caused 'status' to still be read
      when 'statm' could have served. And, while top's needs
      require conversion from pages to KiB, that's still far
      less costly than reading that gosh darn 'status' file.
      
      [ this patch parallels similar changes to newlib top ]
      Signed-off-by: jim warner's avatarJim Warner <james.warner@comcast.net>
      53138525
    • jim warner's avatar
      top: when setting library flags favor stat over status · 7df87ea7
      jim warner authored
      Long ago, in a galaxy far away, top was convinced that
      /proc/stat was to be favored over /proc/status if some
      field could be satisfied with either. This was done to
      avoid extra costs of 64-bit math for 32-bit platforms.
      
      Well, its time to acknowledge the prevalence of 64-bit
      platforms. And in such an environment there is a large
      hidden cost currently if using status instead of stat.
      In fact, that cost difference can be as high as 1400%.
      
      So, this commit will coax top into favoring that least
      costly route while also fixing an EU_TGD library flag.
      
      [ this patch parallels similar changes to newlib top ]
      Signed-off-by: jim warner's avatarJim Warner <james.warner@comcast.net>
      7df87ea7
    • jim warner's avatar
      library: revert one ancient 'escape_str_utf8' deletion · 67a634dc
      jim warner authored
      Profiling revealed a large amount of time spent in the
      'escape_str_utf8' function (escape.c) with both of our
      NLS branches (newlib and master). That same result was
      not seen under an ancient top-3.2.8 program & library.
      
      Well, the 3.2.8 result was ultimately explained by the
      absence of a 'setlocale', necessary under NLS support.
      Thus, when that ancient library tested for locale, all
      it got was 'ANSI_...' & assumed 'UTF-8' wasn't active.
      
      But after a hack to that ancient code to place it on a
      par with newlib/master, I still found cost differences
      that led me to revisit an old change referenced below.
      
      It turns out that 'iswprint' costs far more than would
      a call of 'isprint', even with the extra support code.
      So this commit just reverts that five year old change.
      
      [ this patch parallels a similar change under newlib ]
      
      Reference(s):
      commit 7b0fc19eSigned-off-by: jim warner's avatarJim Warner <james.warner@comcast.net>
      67a634dc
    • Craig Small's avatar
      Merge branch 'free_french_alignment' into 'master' · 57619dcd
      Craig Small authored
      free: french translation alignment
      
      address issue #24
      
      See merge request !13
      57619dcd
  13. 15 Aug, 2016 5 commits
  14. 07 Aug, 2016 3 commits
  15. 05 Aug, 2016 1 commit
  16. 04 Aug, 2016 1 commit
  17. 01 Aug, 2016 1 commit
    • jim warner's avatar
      top: provide for expanded potential displayable fields · b4fdb27a
      jim warner authored
      This commit provides for raising the total displayable
      fields from its current 70 to 86. It also bumps the id
      in an rcfile representing the version from 'i' to 'j'.
      
      The increase in number of fields will make sharing the
      rcfile with an older top, once it's saved, impossible.
      
      These changes are being done via a #define rather than
      hard coded so any such sharing will still be possible.
      Signed-off-by: jim warner's avatarJim Warner <james.warner@comcast.net>
      b4fdb27a
  18. 16 Jul, 2016 3 commits
    • Craig Small's avatar
      library: dont use vm_min_free on non-Linux systems · 2e4959ba
      Craig Small authored
      For a specific slice of kernel versions we can get a better
      estimate of the available memory before the "real" available
      figure appears around kernel 3.2
      
      However, that middle method requires a /proc/sys/vm directory.
      FreeBSD 9.x used to emulate a < 2.6.27 kernel procfs meaning
      it never tried the middle method. FreeBSD 10.x emulates something
      more modern, but without the available figure and without a
      /proc/sys/vm, so the library falls into a hole.
      
      Hurd may to one day have this bug so we'll exclude him as well
      as its triggered by whatever number appears in
      /proc/sys/kernel/osrelease
      
      References:
       commit 3f3b1a59
       https://bugs.debian.org/831396
      2e4959ba
    • jim warner's avatar
      top: make compilation possible under netbsd-curses too · 63f8c16f
      jim warner authored
      Whoa, I had never considered an alternative to ncurses
      until the issue referenced below was raised. Thus, I'm
      surprised to find that 'tparm' was the only impediment
      to ultimately utilizing this alternate curses library.
      
      And, while we could have substituted that non-standard
      'tiparm' with only 2 arguments, we'll utilize the full
      parms compliment in the spirit of that original patch.
      
      Frankly, the task of developing an alternative library
      to that ncurses implementation really boggles my mind.
      
      Congratulations to rofl0r, whoever that masked man is.
      
      Reference(s):
      . issue raised
      procps-ng/procps#38
      . netbsd-curses home
      https://github.com/sabotage-linux/netbsd-cursesSigned-off-by: jim warner's avatarJim Warner <james.warner@comcast.net>
      63f8c16f
    • Craig Small's avatar
      Updated Chinese po file · bf7e7280
      Craig Small authored
      bf7e7280
  19. 13 Jul, 2016 1 commit
  20. 10 Jul, 2016 2 commits
    • Craig Small's avatar
      misc: Remove strtod tests · 100afbc1
      Craig Small authored
      Due to the interesting properties of floating points, the strtod
      tests have been removed. One day I may bother enabling them again.
      100afbc1
    • Craig Small's avatar
      watch: define HOST_NAME_MAX · e564ddcb
      Craig Small authored
      Those infernal arches of kfreebsd-i386 (not -amd64) don't define
      HOST_NAME_MAX. This patch is a work-around for those systems with
      lacking include files.
      e564ddcb
  21. 09 Jul, 2016 5 commits