From: Kris Van Hees <kris.van.hees@oracle.com>
To: Eugene Loh <eugene.loh@oracle.com>
Cc: Kris Van Hees <kris.van.hees@oracle.com>,
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 18:09:26 -0500 [thread overview]
Message-ID: <Z1IyprIkK9qUbYJ3@oracle.com> (raw)
In-Reply-To: <b7c1fd43-d7e8-37b2-649f-609c54db40c9@oracle.com>
On Thu, Dec 05, 2024 at 05:58:04PM -0500, Eugene Loh wrote:
> On 12/5/24 17:17, Kris Van Hees wrote:
>
> > 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.
>
> Sorry, where should I look to see that dt_fbt is initialized to
> dt_fbt_fprobe?
Oh right - that was in the previous version. But on OL7, gcc complained about
that assignment. But I didn't complete the change in the patch I posted.
Let me post the corrct one (and yes, the ternary comes back).
prev parent reply other threads:[~2024-12-05 23:09 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
2024-12-05 22:58 ` Eugene Loh
2024-12-05 23:09 ` Kris Van Hees [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=Z1IyprIkK9qUbYJ3@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox