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@lists.linux.dev, dtrace-devel@oss.oracle.com
Subject: Re: [PATCH v2 1/6] bpf: separate bvar implementation into separate functions
Date: Tue, 28 Jan 2025 18:35:13 -0500 [thread overview]
Message-ID: <Z5lpsQVsme+dwGVa@oracle.com> (raw)
In-Reply-To: <996362c0-a77b-9265-395b-bfd9d17e9343@oracle.com>
On Tue, Jan 28, 2025 at 06:29:43PM -0500, Eugene Loh wrote:
> Reviewed-by: Eugene Loh <eugene.loh@oracle.com>
>
> If there is some quantification or other characterization of the benefit
> that could be added to the commit message, that would be nice.
Sure.
> And...
>
> On 1/28/25 01:31, Kris Van Hees wrote:
> > The handling of builtin variables was done with a single big function
> > that therefore got linked into every single BPF program (twice if the
> > builtin variable might raise a fault). Providing separate functions
> > for most builtin variables reduces BPF program size significantly.
> >
> > This also reduces pressure on the BPF verifies.
> >
> > Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
> >
> > diff --git a/bpf/get_bvar.c b/bpf/get_bvar.c
> > @@ -19,18 +19,21 @@
> > # define noinline __attribute__((noinline))
> > #endif
> > -extern struct bpf_map_def cpuinfo;
> > -extern struct bpf_map_def probes;
> > -extern struct bpf_map_def state;
> > -extern struct bpf_map_def usdt_names;
> > -
> > -extern uint64_t PC;
> > -extern uint64_t STBSZ;
> > -extern uint64_t STKSIZ;
> > -extern uint64_t BOOTTM;
> > +extern struct bpf_map_def cpuinfo;
> > +extern struct bpf_map_def probes;
> > +extern struct bpf_map_def state;
> > +extern struct bpf_map_def usdt_names;
> > +
> > +extern uint64_t BOOTTM;
> > +extern uint64_t NPROBES;
> > +extern uint64_t PC;
> > +extern uint64_t STBSZ;
> > +extern uint64_t STKSIZ;
> > extern uint64_t STACK_OFF;
> > -extern uint64_t STACK_SKIP;
> > -extern uint64_t NPROBES;
> > +extern uint64_t STACK_SKIP;
> > +extern uint64_t TASK_COMM;
> > +extern uint64_t TASK_REAL_PARENT;
> > +extern uint64_t TASK_TGID;
>
> Did you intend to change the indentation on STACK_OFF as well?
Woops, will fix.
prev parent reply other threads:[~2025-01-28 23:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-28 6:31 [PATCH v2 1/6] bpf: separate bvar implementation into separate functions Kris Van Hees
2025-01-28 23:29 ` Eugene Loh
2025-01-28 23:35 ` 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=Z5lpsQVsme+dwGVa@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