All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kris Van Hees <kris.van.hees@oracle.com>
To: Eugene Loh <eugene.loh@oracle.com>
Cc: dtrace-devel@oss.oracle.com, dtrace@lists.linux.dev
Subject: Re: [DTrace-devel] [PATCH 2/4] fbt: clean up fprobe/kprobe support
Date: Thu, 5 Dec 2024 17:17:23 -0500	[thread overview]
Message-ID: <Z1Imc8J6z85i1gEU@oracle.com> (raw)
In-Reply-To: <6efebe82-1f0e-2fce-3c78-cb734be36273@oracle.com>

On Thu, Dec 05, 2024 at 05:05:15PM -0500, Eugene Loh wrote:
> I wouldn't mind a few commit msg words on what "clean up" means.
> 
> Mostly, how/where is dt_fbt_fprobe used?  Put another way...
> 
> On 12/5/24 13:53, Kris Van Hees via DTrace-devel wrote:
> > diff --git a/libdtrace/dt_prov_fbt.c b/libdtrace/dt_prov_fbt.c
> > @@ -73,9 +75,10 @@ static int populate(dtrace_hdl_t *dtp)
> >   	dtrace_syminfo_t	sip;
> >   	dtrace_probedesc_t	pd;
> > -	impl = BPF_HAS(dtp, BPF_FEAT_FENTRY) ? &dt_fbt_fprobe : &dt_fbt_kprobe;
> > +	if (!BPF_HAS(dtp, BPF_FEAT_FENTRY))
> > +		dt_fbt = dt_fbt_kprobe;
> 
> If the BPF_HAS() test passes, shouldn't we have basically
> dt_fbt=dt_fbt_fprobe?  In which case, one might arguably go back to the
> ternary op?

Since dt_fbt is initialized as dt_fbt_fprobe (the default), this conditional
sets it to dt_fbt_kprobe if fprobes are not available.  I figured that was
obvious from the code.

  reply	other threads:[~2024-12-05 22:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-05 18:53 [PATCH 2/4] fbt: clean up fprobe/kprobe support Kris Van Hees
2024-12-05 22:05 ` [DTrace-devel] " Eugene Loh
2024-12-05 22:17   ` Kris Van Hees [this message]
2024-12-05 22:58     ` Eugene Loh
2024-12-05 23:09       ` Kris Van Hees

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=Z1Imc8J6z85i1gEU@oracle.com \
    --to=kris.van.hees@oracle.com \
    --cc=dtrace-devel@oss.oracle.com \
    --cc=dtrace@lists.linux.dev \
    --cc=eugene.loh@oracle.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 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.