truss status (was: cvs commit: src/sys/dev/lmc if_lmc.h)
John Baldwin
jhb at freebsd.org
Mon Jul 24 17:43:40 UTC 2006
On Monday 24 July 2006 08:10, Robert Watson wrote:
> On Mon, 24 Jul 2006, Greg 'groggy' Lehey wrote:
>
> > On Friday, 21 July 2006 at 13:29:38 +0200, Dag-Erling Smrgrav wrote:
> >> Tom Rhodes <trhodes at FreeBSD.org> writes:
> >>> Wait. I'm lost. Isn't truss(1) broken on FreeBSD?
> >>
> >> Depends on your definition of broken. It kind of works provided you have
> >> /proc mounted. Still, there's really not much point in using it;
ktrace(1)
> >> is better in almost all respects.
> >
> > truss is good in that it gives immediate output. I used it recently under
> > 6.1, and I somehow missed that it was broken.
>
> A few things are wrong with truss, none that make it completely broken:
>
> (1) In the past there were a number of reports of problems with race
> conditions during truss attach/detach. These reports have entirely
> disappeared, as far as I can tell, due to process locking fixes, procfs
> fixes, debugging fixes, etc. If they still exist, they should be
> investigated, but up-to-date debugging infomation will be needed.
I think the PHOLD/P_WEXIT stuff in 6.1 might have fixed these.
> (2) truss relies on procfs, which is known to be evil, and as such, doesn't
> work out of the box since we don't mount procfs out of the box.
Several
> people have worked on enhancing ptrace() so that it can be used to
> implement truss, but no one has finished this work. I think the
necessary
> ptrace() traps now exist for system calls so that this could be done.
Well, the biggest thing I found when doing the PHOLD/P_WEXIT stuff that was
missing was PIOCWAIT and PIOCCONT (IIRC). Specifically, we don't currently
have any ptrace() equivalent to that.
--
John Baldwin
More information about the cvs-src
mailing list