[RFC patch 0/4] stapsdt provider: simple system-wide probing

Alan Maguire <[email protected]>
Newsgroups dev.linux.lists.dtrace
Message-ID <[email protected]>
This series adds wildcard support to stapsdt probes to allow
tracing system-wide; this has caveats due to the way the kernel
implements probe addition.  In essence, probes will fire for
new programs launched since instrumentation was attached, but
will work for libraries in existing programs.  See example
in patch 4 for how we can use this to trace libpython system-wide.

Patch 1 describes the approach; to facilitate systemwide tracing
we need to tell DTrace the name of the binary/library via the
module field in the probe specifier; we then use [LD_LIBRARY_]PATH
to resolve the full path.  ELF reading of the file and insertion
of probes then proceeds in a similar manner to per-pid tracing.

Patches 2/3 are tests for binary/library tracing, and patch 4
updates docs.

Alan Maguire (4):
  stapsdt provider: support systemwide probing
  test: add systemwide stapsdt note test
  test: add systemwide stapsdt note test for library
  documentation: update stapsdt docs to describe wildcard support

 .../reference/dtrace_providers_stapsdt.md     |  41 ++++-
 libdtrace/dt_pid.c                            | 158 ++++++++++++++----
 libdtrace/dt_prov_uprobe.c                    |  12 +-
 .../usdt/tst.stapsdt-notes-systemwide-lib.r   |  14 ++
 .../usdt/tst.stapsdt-notes-systemwide-lib.sh  | 142 ++++++++++++++++
 .../usdt/tst.stapsdt-notes-systemwide.r       |   2 +
 .../usdt/tst.stapsdt-notes-systemwide.sh      |  51 ++++++
 7 files changed, 378 insertions(+), 42 deletions(-)
 create mode 100644 test/unittest/usdt/tst.stapsdt-notes-systemwide-lib.r
 create mode 100755 test/unittest/usdt/tst.stapsdt-notes-systemwide-lib.sh
 create mode 100644 test/unittest/usdt/tst.stapsdt-notes-systemwide.r
 create mode 100755 test/unittest/usdt/tst.stapsdt-notes-systemwide.sh

-- 
2.43.5
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.