From: Steven Rostedt <rostedt@goodmis.org>
To: William Cohen <wcohen@redhat.com>
Cc: mingo@redhat.com, LKML <linux-kernel@vger.kernel.org>
Subject: Re: Reason for unused flags argument in trace_raw_output_* function?
Date: Thu, 7 Oct 2021 09:20:26 -0400 [thread overview]
Message-ID: <20211007092026.644d25de@gandalf.local.home> (raw)
In-Reply-To: <4988d521-472f-a50e-4686-52afde08d2e9@redhat.com>
On Wed, 6 Oct 2021 23:49:22 -0400
William Cohen <wcohen@redhat.com> wrote:
> Hi,
>
> I have some code that analyzes x86_64 binaries
> (https://developers.redhat.com/articles/2021/08/09/debugging-function-parameters-
> dyninst#liveness_analysis) and list which function parameters are unused.
> I noticed that trace_raw_output_* functions have an unused flags
> argument. I assume this is is to make the argument list match up with
> some other function, but I couldn't see which function(s) the
> trace_raw_output_* functions are trying to match up with. Which
> functions are the trace_raw_output_* function's arguments trying to match?
>
The match of other printing functions is in kernel/trace/trace_output.c
And is called from kernel/trace/trace.c where one place it does pass in
flags:
static enum print_line_t print_trace_fmt(struct trace_iterator *iter)
{
[..]
if (event)
return event->funcs->trace(iter, sym_flags, event);
Now if they are still used, is something we should investigate.
This code has changed a lot over the years when that "flags" parameter was
introduced. It could now just be a relic from the old implementations.
Thanks for pointing this out. If I get time I'll look deeper into it, but
feel free to look at it yourself.
-- Steve
next prev parent reply other threads:[~2021-10-07 13:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-07 3:49 William Cohen
2021-10-07 13:20 ` Steven Rostedt [this message]
2021-10-07 14:31 ` William Cohen
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=20211007092026.644d25de@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=wcohen@redhat.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
all inboxes | Powered by JetHome®