[PATCH v9 0/4] Uprobes: Support SDT markers having reference count (semaphore)

From
Song Liu <hidden>
Date
2018-08-21 04:55:42
Also in
linux-mips, lkml
Reply to
Ravi Bangoria, 2018-08-21
On Mon, Aug 20, 2018 at 9:42 PM, Ravi Bangoria
[off-list ref] wrote:
Hi Song,
quoted
root at virt-test:~# ~/a.out
11
semaphore 0
semaphore 0
semaphore 2      <<<  when the uprobe is enabled
Yes, this happens when multiple vmas points to the same file portion.
Can you check /proc/`pgrep a.out`/maps.

Logic is simple. If we are going to patch an instruction, increment the
reference counter. If we are going to unpatch an instruction, decrement
the reference counter. In this case, we patched instruction twice and
thus incremented reference counter twice as well.
Yes, this makes sense.

Song
Ravi
Thread (24 messages) 24 messages, 6 authors, last reply 2018-08-30
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help