diff options
Diffstat (limited to 'include/linux/trace_seq.h')
| -rw-r--r-- | include/linux/trace_seq.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/linux/trace_seq.h b/include/linux/trace_seq.h index 6be92bf559fe..9ec229dfddaa 100644 --- a/include/linux/trace_seq.h +++ b/include/linux/trace_seq.h @@ -8,20 +8,25 @@ /* * Trace sequences are used to allow a function to call several other functions - * to create a string of data to use (up to a max of PAGE_SIZE). + * to create a string of data to use. */ +#define TRACE_SEQ_BUFFER_SIZE (PAGE_SIZE * 2 - \ + (sizeof(struct seq_buf) + sizeof(size_t) + sizeof(int))) + struct trace_seq { - char buffer[PAGE_SIZE]; + char buffer[TRACE_SEQ_BUFFER_SIZE]; struct seq_buf seq; + size_t readpos; int full; }; static inline void trace_seq_init(struct trace_seq *s) { - seq_buf_init(&s->seq, s->buffer, PAGE_SIZE); + seq_buf_init(&s->seq, s->buffer, TRACE_SEQ_BUFFER_SIZE); s->full = 0; + s->readpos = 0; } /** |
