From: Jiri Olsa <olsajiri@gmail.com>
To: Tao Chen <chen.dylane@linux.dev>
Cc: ast@kernel.org, daniel@iogearbox.net, john.fastabend@gmail.com,
andrii@kernel.org, martin.lau@linux.dev, eddyz87@gmail.com,
song@kernel.org, yonghong.song@linux.dev, kpsingh@kernel.org,
sdf@fomichev.me, haoluo@google.com, bpf@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH bpf-next] bpf: Add show_fdinfo for perf_event
Date: Thu, 5 Jun 2025 23:53:53 +0200 [thread overview]
Message-ID: <aEIR8SBXrV9PgQ0L@krava> (raw)
In-Reply-To: <20250604163723.3175258-1-chen.dylane@linux.dev>
On Thu, Jun 05, 2025 at 12:37:22AM +0800, Tao Chen wrote:
SNIP
> +static void bpf_perf_link_fdinfo_uprobe(const struct perf_event *event,
> + struct seq_file *seq)
> +{
> + const char *name;
> + int err;
> + u32 prog_id, type;
> + u64 offset, addr;
> + unsigned long missed;
> +
> + err = bpf_get_perf_event_info(event, &prog_id, &type, &name,
> + &offset, &addr, &missed);
hi,
addr now gets ref_ctr_offset:
823153334042 bpf: Add support to retrieve ref_ctr_offset for uprobe perf link
so let's display that
thanks,
jirka
> + if (err)
> + return;
> +
> + if (type == BPF_FD_TYPE_URETPROBE)
> + type = BPF_PERF_EVENT_URETPROBE;
> + else
> + type = BPF_PERF_EVENT_UPROBE;
> +
> + seq_printf(seq,
> + "name:\t%s\n"
> + "offset:\t%llu\n"
> + "event_type:\t%u\n"
> + "cookie:\t%llu\n",
> + name, offset, type, event->bpf_cookie);
> +
> +}
> #endif
>
SNIP
next prev parent reply other threads:[~2025-06-05 21:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-04 16:37 [PATCH bpf-next] bpf: Add show_fdinfo for perf_event Tao Chen
2025-06-05 18:41 ` Andrii Nakryiko
2025-06-06 2:36 ` Tao Chen
2025-06-05 21:53 ` Jiri Olsa [this message]
2025-06-06 2:31 ` Tao Chen
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=aEIR8SBXrV9PgQ0L@krava \
--to=olsajiri@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=chen.dylane@linux.dev \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=kpsingh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=sdf@fomichev.me \
--cc=song@kernel.org \
--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 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.