[Openais] [RFC] simple blackbox

Lars Marowsky-Bree lmb at suse.de
Wed Oct 8 23:44:49 PDT 2008


On 2008-10-08T21:08:16, Steven Dake <sdake at redhat.com> wrote:

> Attached is my version which is as of yet incomplete.  The general
> concept is to allow very high performance event tracing with minimal
> formatting overhead (formatting is done in a separate program after a
> crash or to debug current program state).  I'd also like to get rid of
> the critical section code in the current logsys as much as possible.
> 
> It uses a chunked circular word (32 bit) buffer of arbitrary length to
> store data records.  It allows a variable length list of variable length
> arguments.  It records the subsystem name, filename, function name, line
> number, log identification used for replay output mapping, and record
> number as well as the arguments and their lengths.  The implementation
> only ever makes one copy of data at any time and copies/stores most
> things in 1 word operations.  memcpy sucks on x86 for small memory
> segments, which is why there is a C implementation of memcpy included.

I am not entirely sure I agree with this design.

The goal was to have a blackbox which we cannot just retroactively dump,
but also easily recover from a core or kernel crashdump. 

I am not entirely convinced that that is the right time to start using
pointer-heavy structures such as atomized strings, a separate memory
allocator, etc.

I would maintain that I'd prefer a ring buffer of messages logged (at +n
log levels above the actual log level configured), in their printable
char[] form.

That would also ensure that we are looking at exactly the same strings
as were eventually logged externally, which could be very much useful to
correlate the logs from the blackbox with those in the system logs.


Regards,
    Lars

-- 
Teamlead Kernel, SuSE Labs, Research and Development
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
"Experience is the name everyone gives to their mistakes." -- Oscar Wilde



More information about the Openais mailing list