tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: NetBSD truss(1), coredumper(1) and performance bottlenecks



On 29.05.2019 15:03, Edgar Fuß wrote:
>> I was asked for truss(1) by Christos back some time ago. So here it is.
> I'm surely missing something, but what's the advantage of truss over ktruss?
> 

It uses different interface and is fully implemented in userspace
(kturss uses kernel coverage). It is more flexible as it allows to
freely introspect into tracee. This is now used to pretty print
structures passed over a pointer to the kernel:

15112      1 0.005818753 0.000400130 __fstat50(3, { dev=0,
mode="-r--r--r-- ", ino=8455174, nlink=1, uid=0, gid=0, rdev=-1,
atime=1559125364.903678308, mtime=1557246297.000000000,
ctime=1557541071.458868862, blksize=16384, blocks=4480})=  0

Currently in ktruss(1), I'm getting:

 29838      1 echo     __fstat50(0x3, 0x7f7fff132128) = 0

ktruss uses kernel coverage and it has its benefits too. For me one of
them is that it does not conflict with ptrace(2) and allows tracing
debuggers.

Attachment: signature.asc
Description: OpenPGP digital signature



Home | Main Index | Thread Index | Old Index