Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Feb 2013 08:22:10 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        Andriy Gapon <avg@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r246282 - in head/sys: conf kern
Message-ID:  <201302060822.10573.jhb@freebsd.org>
In-Reply-To: <511256C7.6080406@FreeBSD.org>
References:  <201302030957.r139vd8n027213@svn.freebsd.org> <201302051115.03275.jhb@freebsd.org> <511256C7.6080406@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday, February 06, 2013 8:12:39 am Andriy Gapon wrote:
> on 05/02/2013 18:15 John Baldwin said the following:
> > Almost.  To handle the case where the boot buffer might have wrapped I think
> > you should copy the entries at the "end" into the head of the KTR buffer
> > first, then the entries from the front to the current index, and then update
> > the index to point at the end (it should effectively be KTR_BOOT_ENTRIES
> > I think).
> 
> I decided to just copy the whole buffer.  That should cover all the possible cases
> and should not be too expensive.

Hmm, I think this doesn't quite work.  Suppose the buffer has wrapped but only a
few new entries are logged (so that there are zero'd entries at the end of the
larger buffer).  In this case that things like 'ktrdump' and 'show ktr' will only
show events from the start of the buffer up to the index and will miss the old
events after the current index.  (They walk the buffer backwards and stop at the
first "empty" entry.)

-- 
John Baldwin



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