From: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
To: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>,
Song Liu <liu.song.a23@gmail.com>
Cc: acme@kernel.org, alexander.shishkin@linux.intel.com,
Alexis Berlemont <alexis.berlemont@gmail.com>,
ananth@linux.vnet.ibm.com, jolsa@redhat.com,
linux-arm-kernel@lists.infradead.org, linux@armlinux.org.uk,
open list <linux-kernel@vger.kernel.org>,
linux-mips@linux-mips.org, mhiramat@kernel.org, mingo@redhat.com,
namhyung@kernel.org, Oleg Nesterov <oleg@redhat.com>,
paul.burton@mips.com, Peter Zijlstra <peterz@infradead.org>,
ralf@linux-mips.org, Steven Rostedt <rostedt@goodmis.org>,
Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Subject: Re: [PATCH v9 0/4] Uprobes: Support SDT markers having reference count (semaphore)
Date: Tue, 21 Aug 2018 17:28:26 +0530 [thread overview]
Message-ID: <4445e941-551e-881f-c519-db82ed9b9b5c@linux.ibm.com> (raw)
In-Reply-To: <1534836620.dp1nz6tfz0.naveen@linux.ibm.com>
On 08/21/2018 01:04 PM, Naveen N. Rao wrote:
> Song Liu wrote:
>> I am testing the patch set with the following code:
>>
>> #include <stdio.h>
>> #include <unistd.h>
>>
>> volatile short semaphore = 0;
>>
>> int for_uprobe(int c)
>> {
>> printf("%d\n", c + 10);
>> return c + 1;
>> }
>>
>> int main(int argc, char *argv[])
>> {
>> for_uprobe(argc);
>> while (1) {
>> sleep(1);
>> printf("semaphore %d\n", semaphore);
>> }
>> }
>>
>> I created a uprobe on function for_uprobe(), that uses semaphore as
>> reference counter:
>>
>> echo "p:uprobe_1 /root/a.out:0x49a(0x1036)" >> uprobe_events
>
> Is that even valid? That _looks_ like a semaphore, but I'm not quite sure that it qualifies as an _SDT_ semaphore. Do you see this issue if you instead use the macros provided by <sys/sdt.h> to create SDT markers?
>
Right. By default SDT reference counters(semaphore) goes into .probes
section:
[25] .probes PROGBITS 000000000060102c 00102c 000004 00 WA 0 0 2
which has PROGBITS set. So this works fine. And there are many other
things which are coded into <sys/sdt.h>. So the official way to use
SDT markers should be through that.
Ravi
prev parent reply other threads:[~2018-08-21 11:58 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-20 4:42 Ravi Bangoria
2018-08-20 4:42 ` [PATCH v9 1/4] " Ravi Bangoria
2018-08-20 5:53 ` Song Liu
2018-08-21 21:35 ` Song Liu
2018-08-22 12:39 ` Srikar Dronamraju
2018-08-28 19:07 ` Song Liu
2018-08-28 19:34 ` Steven Rostedt
2018-08-20 4:42 ` [PATCH v9 2/4] Uprobes/sdt: Prevent multiple reference counter for same uprobe Ravi Bangoria
2018-08-20 5:54 ` Song Liu
2018-08-21 21:35 ` Song Liu
2018-08-20 4:42 ` [PATCH v9 3/4] trace_uprobe/sdt: " Ravi Bangoria
2018-08-21 20:46 ` Song Liu
2018-08-20 4:42 ` [PATCH v9 4/4] perf probe: Support SDT markers having reference counter (semaphore) Ravi Bangoria
2018-08-21 21:33 ` Song Liu
2018-08-30 18:45 ` Steven Rostedt
2018-08-30 18:50 ` Arnaldo Carvalho de Melo
2018-08-30 19:43 ` Steven Rostedt
2018-08-20 17:38 ` [PATCH v9 0/4] Uprobes: Support SDT markers having reference count (semaphore) Song Liu
2018-08-21 4:42 ` Ravi Bangoria
2018-08-21 4:55 ` Song Liu
2018-08-21 5:23 ` Ravi Bangoria
2018-08-21 6:20 ` Ravi Bangoria
2018-08-21 7:34 ` Naveen N. Rao
2018-08-21 11:58 ` Ravi Bangoria [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4445e941-551e-881f-c519-db82ed9b9b5c@linux.ibm.com \
--to=ravi.bangoria@linux.ibm.com \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=alexis.berlemont@gmail.com \
--cc=ananth@linux.vnet.ibm.com \
--cc=jolsa@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=linux@armlinux.org.uk \
--cc=liu.song.a23@gmail.com \
--cc=mhiramat@kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=naveen.n.rao@linux.vnet.ibm.com \
--cc=oleg@redhat.com \
--cc=paul.burton@mips.com \
--cc=peterz@infradead.org \
--cc=ralf@linux-mips.org \
--cc=rostedt@goodmis.org \
--cc=srikar@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®