lkml.org 
[lkml]   [2018]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v9 0/4] Uprobes: Support SDT markers having reference count (semaphore)
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?


- Naveen


\
 
 \ /
  Last update: 2018-08-21 09:35    [W:0.706 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site