mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tao Chen <chen.dylane@linux.dev>
To: Jiri Olsa <olsajiri@gmail.com>
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: Fri, 6 Jun 2025 10:31:15 +0800	[thread overview]
Message-ID: <29d26dea-a0c1-4b1d-adf5-6161c4b16c0d@linux.dev> (raw)
In-Reply-To: <aEIR8SBXrV9PgQ0L@krava>

在 2025/6/6 05:53, Jiri Olsa 写道:
> 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
> 

will add it in v2, thanks.

> 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


-- 
Best Regards
Tao Chen

      reply	other threads:[~2025-06-06  2:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-04 16:37 Tao Chen
2025-06-05 18:41 ` Andrii Nakryiko
2025-06-06  2:36   ` Tao Chen
2025-06-05 21:53 ` Jiri Olsa
2025-06-06  2:31   ` Tao Chen [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=29d26dea-a0c1-4b1d-adf5-6161c4b16c0d@linux.dev \
    --to=chen.dylane@linux.dev \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --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=olsajiri@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®