From: "Alexei Starovoitov" <alexei.starovoitov@gmail.com>
To: "Ihor Solodrai" <ihor.solodrai@linux.dev>,
"Alexei Starovoitov" <ast@kernel.org>,
"Andrii Nakryiko" <andrii@kernel.org>,
"Daniel Borkmann" <daniel@iogearbox.net>,
"Eduard Zingerman" <eddyz87@gmail.com>,
"Kumar Kartikeya Dwivedi" <memxor@gmail.com>,
"Song Liu" <song@kernel.org>
Cc: <bpf@vger.kernel.org>, <kernel-team@meta.com>
Subject: Re: [PATCH bpf-next v2] bpf: Better build_id caching in stack_map_get_build_id_offset()
Date: Fri, 12 Jun 2026 18:45:33 -0700 [thread overview]
Message-ID: <DJ7JIJEZ333Z.28J0XFPQ1RAFC@gmail.com> (raw)
In-Reply-To: <20260612220651.2507843-1-ihor.solodrai@linux.dev>
On Fri Jun 12, 2026 at 3:06 PM PDT, Ihor Solodrai wrote:
> +static void stack_map_build_id_cache_set_resolved(struct stack_map_build_id_cache *cache,
> + struct file *file,
> + const unsigned char *build_id,
> + unsigned long vm_start,
> + unsigned long vm_end,
> + unsigned long vm_pgoff)
> +{
> + if (cache->resolved.file)
> + fput(cache->resolved.file);
> + cache->resolved.file = file;
> + cache->resolved.build_id = build_id;
> + cache->resolved.vm_start = vm_start;
> + cache->resolved.vm_end = vm_end;
> + cache->resolved.vm_pgoff = vm_pgoff;
> +}
sorry for broken record.
claude's copy paste doesn't bother you?
It could have been:
struct resolved *res = &cache->resolved;
if (res->file)
fput(res->file);
res->file = file;
res->build_id = build_id;
res->vm_start = vm_start;
res->vm_end = vm_end;
res->vm_pgoff = vm_pgoff;
or
cache->resolved = (struct resolved) { file, build_iud, vm_start, emnv_end, vm_pgoff };
and probably other options to make a code easier for humans to read.
You have to explictly tell claude to deduplicate otherwise it keeps
copy pasting left and right.
next prev parent reply other threads:[~2026-06-13 1:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-12 22:06 [PATCH bpf-next v2] bpf: Better build_id caching in stack_map_get_build_id_offset() Ihor Solodrai
2026-06-12 22:37 ` bot+bpf-ci
2026-06-12 23:59 ` Ihor Solodrai
2026-06-13 1:45 ` Alexei Starovoitov [this message]
2026-06-13 4:38 ` Ihor Solodrai
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=DJ7JIJEZ333Z.28J0XFPQ1RAFC@gmail.com \
--to=alexei.starovoitov@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=ihor.solodrai@linux.dev \
--cc=kernel-team@meta.com \
--cc=memxor@gmail.com \
--cc=song@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox