All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dave@treblig.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-trace-kernel@vger.kernel.org
Subject: Re: ftrace_direct_func_count ?
Date: Mon, 6 May 2024 17:26:16 +0000	[thread overview]
Message-ID: <ZjkSuOAGH5ml7YiP@gallifrey> (raw)
In-Reply-To: <20240506132515.11754794@gandalf.local.home>

* Steven Rostedt (rostedt@goodmis.org) wrote:
> On Sat, 4 May 2024 13:35:26 +0000
> "Dr. David Alan Gilbert" <dave@treblig.org> wrote:
> 
> > Hi,
> >   I've just posted a patch 'ftrace: Remove unused list 'ftrace_direct_funcs''
> > that clears out some old code, but while at it I noticed the global
> > 'ftrace_direct_func_count'.
> > 
> > As far as I can tell, it's never assigned (or initialised) but it is tested:
> > 
> > kernel/trace/fgraph.c:
> > #ifndef CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS
> >   /*
> >    * Skip graph tracing if the return location is served by direct trampoline,
> >    * since call sequence and return addresses are unpredictable anyway.
> >    * Ex: BPF trampoline may call original function and may skip frame
> >    * depending on type of BPF programs attached.
> >    */
> >   if (ftrace_direct_func_count &&
> >       ftrace_find_rec_direct(ret - MCOUNT_INSN_SIZE))
> >     return -EBUSY;
> > #endif
> > 
> > So I wasn't sure whether it was just safe to nuke that section
> > or whether it really needed fixing?
> 
> Yes, after commit 8788ca164eb4bad ("ftrace: Remove the legacy
> _ftrace_direct API") that variable is no longer used.

OK, thanks, I'll send a follow up patch to my other patch to nuke
this as well.

Dave

> -- Steve
-- 
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/

      reply	other threads:[~2024-05-06 17:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-04 13:35 ftrace_direct_func_count ? Dr. David Alan Gilbert
2024-05-06 17:25 ` Steven Rostedt
2024-05-06 17:26   ` Dr. David Alan Gilbert [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=ZjkSuOAGH5ml7YiP@gallifrey \
    --to=dave@treblig.org \
    --cc=linux-trace-kernel@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.