Re: [PATCH perf/core 03/11] perf: Add support to attach standard unique uprobe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 03, 2025 at 01:59:13PM +0200, Oleg Nesterov wrote:
> Slightly off-topic, but
> 
> On 09/02, Jiri Olsa wrote:
> >
> > @@ -11144,7 +11147,7 @@ static int perf_uprobe_event_init(struct perf_event *event)
> >  {
> >  	int err;
> >  	unsigned long ref_ctr_offset;
> > -	bool is_retprobe;
> > +	bool is_retprobe, is_unique;
> >  
> >  	if (event->attr.type != perf_uprobe.type)
> >  		return -ENOENT;
> > @@ -11159,8 +11162,9 @@ static int perf_uprobe_event_init(struct perf_event *event)
> >  		return -EOPNOTSUPP;
> >  
> >  	is_retprobe = event->attr.config & PERF_PROBE_CONFIG_IS_RETPROBE;
> > +	is_unique = event->attr.config & PERF_PROBE_CONFIG_IS_UNIQUE;
> >  	ref_ctr_offset = event->attr.config >> PERF_UPROBE_REF_CTR_OFFSET_SHIFT;
> > -	err = perf_uprobe_init(event, ref_ctr_offset, is_retprobe);
> > +	err = perf_uprobe_init(event, ref_ctr_offset, is_retprobe, is_unique);
> 
> I am wondering why (with or without this change) perf_uprobe_init() needs
> the additional arguments besides "event". It can look at event->attr.config
> itself?
> 
> Same for perf_kprobe_init()...

I think that's because we define enum perf_probe_config together
with PMU_FORMAT_ATTRs and code for attr->config parsing, which
makes sense to me

otherwise I think we could pass perf_event_attr all the way to
create_local_trace_[ku]probe 

jirka




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux