[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPhsuW4SQA+uu9=a2jT+KW0Yq=yCyWqe13KtsB_ATTMiNzCXkQ@mail.gmail.com>
Date: Mon, 20 Aug 2018 21:55:38 -0700
From: Song Liu <liu.song.a23@...il.com>
To: Ravi Bangoria <ravi.bangoria@...ux.ibm.com>
Cc: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
Oleg Nesterov <oleg@...hat.com>,
Steven Rostedt <rostedt@...dmis.org>, mhiramat@...nel.org,
Peter Zijlstra <peterz@...radead.org>, mingo@...hat.com,
acme@...nel.org, alexander.shishkin@...ux.intel.com,
jolsa@...hat.com, namhyung@...nel.org,
open list <linux-kernel@...r.kernel.org>,
ananth@...ux.vnet.ibm.com,
Alexis Berlemont <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 v9 0/4] Uprobes: Support SDT markers having reference
count (semaphore)
On Mon, Aug 20, 2018 at 9:42 PM, Ravi Bangoria
<ravi.bangoria@...ux.ibm.com> wrote:
> Hi Song,
>
>> root@...t-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
>
Powered by blists - more mailing lists