Date: Wed, 17 Feb 2010 14:13:56 -0500 From: John Baldwin <jhb@freebsd.org> To: freebsd-hackers@freebsd.org Cc: Shrikanth Kamath <shrikanth07@gmail.com> Subject: Re: Ktrace'ing kernel threads Message-ID: <201002171413.56920.jhb@freebsd.org> In-Reply-To: <291941b81002150321w7b0479beo1c6fec39ef6a7922@mail.gmail.com> References: <291941b81002150321w7b0479beo1c6fec39ef6a7922@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 15 February 2010 6:21:40 am Shrikanth Kamath wrote: > 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? > > thread(client_info) > { > ... > ... > build_msg(client_info); /* this will malloc a mbuf and fill the data in > it */ > ... > sosend(client_info); > } > > I want to time the entry/return of build_msg, and the time sosend, dump > client_info (some specific fields). It is probably easier to do this with DTrace (albeit possibly with more overhead). You can ktrace a kthread fine, but you would need to write your own ktrace hooks (and record parser for kdump) which would take a bit longer than a D script with DTrace. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201002171413.56920.jhb>