diff --git a/top/top.c b/top/top.c index 572ade63..bfe57276 100644 --- a/top/top.c +++ b/top/top.c @@ -3392,11 +3392,11 @@ static void forest_add (const int self, const int level) { Tree_ppt[Tree_idx] = Seed_ppt[self]; // add this as root or child Tree_ppt[Tree_idx++]->pad_3 = level; // borrow 1 byte, 127 levels -#ifdef TREE_ONEPASS - for (i = self + 1; i < Frame_maxtask; i++) { +#ifdef TREE_RESCANS + for (i = 0; i < Frame_maxtask; i++) { // this is hardly bullet proof now, + if (i == self) continue; // with 3.3 proc hidepid provisions #else - for (i = 0; i < Frame_maxtask; i++) { - if (i == self) continue; + for (i = self + 1; i < Frame_maxtask; i++) { #endif if (Seed_ppt[self]->tid == Seed_ppt[i]->tgid || (Seed_ppt[self]->tid == Seed_ppt[i]->ppid && Seed_ppt[i]->tid == Seed_ppt[i]->tgid)) diff --git a/top/top.h b/top/top.h index 903a5435..d45f0038 100644 --- a/top/top.h +++ b/top/top.h @@ -43,7 +43,7 @@ //#define STRINGCASENO /* case insenstive compare/locate versions */ //#define TERMIO_PROXY /* true line editing, beyond native input */ //#define TREE_NORESET /* sort keys do NOT force forest view OFF */ -//#define TREE_ONEPASS /* for speed, tolerate dangling children */ +//#define TREE_RESCANS /* restart scan to avoid dangling children */ //#define USE_X_COLHDR /* emphasize header vs. whole col, for 'x' */ //#define VALIDATE_NLS /* validate integrity of all 3 nls tables */ //#define WARN_CFG_OFF /* warning OFF when overwriting old rcfile */