SCB_NUM1(FLG, flags)
SCB_NUM1(FL1, maj_flt)
SCB_NUM1(FL2, min_flt)
+SCB_NUM1(FV1, maj_delta)
+SCB_NUM1(FV2, min_delta)
SCB_NUMx(GID, egid)
SCB_STRS(GRP, egroup)
SCB_NUMx(NCE, nice)
{ " Badness ", "%8d ", -1, -1, SF(OOM), L_oom, NULL },
#undef L_oom
#endif
- { "ENVIRON ", NULL, -1, -1, SF(ENV), L_ENVIRON, NULL }
+ { "ENVIRON ", NULL, -1, -1, SF(ENV), L_ENVIRON, NULL },
+ { "vMj ", "%3.3s ", 3, SK_no, SF(FV1), L_stat, NULL },
+ { "vMn ", "%3.3s ", 3, SK_no, SF(FV2), L_stat, NULL }
#undef SF
};
calcs and saves that go unused, like the old top! */
PHist_new[Frame_maxtask].pid = this->tid;
PHist_new[Frame_maxtask].tics = tics = (this->utime + this->stime);
+ // finally, save major/minor fault counts in case the deltas are displayable
+ PHist_new[Frame_maxtask].maj = this->maj_flt;
+ PHist_new[Frame_maxtask].min = this->min_flt;
#ifdef OFF_HST_HASH
- // find matching entry from previous frame and make ticks elapsed
- if ((h = hstbsrch(PHist_sav, maxt_sav - 1, this->tid))) tics -= h->tics;
+ // find matching entry from previous frame and make stuff elapsed
+ if ((h = hstbsrch(PHist_sav, maxt_sav - 1, this->tid))) {
+ tics -= h->tics;
+ this->maj_delta = this->maj_flt - h->maj;
+ this->min_delta = this->min_flt - h->min;
+ }
#else
// hash & save for the next frame
hstput(Frame_maxtask);
- // find matching entry from previous frame and make ticks elapsed
- if ((h = hstget(this->tid))) tics -= h->tics;
+ // find matching entry from previous frame and make stuff elapsed
+ if ((h = hstget(this->tid))) {
+ tics -= h->tics;
+ this->maj_delta = this->maj_flt - h->maj;
+ this->min_delta = this->min_flt - h->min;
+ }
#endif
/* we're just saving elapsed tics, to be converted into %cpu if
case P_FL2:
makeCOL(scale_num(p->min_flt, w, s));
break;
+ case P_FV1:
+ makeCOL(scale_num(p->maj_delta, w, s));
+ break;
+ case P_FV2:
+ makeCOL(scale_num(p->min_delta, w, s));
+ break;
case P_GID:
makeCOL(p->egid);
break;
P_OOA, P_OOM,
#endif
P_ENV,
+ P_FV1, P_FV2,
#ifdef USE_X_COLHDR
// not really pflags, used with tbl indexing
P_MAXPFLGS
} FLD_t;
#ifdef OFF_HST_HASH
- /* This structure supports 'history' processing and ultimately records
- one piece of critical information from one frame to the next --
+ /* This structure supports 'history' processing and records the
+ bare minimum of needed information from one frame to the next --
we don't calc and save data that goes unused like the old top. */
typedef struct HST_t {
TIC_t tics; // last frame's tics count
- int pid; // record 'key'
+ unsigned long maj, min; // last frame's maj/min_flt counts
+ int pid; // record 'key'
} HST_t;
#else
- /* This structure supports 'history' processing and ultimately records
- one piece of critical information from one frame to the next --
+ /* This structure supports 'history' processing and records the
+ bare minimum of needed information from one frame to the next --
we don't calc and save data that goes unused like the old top nor
do we incure the overhead of sorting to support a binary search
(or worse, a friggin' for loop) when retrieval is necessary! */
typedef struct HST_t {
TIC_t tics; // last frame's tics count
- int pid; // record 'key'
- int lnk; // next on hash chain
+ unsigned long maj, min; // last frame's maj/min_flt counts
+ int pid; // record 'key'
+ int lnk; // next on hash chain
} HST_t;
#endif