----- Original Message ---- > From: Shrikanth Kamath <shrikant...@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 _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"