Date: Fri, 27 Sep 2002 18:22:33 -0700 (PDT) From: Julian Elischer <julian@elischer.org> To: Lars Eggert <larse@ISI.EDU> Cc: current@freebsd.org Subject: Re: sys/sys/proc.h 1.250 breaks devel/libgtop2 port Message-ID: <Pine.BSF.4.21.0209271813040.66922-100000@InterJet.elischer.org> In-Reply-To: <3D94FFA1.6080400@isi.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 27 Sep 2002, Lars Eggert wrote: > Hi, > > commenting out p_kse in sys/sys/proc.h rev 1.250 broke the > devel/libgtop2 port (which still uses that field in > sysdeps/freebsd/proctime.c). Ok there is a HACK you can do, but what you REALLY should be doing is using libkvm, which has facilities to get that information.. (and we keep it up-to-date). The new structire for in teh threaded worls is that there is a linked list of KSEGRPS hanging off the process on p->p_ksegrps, and there is a linked list of KSEs hanging off each of those KSEGRPS.. (field kg_kseq). Actually they are TAILQs. For non KSE processes (that's all of them at the moment) you can just take the first KSE from the first KSEGRP. For the general case you need to add up the times from all the KSEs in the process, i.e. iterate through the KSEGRPS and for each of them iterate through the KSES on it. Libkvm does this already (or at least WILL do it). it uses sysctl on a running kernel and does it itself for dealing with coredumps. > > What's the new way of getting at this info? I'll take a stab at fixing > the port if someone knows... > > Thanks, > Lars > -- > Lars Eggert <larse@isi.edu> USC Information Sciences Institute > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0209271813040.66922-100000>