Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Jul 2006 08:40:00 -0400
From:      Ed Maste <emaste@phaedrus.sandvine.ca>
To:        Olivier Warin <daffy@xview.net>
Cc:        freebsd-current@freebsd.org
Subject:   Re: KTR_SCHED broken ?
Message-ID:  <20060728124000.GA58825@sandvine.com>
In-Reply-To: <05BA8FC7-820D-44FB-B0F9-940AA8BCBDA4@xview.net>
References:  <05BA8FC7-820D-44FB-B0F9-940AA8BCBDA4@xview.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jul 27, 2006 at 11:22:56PM +0200, Olivier Warin wrote:

> [FROM MY KERNCONF]
> options KTR
> options ALQ
> options KTR_ALQ
> options KTR_ENTRIES=32768
> options KTR_COMPILE=KTR_SCHED
> options KTR_MASK=KTR_SCHED
> [EOF]
> 
> While KTR_INTR works, it seems that KTR_SCHED does not or maybee  
> there is a magic sause ?

It seems that KTR_SCHED doesn't work with KTR_ALQ.  With that
combination ktr_tracepoint() requires that td->td_critnest == 0,
which won't be true in the code paths that use KTR_SCHED.  For
now your best bet is probably to use KTR without ALQ, but of
course you're limited to a fixed number of entries.

I've thought about adding to ktrdump the ability to loop on reading
the ring buffer, so that it would be possible to read an arbitrarily
long sequence of KTR events without ALQ.  It's quite easy to
implement, but I haven't yet tried it out.

- Ed Maste



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060728124000.GA58825>