[DTrace-devel] [PATCH v2 00/23] USDT improvements
Nick Alcock
nick.alcock at oracle.com
Mon Nov 27 16:47:06 UTC 2023
This grab-bag of USDT improvements is dominated by two things:
- adding a per-probe split-out representation to teh DOF stash,
in service of...
- ... moving probe creation from dtprobed into dtrace
But there are a lot of related bugfixes I found in the process, from
overruns and corruption found with all non-ancient flexes through to fixing
USDT so that it can handle forking and execing processes properly through to
letting multiple dtraces probe a single process at the same time (something
you can currently do only if you eschew -p and -c and don't do any USDT or
pid probing). Many of these touch similar places or rely on earlier
commits: rather than go through a lot of pain trying to separate them out I
thought I'd just post the lot in one go. Sorry about the length of it, but
this took so long that I thought you'd rather see it sooner (and longer)
rather than later (in smaller pieces).
Unlike too many of my recent postings, all intermediate commits compile
(though I do not guarantee that USDT works well in all intermediate
commits).
Nick Alcock (23):
lexer: fix top-level probe ending in wildcard ambiguity handling
lexer, parser: remove manual implementation of parsing from a string
lexer: work around bug in flex <= 2.6.0
tests: drop bug workaround that is no longer needed
build: add a 'make native' target
dtprobed: logging improvements
compiler: add static assertions
dtprobed: add the DOF stash
dtrace provider: don't use functions from uprobes.h any more
dtprobed, usdt: move usdt probe creation/deletion to dtrace
proc: don't ptrace shortlived-grabbed processes if someone else is
ptracing them
usdt: test improvements
Revert "test: Have manyprobes clean up uprobes"
dtprobed: don't emit "dtprobed DEBUG" when not testing
runtest: put the in-tree-testing DOF stash under /tmp/runtest.*
dtprobed: fix the RuntimeDirectory
dtprobed: empty the DOF stash for exec()ed processes
drti: re-register DOF after fork
drti: async-signal-safeize
dtprobed: describe purpose
uprobe: the pid provider does not provide usdt probes
libproc: fix buffer overread if no auxvs are read
proc: do not access freed memory when discarding shortlived handles
.gitignore | 2 +
Makeconfig | 1 +
Maketargets | 4 +-
dtprobed/Build | 2 +-
dtprobed/dof_stash.c | 1746 +++++++++++++++++
dtprobed/dof_stash.h | 42 +
dtprobed/dtprobed.c | 329 +++-
dtprobed/dtprobed.service | 2 +
dtprobed/rpl_fuse_log.h | 4 +-
dtrace.spec | 6 +-
include/dtrace/pid.h | 6 +-
include/port.h | 4 +-
include/sys/compiler.h | 11 +
libcommon/Build | 4 +-
libcommon/dof_parser.h | 22 +-
libcommon/dof_parser_host.c | 6 +-
libcommon/uprobes.c | 343 ----
libcommon/uprobes.h | 35 -
libdtrace/Build | 3 +-
libdtrace/drti.c | 110 +-
libdtrace/dt_cc.c | 16 +-
libdtrace/dt_impl.h | 9 +-
libdtrace/dt_lex.l | 39 +-
libdtrace/dt_lex.yywrap.diff | 11 +
libdtrace/dt_open.c | 4 +-
libdtrace/dt_options.c | 18 +
libdtrace/dt_parser.h | 5 +-
libdtrace/dt_pcb.h | 2 -
libdtrace/dt_pid.c | 560 +++---
libdtrace/dt_pid.h | 1 -
libdtrace/dt_proc.c | 25 +-
libdtrace/dt_proc.h | 1 -
libdtrace/dt_prov_dtrace.c | 24 +-
libdtrace/dt_prov_uprobe.c | 135 +-
libport/daemonize.c | 62 +-
libproc/Pcontrol.c | 18 +
libproc/elfish.c | 5 +-
libproc/libproc.h | 1 +
runtest.sh | 16 +-
test/unittest/options/err.pspec-default.r | 2 +-
test/unittest/options/err.pspec-default.r.p | 4 -
test/unittest/usdt/tst.dlclose2.sh | 2 +-
test/unittest/usdt/tst.exec-dof-replacement.r | 1 +
.../usdt/tst.exec-dof-replacement.r.p | 2 +
.../unittest/usdt/tst.exec-dof-replacement.sh | 99 +
test/unittest/usdt/tst.manyprobes.sh | 20 +-
test/unittest/usdt/tst.manyprocs.sh | 35 +-
test/unittest/usdt/tst.multitrace.sh | 20 +-
48 files changed, 2896 insertions(+), 923 deletions(-)
create mode 100644 dtprobed/dof_stash.c
create mode 100644 dtprobed/dof_stash.h
delete mode 100644 libcommon/uprobes.c
delete mode 100644 libcommon/uprobes.h
create mode 100644 libdtrace/dt_lex.yywrap.diff
delete mode 100755 test/unittest/options/err.pspec-default.r.p
create mode 100644 test/unittest/usdt/tst.exec-dof-replacement.r
create mode 100755 test/unittest/usdt/tst.exec-dof-replacement.r.p
create mode 100755 test/unittest/usdt/tst.exec-dof-replacement.sh
--
2.42.0.271.g85384428f1
More information about the DTrace-devel
mailing list