From: Steven Rostedt <rostedt@goodmis.org>
To: Ilya Leoshkevich <iii@linux.ibm.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Sven Schnelle <svens@linux.ibm.com>,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>
Subject: Re: [PATCH] ftrace: Fix type of ftrace_graph_ent_entry.depth
Date: Sat, 12 Apr 2025 17:21:54 -0400 [thread overview]
Message-ID: <20250412172154.0a0ee9c6@batman.local.home> (raw)
In-Reply-To: <6bbd72b60478d363d03c268ce8095f8a@linux.ibm.com>
On Sat, 12 Apr 2025 23:01:05 +0200
Ilya Leoshkevich <iii@linux.ibm.com> wrote:
> On 2025-04-12 18:07, Steven Rostedt wrote:
> > On Fri, 11 Apr 2025 19:21:41 +0200
> > Ilya Leoshkevich <iii@linux.ibm.com> wrote:
> >
> >>
> >> - F_printk("--> %ps (%lu)", (void *)__entry->func, __entry->depth)
> >> + F_printk("--> %ps (%d)", (void *)__entry->func, __entry->depth)
> >
> > depth should never be negative. Why did you use "%d" and not "%u" ?
> >
> > -- Steve
>
> I used int, because it's int in ftrace_graph_ent and all other events.
> If you think it's a good idea, I can change them all to unsigned int in
> a follow-up patch.
Hmm, a change like that should have been in the change log and explained.
The reason the code has int is because it uses negative depth to break
out of iterations and such. But what is recorded is always zero or
positive.
Yeah, let's keep it exposed as unsigned int.
Thanks,
-- Stene
prev parent reply other threads:[~2025-04-12 21:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-11 17:21 [PATCH] ftrace: Fix type of ftrace_graph_ent_entry.depth Ilya Leoshkevich
2025-04-12 16:07 ` Steven Rostedt
2025-04-12 21:01 ` Ilya Leoshkevich
2025-04-12 21:21 ` Steven Rostedt [this message]
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=20250412172154.0a0ee9c6@batman.local.home \
--to=rostedt@goodmis.org \
--cc=agordeev@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=iii@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=svens@linux.ibm.com \
/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;
as well as URLs for NNTP newsgroup(s).