This is the mail archive of the systemtap@sourceware.org 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: [PATCH v3 2.6.39-rc1-tip 6/26] 6: Uprobes: register/unregister probes.


On Fri, 2011-04-01 at 20:03 +0530, Srikar Dronamraju wrote:
> +static int remove_uprobe(struct mm_struct *mm, struct uprobe *uprobe)
> +{
> +       int ret = 0;
> +
> +       /*TODO: remove breakpoint */
> +       if (!ret)
> +               atomic_dec(&mm->uprobes_count);
> +
> +       return ret;
> +}

> +static void delete_uprobe(struct mm_struct *mm, struct uprobe *uprobe)
> +{
> +       down_read(&mm->mmap_sem);
> +       remove_uprobe(mm, uprobe);
> +       list_del(&mm->uprobes_list);
> +       up_read(&mm->mmap_sem);
> +       mmput(mm);
> +}

> +static void erase_uprobe(struct uprobe *uprobe)
> +{
> +       unsigned long flags;
> +
> +       synchronize_sched();
> +       spin_lock_irqsave(&treelock, flags);
> +       rb_erase(&uprobe->rb_node, &uprobes_tree);
> +       spin_unlock_irqrestore(&treelock, flags);
> +       iput(uprobe->inode);
> +} 

remove,delete,erase.. head spins.. ;-)



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