[procps] newlib pids status

  • From: Jim Warner <james.warner@xxxxxxxxxxx>
  • To: procps@xxxxxxxxxxxxx
  • Date: Thu, 13 Aug 2015 05:05:59 -0500

Hi Craig,

Is it time for an update?

I think my pitched battles with gdb and valgrind are behind me now and the pids
library stuff is mostly done.

I am working on introducing history support which has never been part of
libprocps. With that feature, top (and others) can rely on the library for
things like elapsed tics and major/minor page fault deltas.

The top program itself is fully integrated with newlib. Of course, he’s
waiting on the above for the %CPU, vMj and vMn fields. And forest view is not
yet functional. But everything else appears to be working fine.

Here’s a teaser from the top.c source file:

// 'pid stack results ' extractor macro, where e=enum, t=type, s=stack
#define PID_VAL(e,t,s) s [Fieldstab[ e ].erel].result. t
. . .
static const char *task_show_stack (const WIN_t *q, const int idx) {
#define rSv(E,T) PID_VAL(E, T, q->stacks[idx]->head)
. . .
// str, make_str
case EU_GRP:
case EU_UEN:
case EU_URN:
case EU_USN:
case EU_LXC:
case EU_WCH:
cp = make_str(rSv(i, str), W, Js, i);
break;


Maybe I’ll have some patches ready for you early next week.

Regards,
Jim


Other related posts: