From: Elijah <me@elijahs.space>
To: Steven Rostedt <rostedt@goodmis.org>, Elijah Wright <git@elijahs.space>
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH] tracing: move buffer in trace_seq to end of struct
Date: Thu, 21 Aug 2025 11:32:17 -0700 [thread overview]
Message-ID: <ce062d82-41cb-42c0-b970-1312dbcd1094@elijahs.space> (raw)
In-Reply-To: <20250821115359.3988b807@gandalf.local.home>
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@goodmis.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
next prev parent reply other threads:[~2025-08-21 18:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-21 5:39 Elijah Wright
2025-08-21 15:43 ` Steven Rostedt
2025-08-21 15:53 ` Steven Rostedt
2025-08-21 18:32 ` Elijah [this message]
2025-09-02 20:00 ` Steven Rostedt
2025-09-02 20:03 ` Elijah
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ce062d82-41cb-42c0-b970-1312dbcd1094@elijahs.space \
--to=me@elijahs.space \
--cc=git@elijahs.space \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®