Re: [DynInst_API:] Deleting snippets


Date: Wed, 18 Nov 2015 11:08:40 +0800
From: Marc BrÃnink <marc@xxxxxxxxx>
Subject: Re: [DynInst_API:] Deleting snippets
Hi,

I think I never got an answer to this one, did I?
-> Is it safe to delete snippets while a thread is executing them?

I suppose not. BPatchAddressSpace::deleteSnippet also seems to support the âno, not safeâ assumption.

So what is the best practice to delete a snippet?
Currently I just disable them using a flag. 

To actually delete them the way forward seems to be to 
1. Disable the snippet
2. Queue them for deletion
3. Wait until I get lucky enough that no thread is actually executing the snippet.

#3 might never happen, though.

So how to delete snippets?


Marc


> On 30 Mar 2015, at 4:32 pm, Marc BrÃnink <marc@xxxxxxxxx> wrote:
> 
> Dear all,
> 
> is it safe to delete a snippet while a thread is actually executing the snippet?
> If not, what is the current best practice to delete a snippet?
> 
> Kind regards,
> Marc


[← Prev in Thread] Current Thread [Next in Thread→]