[DTrace-devel] [PATCH 0/3] Add python bindings for libdtrace interfaces

Alan Maguire alan.maguire at oracle.com
Fri May 15 13:44:12 UTC 2026


Having python bindings for libdtrace interfaces to compile, run
and collect information from DTrace programs is valuable because
it will help integration into metric collection frameworks like
PCP.  This series adds python bindings for DTrace (patch 1)
and provides tests for them (patches 2, 3).  The support is
similar to what cmd/dtrace.c can do; compile a program,
enable probes, run it and collect data.  Support is also
added to grab or create processes as is done by
dtrace -p, -c options.

For description, see the README in patch 1 and the tests.

Alan Maguire (3):
  python: Add cpython bindings for libdtrace
  runtest.sh: Export PYTHONPATH when running tests in-tree
  test/unittest: Add basic python bindings tests

 GNUmakefile                             |    2 +
 bindings/Build                          |   35 +
 bindings/python/README.md               |   68 ++
 bindings/python/pyproject.toml          |    3 +
 bindings/python/setup.py                |   52 +
 bindings/python/src/pydtrace_module.c   | 1187 +++++++++++++++++++++++
 configure                               |    4 +-
 dtrace.spec                             |   29 +-
 runtest.sh                              |    2 +
 test/unittest/python/tst.aggr.sh        |   59 ++
 test/unittest/python/tst.proc-create.sh |   56 ++
 test/unittest/python/tst.proc-grab.sh   |   81 ++
 12 files changed, 1575 insertions(+), 3 deletions(-)
 create mode 100644 bindings/Build
 create mode 100644 bindings/python/README.md
 create mode 100644 bindings/python/pyproject.toml
 create mode 100644 bindings/python/setup.py
 create mode 100644 bindings/python/src/pydtrace_module.c
 create mode 100755 test/unittest/python/tst.aggr.sh
 create mode 100755 test/unittest/python/tst.proc-create.sh
 create mode 100755 test/unittest/python/tst.proc-grab.sh

-- 
2.43.5




More information about the DTrace-devel mailing list