lkml.org 
[lkml]   [2018]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 06/10] Uprobes: Support SDT markers having reference count (semaphore)
> Current approach:
>
> ------------
> register_for_each_vma() / uprobe_mmap()
> install_breakpoint()
> uprobe_write_opcode() {
> if (instruction is not already patched) {
> /* Gets called only _once_. */
> increment the reference counter;
> patch the instruction;
> }
> }
> ------------
>

Lets say a user just installs a breakpoint which is part of USDT (using
either a trace or perf (or some other utility)
Since the semaphore is not updated, it never hits the probe.
This is correct.

Now he toggles the semaphore and places a probe at the same spot using
systemtap or bcc.
The probes will now be active and we see hits.
This is also correct.

If the user toggles the semaphore or deletes the probe using
systemtap/bcc. The probes will still be active.
Since the reference count is removed on the last consumer deletion. No?
This may be wrong because, we may be unnecessarily hitting the probes.


> Thanks,
> Ravi

\
 
 \ /
  Last update: 2018-07-03 08:17    [W:2.050 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site