[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180703061612.GG65296@linux.vnet.ibm.com>
Date: Mon, 2 Jul 2018 23:16:12 -0700
From: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
To: Ravi Bangoria <ravi.bangoria@...ux.ibm.com>
Cc: Oleg Nesterov <oleg@...hat.com>, rostedt@...dmis.org,
mhiramat@...nel.org, peterz@...radead.org, mingo@...hat.com,
acme@...nel.org, alexander.shishkin@...ux.intel.com,
jolsa@...hat.com, namhyung@...nel.org,
linux-kernel@...r.kernel.org, corbet@....net,
linux-doc@...r.kernel.org, ananth@...ux.vnet.ibm.com,
alexis.berlemont@...il.com, naveen.n.rao@...ux.vnet.ibm.com,
linux-arm-kernel@...ts.infradead.org, linux-mips@...ux-mips.org,
linux@...linux.org.uk, ralf@...ux-mips.org, paul.burton@...s.com
Subject: Re: [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
Powered by blists - more mailing lists