From: Eduard Zingerman <eddyz87@gmail.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: bpf@vger.kernel.org, ast@kernel.org, andrii@kernel.org,
daniel@iogearbox.net, martin.lau@linux.dev, kernel-team@fb.com,
yonghong.song@linux.dev, sunhao.th@gmail.com
Subject: Re: [PATCH bpf-next 2/4] bpf: track find_equal_scalars history on per-instruction level
Date: Thu, 29 Feb 2024 00:39:06 +0200 [thread overview]
Message-ID: <a7fc023a8c19d96448d7143292f5366b15e7a10a.camel@gmail.com> (raw)
In-Reply-To: <CAEf4BzbRQRSDhb_qOdKBBx8r-qa25cTu29KWVdxBq7V6zEGfrQ@mail.gmail.com>
On Wed, 2024-02-28 at 13:36 -0800, Andrii Nakryiko wrote:
[...]
> I'd say it's not about a number of lines, it's about ease of
> understanding, reasoning, and using these helpers.
>
> I do prefer the code you wrote below, but I'm not going to die on this
> hill if you insist. I'll go think about the rest of the logic.
Ok, code is meant to be read, so I'll switch to below in v2.
[...]
> > static u64 linked_reg_set_pack(struct linked_reg_set *s)
> > {
> > u64 val = 0;
> > int i;
> >
> > for (i = 0; i < s->cnt; ++i) {
> > struct reg_or_spill *r = &s->reg_set[i];
> > u64 tmp = 0;
> >
> > tmp |= r->frameno & ES_FRAMENO_MASK;
> > tmp |= (r->spi & ES_SPI_MASK) << ES_SPI_OFF;
>
> nit: we shouldn't mask anything here, it just makes an impression that
> r->frameno can be bigger than we have bits for it in a bitmask
Ok, I'll add bitmasks to field definitions and remove masks here.
[...]
next prev parent reply other threads:[~2024-02-28 22:39 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-22 0:50 [PATCH bpf-next 0/4] bpf: track find_equal_scalars history on per-instruction level Eduard Zingerman
2024-02-22 0:50 ` [PATCH bpf-next 1/4] bpf: replace env->cur_hist_ent with a getter function Eduard Zingerman
2024-02-28 19:46 ` Andrii Nakryiko
2024-02-28 21:23 ` Eduard Zingerman
2024-02-22 0:50 ` [PATCH bpf-next 2/4] bpf: track find_equal_scalars history on per-instruction level Eduard Zingerman
2024-02-28 19:58 ` Andrii Nakryiko
2024-02-28 21:16 ` Eduard Zingerman
2024-02-28 21:36 ` Andrii Nakryiko
2024-02-28 22:39 ` Eduard Zingerman [this message]
2024-02-28 21:40 ` Andrii Nakryiko
2024-02-28 23:01 ` Andrii Nakryiko
2024-02-28 23:29 ` Eduard Zingerman
2024-03-01 17:34 ` Andrii Nakryiko
2024-03-01 17:44 ` Eduard Zingerman
2024-03-04 23:37 ` Andrii Nakryiko
2024-02-22 0:50 ` [PATCH bpf-next 3/4] bpf: remove mark_precise_scalar_ids() Eduard Zingerman
2024-02-22 0:50 ` [PATCH bpf-next 4/4] selftests/bpf: tests for per-insn find_equal_scalars() precision tracking Eduard Zingerman
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=a7fc023a8c19d96448d7143292f5366b15e7a10a.camel@gmail.com \
--to=eddyz87@gmail.com \
--cc=andrii.nakryiko@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@fb.com \
--cc=martin.lau@linux.dev \
--cc=sunhao.th@gmail.com \
--cc=yonghong.song@linux.dev \
/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