[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ce062d82-41cb-42c0-b970-1312dbcd1094@elijahs.space>
Date: Thu, 21 Aug 2025 11:32:17 -0700
From: Elijah <me@...jahs.space>
To: Steven Rostedt <rostedt@...dmis.org>, Elijah Wright <git@...jahs.space>
Cc: Masami Hiramatsu <mhiramat@...nel.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org
Subject: Re: [PATCH] tracing: move buffer in trace_seq to end of struct
can we maybe encode the overflow state in seq_buf? check if
seq_buf_has_overflowed and clamp len back to the used size
(seq_buf_used) in a helper?
On 8/21/2025 8:53 AM, Steven Rostedt wrote:
> On Thu, 21 Aug 2025 11:43:55 -0400
> Steven Rostedt <rostedt@...dmis.org> wrote:
>
>> diff --git a/include/linux/trace_seq.h b/include/linux/trace_seq.h
>> index a93ed5ac3226..92364deb39a5 100644
>> --- a/include/linux/trace_seq.h
>> +++ b/include/linux/trace_seq.h
>> @@ -24,14 +24,12 @@ struct trace_seq {
>> char buffer[TRACE_SEQ_BUFFER_SIZE];
>> struct seq_buf seq;
>> size_t readpos;
>> - int full;
>> };
>>
>
> I should have tried compiling it before posting. But trace.c has this:
>
> ret = print_trace_line(iter);
> if (ret == TRACE_TYPE_PARTIAL_LINE) {
> iter->seq.full = 0;
> trace_seq_puts(&iter->seq, "[LINE TOO BIG]\n");
> }
>
> I need to figure out a clean way to fix that too :-p
>
> -- Steve
Powered by blists - more mailing lists