This is the mail archive of the systemtap@sources.redhat.com mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Fwd: Re: [PATCH] Return probe]


On Wed, 2005-04-27 at 07:21, Prasanna S Panchamukhi wrote:
>  
> Below is detail explaination, using which you can implement retprobe feature
> and use unregister_kprobe() cleanly.

I like this approach -- only slightly messier on registration,and
cleaner elsewhere.  I don't see any obvious problems.

> Can you post your patch after the changes.

Pretty sure of yourself, aren't you? :-)  But yeah, Hien tells me he's
going to fold this in and see what it looks like.

Thanks for the ideas.

Jim

> 
> Please let me know if you need any help.
> 
> Thanks
> Prasanna
> 
> You can use two heads and two nodes..along with the kretprobe_table[]
> and provide cleaner interface.
> free_instances - contain instances which are free.
> used_instances - contain instances which are used and also
> another link will be present in th kretprobe_table[]
> Only one link of an instance structure can  exist on 
> free_instances list, but two links will exist for an instance in use(on 
> used_instaces and kretprobe_table).
...
> During unregisteration you can initially unregister the entrypoint probe.
> Later free the instances present on the free_instances, also delete
> the intances from the used list and mark them for freeing by 
> marking ri->rp = NULL;
> These instances under use can be freed either in flush_task() or in 
> tarmpoline_posthandler().
> 
> No need for a sparate copy of kretprobe after unregistering.
> there is no need to call the handlers, just we need to free the
> instance structure and replace back the original return address on the
> stack.
...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]