/* * Don't refer to this struct directly, use functions below.
*/ struct ring_buffer_event {
u32 type_len:5, time_delta:27;
u32 array[];
};
/** * enum ring_buffer_type - internal ring buffer types * * @RINGBUF_TYPE_PADDING: Left over page padding or discarded event * If time_delta is 0: * array is ignored * size is variable depending on how much * padding is needed * If time_delta is non zero: * array[0] holds the actual length * size = 4 + length (bytes) * * @RINGBUF_TYPE_TIME_EXTEND: Extend the time delta * array[0] = time delta (28 .. 59) * size = 8 bytes * * @RINGBUF_TYPE_TIME_STAMP: Absolute timestamp * Same format as TIME_EXTEND except that the * value is an absolute timestamp, not a delta * event.time_delta contains bottom 27 bits * array[0] = top (28 .. 59) bits * size = 8 bytes * * <= @RINGBUF_TYPE_DATA_TYPE_LEN_MAX: * Data record * If type_len is zero: * array[0] holds the actual length * array[1..(length+3)/4] holds data * size = 4 + length (bytes) * else * length = type_len << 2 * array[0..(length+3)/4-1] holds data * size = 4 + length (bytes)
*/ enum ring_buffer_type {
RINGBUF_TYPE_DATA_TYPE_LEN_MAX = 28,
RINGBUF_TYPE_PADDING,
RINGBUF_TYPE_TIME_EXTEND,
RINGBUF_TYPE_TIME_STAMP,
};
/* * ring_buffer_discard_commit will remove an event that has not * been committed yet. If this is used, then ring_buffer_unlock_commit * must not be called on the discarded event. This function * will try to remove the event from the ring buffer completely * if another event has not been written after it. * * Example use: * * if (some_condition) * ring_buffer_discard_commit(buffer, event); * else * ring_buffer_unlock_commit(buffer, event);
*/ void ring_buffer_discard_commit(struct trace_buffer *buffer, struct ring_buffer_event *event);
/* * size is in bytes for each per CPU buffer.
*/ struct trace_buffer *
__ring_buffer_alloc(unsignedlong size, unsigned flags, struct lock_class_key *key);
/* * Because the ring buffer is generic, if other users of the ring buffer get * traced by ftrace, it can produce lockdep warnings. We need to keep each * ring buffer's lock class separate.
*/ #define ring_buffer_alloc(size, flags) \
({ \ staticstruct lock_class_key __key; \
__ring_buffer_alloc((size), (flags), &__key); \
})
/* * Because the ring buffer is generic, if other users of the ring buffer get * traced by ftrace, it can produce lockdep warnings. We need to keep each * ring buffer's lock class separate.
*/ #define ring_buffer_alloc_range(size, flags, order, start, range_size, s_size) \
({ \ staticstruct lock_class_key __key; \
__ring_buffer_alloc_range((size), (flags), (order), (start), \
(range_size), (s_size), &__key); \
})
typedefbool (*ring_buffer_cond_fn)(void *data); int ring_buffer_wait(struct trace_buffer *buffer, int cpu, int full,
ring_buffer_cond_fn cond, void *data);
__poll_t ring_buffer_poll_wait(struct trace_buffer *buffer, int cpu, struct file *filp, poll_table *poll_table, int full); void ring_buffer_wake_waiters(struct trace_buffer *buffer, int cpu);
size_t ring_buffer_nr_dirty_pages(struct trace_buffer *buffer, int cpu);
struct buffer_data_read_page; struct buffer_data_read_page *
ring_buffer_alloc_read_page(struct trace_buffer *buffer, int cpu); void ring_buffer_free_read_page(struct trace_buffer *buffer, int cpu, struct buffer_data_read_page *page); int ring_buffer_read_page(struct trace_buffer *buffer, struct buffer_data_read_page *data_page,
size_t len, int cpu, int full); void *ring_buffer_read_page_data(struct buffer_data_read_page *page);
struct trace_seq;
int ring_buffer_print_entry_header(struct trace_seq *s); int ring_buffer_print_page_header(struct trace_buffer *buffer, struct trace_seq *s);
int ring_buffer_subbuf_order_get(struct trace_buffer *buffer); int ring_buffer_subbuf_order_set(struct trace_buffer *buffer, int order); int ring_buffer_subbuf_size_get(struct trace_buffer *buffer);
int ring_buffer_map(struct trace_buffer *buffer, int cpu, struct vm_area_struct *vma); int ring_buffer_unmap(struct trace_buffer *buffer, int cpu); int ring_buffer_map_get_reader(struct trace_buffer *buffer, int cpu); #endif/* _LINUX_RING_BUFFER_H */
¤ Dauer der Verarbeitung: 0.14 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.