All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6 0/7] add support for stapsdt probes
@ 2025-07-28 16:36 Alan Maguire
  2025-07-28 16:36 ` [PATCH v6 1/7] usdt: have copy_args() count args while parsing them Alan Maguire
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Alan Maguire @ 2025-07-28 16:36 UTC (permalink / raw)
  To: dtrace; +Cc: dtrace-devel, Alan Maguire

As well as using dtrace -G to generate USDT probes, programs and
libraries may have added static probes via stapsdt ELF notes.
This series adds support for such probes.  Patch 1 prepares for
this support by adding counting to parsing of stapsdt probe args
(since they do not include an explicit arg count); Patch 2 adds
the support, while patches 3-7 add tests covering that support.

Changes since v5:

- update copy_args() to remove strlen() check on every iteration
  (Kris, patch 1)
- restrict to specific pid probing, removing wildcard support for
  now (Kris, patch 2)
- add support for semaphores for is-enabled like stapsdt probes
  (Kris, patch 2)
- add test for semaphore support (patch 7)

Changes since v4:

- fix up address computation to work for libraries and -fPIE
  binaries; add a test for the latter (Kris, patches 2,6)
- do mapfile, Paddr_to_map() lookups once for stapsdt probes
  (Kris, patch 2)

Changes since v3:

- merged with USDT ELF note changes; since these use the same
argument-parsing/access code, no need to add code for this now (patch 2)
- updated said ELF note parsing to count as well as parse arguments
since stapsdt probes do not provide an arg count (patch 1)
- added explicit stapsdt provider to reflect that stapsdt probes
are fundamentally different and do not auto-register for discovery
via ioctl (patch 2, Kris)
- added simple pid wildcarding support for /proc map parsing.

Changes since v2:

- updated terminology to distinguish stapsdt from USDT probes

Alan Maguire (7):
  usdt: have copy_args() count args while parsing them
  support stapsdt ELF-note-defined static probes
  selftests/usdt: add test for stapsdt note-defined probe firing, args
  selftests/usdt: add test for stapsdt notes in shared library
  selftests/usdt: add test covering different forms of stapsdt note args
  selftests/usdt: add test for stapsdt note-defined probe firing in
    -fPIE binary
  selftests/usdt: add is-enabled stapsdt tests using semaphores

 include/dtrace/pid.h                          |   2 +
 libdtrace/dt_pid.c                            | 284 ++++++++++
 libdtrace/dt_prov_uprobe.c                    |  72 ++-
 test/unittest/usdt/sdt_notes.h                | 504 ++++++++++++++++++
 test/unittest/usdt/tst.stapsdt-notes-args.r   |   2 +
 test/unittest/usdt/tst.stapsdt-notes-args.sh  |  50 ++
 .../usdt/tst.stapsdt-notes-isenabled.r        |  14 +
 .../usdt/tst.stapsdt-notes-isenabled.sh       | 151 ++++++
 test/unittest/usdt/tst.stapsdt-notes-lib.r    |  14 +
 test/unittest/usdt/tst.stapsdt-notes-lib.sh   | 145 +++++
 test/unittest/usdt/tst.stapsdt-notes-pie.sh   | 121 +++++
 test/unittest/usdt/tst.stapsdt-notes.r        |  14 +
 test/unittest/usdt/tst.stapsdt-notes.sh       | 121 +++++
 13 files changed, 1481 insertions(+), 13 deletions(-)
 create mode 100644 test/unittest/usdt/sdt_notes.h
 create mode 100644 test/unittest/usdt/tst.stapsdt-notes-args.r
 create mode 100755 test/unittest/usdt/tst.stapsdt-notes-args.sh
 create mode 100644 test/unittest/usdt/tst.stapsdt-notes-isenabled.r
 create mode 100755 test/unittest/usdt/tst.stapsdt-notes-isenabled.sh
 create mode 100644 test/unittest/usdt/tst.stapsdt-notes-lib.r
 create mode 100755 test/unittest/usdt/tst.stapsdt-notes-lib.sh
 create mode 100755 test/unittest/usdt/tst.stapsdt-notes-pie.sh
 create mode 100644 test/unittest/usdt/tst.stapsdt-notes.r
 create mode 100755 test/unittest/usdt/tst.stapsdt-notes.sh

-- 
2.39.3


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2025-07-29 13:16 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-28 16:36 [PATCH v6 0/7] add support for stapsdt probes Alan Maguire
2025-07-28 16:36 ` [PATCH v6 1/7] usdt: have copy_args() count args while parsing them Alan Maguire
2025-07-28 16:36 ` [PATCH v6 2/7] support stapsdt ELF-note-defined static probes Alan Maguire
2025-07-28 16:36 ` [PATCH v6 3/7] selftests/usdt: add test for stapsdt note-defined probe firing, args Alan Maguire
2025-07-28 16:36 ` [PATCH v6 4/7] selftests/usdt: add test for stapsdt notes in shared library Alan Maguire
2025-07-28 16:36 ` [PATCH v6 5/7] selftests/usdt: add test covering different forms of stapsdt note args Alan Maguire
2025-07-28 16:36 ` [PATCH v6 6/7] selftests/usdt: add test for stapsdt note-defined probe firing in -fPIE binary Alan Maguire
2025-07-28 16:36 ` [PATCH v6 7/7] selftests/usdt: add is-enabled stapsdt tests using semaphores Alan Maguire
2025-07-29  2:07   ` Kris Van Hees
2025-07-29  7:37     ` Alan Maguire
2025-07-29 11:49       ` Kris Van Hees
2025-07-29 13:16         ` Alan Maguire

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.