Date: Mon, 15 Feb 2010 06:53:20 -0800 (PST) From: Fernando Gleiser <fergleiser@yahoo.com> To: Shrikanth Kamath <shrikanth07@gmail.com>, freebsd-hackers@freebsd.org Subject: Re: Ktrace'ing kernel threads Message-ID: <909320.96307.qm@web31703.mail.mud.yahoo.com> In-Reply-To: <291941b81002150321w7b0479beo1c6fec39ef6a7922@mail.gmail.com> References: <291941b81002150321w7b0479beo1c6fec39ef6a7922@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
----- Original Message ---- > From: Shrikanth Kamath <shrikanth07@gmail.com> > To: freebsd-hackers@freebsd.org > Sent: Mon, February 15, 2010 8:21:40 AM > Subject: Ktrace'ing kernel threads > > Can ktrace trace another kernel thread which has roughly the semantics as > below, right now it > does not hit any of the designated interesting points that ktrace is built > for, but what if I could define those, > will ktrace still allow tracing another kernel thread? Yo can do that easily with dtrace #!/usr/sbin/dtrace -s fbt::build_msg:entry { printf("%d\n", timestamp) } fbt::build_msg:return { printf("%d\n", timestamp) } or if you want to get an histogram of the call time distributions: fbt::build_msg:entry { self->ts=timestamp; } fbt::build_msg:return { @[probefunc]=quantize(timestamp - self->ts); } Those are from the top of my head, I don't have a FreeBSD system at hand to test them, but I hope you'll get the idea Fer
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?909320.96307.qm>