]> granicus.if.org Git - procps-ng/commitdiff
top: ATEOJ_RPTHSH prints hash table entries less often
authorJim Warner <james.warner@comcast.net>
Fri, 23 Oct 2015 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@enc.com.au>
Wed, 28 Oct 2015 10:01:28 +0000 (21:01 +1100)
We'll following the newlib <pids> approach to hashing:

. a 'PIDs at max depth:' portion of that UNREF_RPTHASH
enabled #define is now published only when the maximum
depth of hash table entry chains exceed depths of one.

Signed-off-by: Jim Warner <james.warner@comcast.net>
top/top.c

index 7f18ff18bd3b5fb760892214b9709d301b91a348..2591c3ab6d5b2b97195fed88195cff728ac09f5a 100644 (file)
--- a/top/top.c
+++ b/top/top.c
@@ -530,7 +530,7 @@ static void bye_bye (const char *str) {
             "\t -----\n"
             "\t %5d total entries occupied\n", cross_foot);
 
-         if (maxdepth_sav) {
+         if (maxdepth_sav > 1) {
             fprintf(stderr, "\nPIDs at max depth: ");
             for (i = 0; i < HHASH_SIZ; i++)
                if (depths[i] == maxdepth_sav) {