On Mon, Mar 07, 2011 at 09:32:59PM +0800, Daniel Veillard wrote:
On Mon, Mar 07, 2011 at 01:22:09PM +0000, Daniel P. Berrange wrote:
> On Mon, Mar 07, 2011 at 09:18:46PM +0800, Daniel Veillard wrote:
> > the problem is that I really want to empty the buffer as a
> > result of emitting the logs, i.e. the reader will emit only once
> > the content at most.
>
> While emptying the buffer is nice, I don't actually think it is
> too important. Upon SEGV,BUS,FPE etc we're going to abort the
> entire process anyway, so clearing the buffer isn't neccessary.
> With SIGUSR2, if the user triggers it multiple times, they will
> likely have left enough time between invocation that the original
> data has been already overwritten. So clearing the buffer is a
> minor non-critical optmization for that.
Well it's actually interesting to see what my have happen between
exactly 2 instruction on an otherwise idle system, and consecutive
USR2 gives this if we flush, I palyed with this a bit and I like the
feature, it would be sad to drop this if we can avoid.
IIUC, the messages written in the log buffer have the timestamp prepended
to each entry, you could likely identify any overlap betweeen two USR2
dumps via the timestamps.
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|:
http://entangle-photo.org -o-
http://live.gnome.org/gtk-vnc :|