[RFC PATCH 0/2 v3] Unified trace buffer

From: Steven Rostedt
Date: Thu Sep 25 2008 - 14:52:54 EST



[ NOTE function comments have not been updated. Comments within the
code has.]


This version I change the event header to what Peter Zijlstra requested.
The buffer alignment is now 4 from 8. The minimum event is 8 bytes.
The event header is now:

struct event_header {
u32 type:2, len:3, time_delta:27;
u32 array[];
};

The length of the record is determined as:

if (data size > 28 bytes)
lenght = event->array[0] + sizeof(event_header);
else
length = event->len << 4 + sizeof(event_header);

For data

if (date size > 28 bytes)
data = &event->array[0];
else
data = &event->array[1];


There are now only 4 internal data types:

0 - Padding
1 - time extent
2 - time stamp
3 - data

This is for internal buffer management only. Other event types should be
pushed to a higher layer, and stored in the data field.

The timing is basically the same as v2 but I added a reader side
ring_buffer_normalize_time_stamp() operation. As a test, I mult the
timestamp to -1, in both set and normalize operations. Whether this
actually tests anything is another story ;-)


I actually like this header and structure the best. And this may be
what I start working on for real.

So please speak up on this one.

I'm going to take a break from this and start doing my real work.
This will let others soak it up for a bit.

-- Steve


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/