[Bug translator/22312] New: bpf: global variable locking

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug translator/22312] New: bpf: global variable locking

schwab@linux-m68k.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22312

            Bug ID: 22312
           Summary: bpf: global variable locking
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
          Assignee: systemtap at sourceware dot org
          Reporter: amerey at redhat dot com
  Target Milestone: ---

May need an explicit bpf array for lock tracking.

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug translator/22312] bpf: global variable locking

schwab@linux-m68k.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22312

--- Comment #1 from Aaron Merey <amerey at redhat dot com> ---
We want to implement stap's locking of globals on a per-probe basis.

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug translator/22312] bpf: global variable locking

schwab@linux-m68k.org
In reply to this post by schwab@linux-m68k.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22312

Serhei Makarov <me at serhei dot io> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |me at serhei dot io

--- Comment #2 from Serhei Makarov <me at serhei dot io> ---
https://sourceware.org/ml/systemtap/2018-q3/msg00017.html describes one
possible way of doing this:

BPF_XADD(&lock_counter, 1);
value = read(lock_counter);
if (value <= 1) { ... execute probe ... } else skip probe
BPF_XADD(&lock_counter, -1);

--
You are receiving this mail because:
You are the assignee for the bug.