[DTrace-devel] [oracle/dtrace-utils] 0ee46b: btf: ensure BTF-to-CTF conversion works for modules

Kris Van Hees noreply at github.com
Fri Dec 13 21:31:17 UTC 2024


  Branch: refs/heads/2.0-branch-dev
  Home:   https://github.com/oracle/dtrace-utils
  Commit: 0ee46b9c93b5b4be86d220b6d9b714d7d24dbc01
      https://github.com/oracle/dtrace-utils/commit/0ee46b9c93b5b4be86d220b6d9b714d7d24dbc01
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-07-29 (Mon, 29 Jul 2024)

  Changed paths:
    M libdtrace/dt_module.c

  Log Message:
  -----------
  btf: ensure BTF-to-CTF conversion works for modules

The recent introduction of code to always load BTF data for modules
broke the BTF-to-CTF conversion for modules.  This patch ensures that
the BTF-to-CTF converter code is called from any module that does not
contain CTF data.

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Nick Alcock <nick.alcock at oracle.com>
Tested-by: Alan Maguire <alan.maguire at oracle.com>


  Commit: 9504832529c34269cd32977f74d06ad4ef462c29
      https://github.com/oracle/dtrace-utils/commit/9504832529c34269cd32977f74d06ad4ef462c29
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-07-29 (Mon, 29 Jul 2024)

  Changed paths:
    M dlibs/aarch64/5.11/io.d
    M dlibs/aarch64/5.12/io.d
    M dlibs/aarch64/5.14/io.d
    M dlibs/aarch64/5.16/io.d
    M dlibs/aarch64/5.2/io.d
    M dlibs/aarch64/5.6/io.d
    M dlibs/aarch64/6.1/io.d
    M dlibs/aarch64/6.10/io.d
    M dlibs/x86_64/5.11/io.d
    M dlibs/x86_64/5.12/io.d
    M dlibs/x86_64/5.14/io.d
    M dlibs/x86_64/5.16/io.d
    M dlibs/x86_64/5.2/io.d
    M dlibs/x86_64/5.6/io.d
    M dlibs/x86_64/6.1/io.d
    M dlibs/x86_64/6.10/io.d

  Log Message:
  -----------
  dlibs: fix access to `major_names data

On systems that lack CTF data, all kernel variable have a default type of
uintptr_t.  That means that an explicit &-operator needs to be applied
is the kernel variable is e.g. the address of an array because it will not
be recognized as a ref-type.

Fix this for `major_names access in the io translators.

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Nick Alcock <nick.alcock at oracle.com>


  Commit: 22b0b98905f1b7299b4d40eb1a22921630a474e0
      https://github.com/oracle/dtrace-utils/commit/22b0b98905f1b7299b4d40eb1a22921630a474e0
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-07-29 (Mon, 29 Jul 2024)

  Changed paths:
    M libdtrace/dt_btf.c

  Log Message:
  -----------
  btf: remove useless code

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>


  Commit: ab883bae5fd6c662684ac67bea32e9c4cd7f0bd4
      https://github.com/oracle/dtrace-utils/commit/ab883bae5fd6c662684ac67bea32e9c4cd7f0bd4
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-07-29 (Mon, 29 Jul 2024)

  Changed paths:
    M test/unittest/io/check_io_probe_args.sh
    M test/unittest/io/tst.local2.sh
    M test/unittest/scalars/tst.misc.x

  Log Message:
  -----------
  tests, io, scalars: use kallsyms instead of kallmodsyms where possible

io/tst.local2.sh works perfectly well with /proc/kallsyms with only a
tiny change in field numbering, which lets this test pass on
unmodified upstream kernels and kernels with the vmlinux.ranges
patch too.

Similarly, io/check_io_probe_args.sh also works fine with kallsyms,
without even any field change.

scalars/tst.misc.x needs adjusting to check for the presence of the actual
symbols we are looking up, since the modules might well be built-in, and
thus not show up in /proc/kallsyms.

More elaborate tests like tst.aggmod_full* and the consumer tests are not
touched by this commit: fixing them is a bigger problem.

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 9bee7cb4d1e72e041c68505748bea204f9f721b5
      https://github.com/oracle/dtrace-utils/commit/9bee7cb4d1e72e041c68505748bea204f9f721b5
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-07-29 (Mon, 29 Jul 2024)

  Changed paths:
    M test/unittest/aggs/tst.aggmod_full.x
    M test/unittest/aggs/tst.aggmod_full2.x

  Log Message:
  -----------
  test: if /proc/kallmodsyms does not exist, skip tests that require it

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>


  Commit: 3d131bf65a6272385cd5ab756b2f8ccdb1ebe5b2
      https://github.com/oracle/dtrace-utils/commit/3d131bf65a6272385cd5ab756b2f8ccdb1ebe5b2
  Author: eugene.loh at oracle.com <eugene.loh at oracle.com>
  Date:   2024-07-29 (Mon, 29 Jul 2024)

  Changed paths:
    M libdtrace/dt_aggregate.c
    M test/unittest/aggs/tst.aggmod_full.sh
    M test/unittest/profile-n/tst.ufunc.sh
    M test/unittest/profile-n/tst.umod.sh
    M test/unittest/profile-n/tst.usym.sh

  Log Message:
  -----------
  Consolidate like keys for @[mod()], @[sym()], etc.

Certain actions like mod() and sym() take address arguments and
report string values.  These values can be used as aggregation
keys.

DTrace happens to pass the raw addresses from producer to consumer,
for the consumer to convert to strings and combine like keys for
aggregation.  The reduction of common values had been omitted in the
DTrace-to-Linux port.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: ec9e6831ad1615d7d9816f75588175facb1edcca
      https://github.com/oracle/dtrace-utils/commit/ec9e6831ad1615d7d9816f75588175facb1edcca
  Author: eugene.loh at oracle.com <eugene.loh at oracle.com>
  Date:   2024-07-29 (Mon, 29 Jul 2024)

  Changed paths:
    M libdtrace/dt_map.c

  Log Message:
  -----------
  Fix minor dt_map.c typos

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 8cf714dbd0ba5f0bed0da350a600ebc857670a75
      https://github.com/oracle/dtrace-utils/commit/8cf714dbd0ba5f0bed0da350a600ebc857670a75
  Author: eugene.loh at oracle.com <eugene.loh at oracle.com>
  Date:   2024-07-29 (Mon, 29 Jul 2024)

  Changed paths:
    M test/unittest/arithmetic/tst.cast-imp-tvar.d

  Log Message:
  -----------
  test: Remove unnecessary preprocessor macro

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 67ab99db6cade382970be4803cffb09e0e2c55ee
      https://github.com/oracle/dtrace-utils/commit/67ab99db6cade382970be4803cffb09e0e2c55ee
  Author: eugene.loh at oracle.com <eugene.loh at oracle.com>
  Date:   2024-07-29 (Mon, 29 Jul 2024)

  Changed paths:
    M cmd/dtrace.c

  Log Message:
  -----------
  Generate clearer error message when dtrace is run not as root

It is a relatively simple mistake to run dtrace not as root, but
the resulting error message is not very clear.  Specifically, it
currently reports a very specific -xlockmem=unlimited message that
is no longer a common failure.  Generate a clearer message.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 602bc902d3acaf9a7a6b0c1939033b0e3798c792
      https://github.com/oracle/dtrace-utils/commit/602bc902d3acaf9a7a6b0c1939033b0e3798c792
  Author: eugene.loh at oracle.com <eugene.loh at oracle.com>
  Date:   2024-07-29 (Mon, 29 Jul 2024)

  Changed paths:
    M test/unittest/noresolve/tst.uaddr.sh
    M test/unittest/noresolve/tst.usym.sh
    M test/unittest/profile-n/tst.func.sh
    M test/unittest/profile-n/tst.mod.sh
    M test/unittest/profile-n/tst.sym.sh
    M test/unittest/profile-n/tst.ufunc.sh
    M test/unittest/profile-n/tst.umod.sh
    M test/unittest/profile-n/tst.usym.sh

  Log Message:
  -----------
  test: Simplify tick-* timeouts

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: ba1cd1d92f24bc87c56b775bb16bf53c53456312
      https://github.com/oracle/dtrace-utils/commit/ba1cd1d92f24bc87c56b775bb16bf53c53456312
  Author: eugene.loh at oracle.com <eugene.loh at oracle.com>
  Date:   2024-07-29 (Mon, 29 Jul 2024)

  Changed paths:
    M test/unittest/aggs/tst.aggmod_full2.sh

  Log Message:
  -----------
  test: Update tst.aggmod_full2.sh

Remove the xfail now that duplicate mod() keys have been reduced to
unique values.

Also, update the test to handle the large number of addresses passed
from producer to consumer.  In DTrace, @[mod(addr)] is handled by
passing individual addresses to the consumer, which is responsible
for reducing to unique mod() values.  This test marches through all
symbols found in /proc/kall[mod]syms and might therefore pass close
to 200k addresses.  In legacy DTrace, this was handled with aggrate
and throttling the trigger program.  These techniques do not work in
the DTrace on Linux port, which keeps building the BPF aggregation
maps.  So, remove the throttle and expand aggsize.  Also, reduce
strsize to alleviate the pressure on aggsize.

Finally, ignore the problematic __builtin__ftrace module.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 2e3b30d8243109b7e69deefcfd29497ca9594d7e
      https://github.com/oracle/dtrace-utils/commit/2e3b30d8243109b7e69deefcfd29497ca9594d7e
  Author: eugene.loh at oracle.com <eugene.loh at oracle.com>
  Date:   2024-07-29 (Mon, 29 Jul 2024)

  Changed paths:
    M test/triggers/Build
    M test/triggers/profile-tst-ufuncsort.c
    M test/unittest/profile-n/tst.ufuncsort.r
    M test/unittest/profile-n/tst.ufuncsort.sh

  Log Message:
  -----------
  test: Update tst.ufuncsort.sh

This test has not been passing due in large part to neglect.

Add -O0 compilation and keep the trigger running longer so that the
consumer can translate ufunc() names.  Update the .r results file.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: faa162496d375c1b1d88985539141a525001d3c9
      https://github.com/oracle/dtrace-utils/commit/faa162496d375c1b1d88985539141a525001d3c9
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-07-31 (Wed, 31 Jul 2024)

  Changed paths:
    M runtest.sh

  Log Message:
  -----------
  test: fix leak of $testerr.tmp

Nothing ever deletes it, so thousands of them build up in the
$tmpdir.  Trivial fix.

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>


  Commit: 363b6aafbf13677ce2a8dd46471cef883fa7476f
      https://github.com/oracle/dtrace-utils/commit/363b6aafbf13677ce2a8dd46471cef883fa7476f
  Author: eugene.loh at oracle.com <eugene.loh at oracle.com>
  Date:   2024-07-31 (Wed, 31 Jul 2024)

  Changed paths:
    A test/unittest/options/tst.F.aarch64.r
    M test/unittest/options/tst.F.d
    R test/unittest/options/tst.F.r
    A test/unittest/options/tst.F.r.p
    A test/unittest/options/tst.F.x86_64.r

  Log Message:
  -----------
  test: Clean up -F test

Commit e3c8b283b7d8 ("test: Clean up flowindent test") updated the
flowindent test.  Make corresponding changes in the -F test.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: f2fd197921bb8a630f451bf6a809522d133767bd
      https://github.com/oracle/dtrace-utils/commit/f2fd197921bb8a630f451bf6a809522d133767bd
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-07-31 (Wed, 31 Jul 2024)

  Changed paths:
    M libproc/rtld_db.c

  Log Message:
  -----------
  libproc: fix mispositioned Pwait()

rd_new() contains a Pwait() outside a Ptrace()/Puntrace() pair.
This usually works because rd_new is usually called for processes
that are already Ptrace()-stopped, but if it's not, this fails
horribly (ptrace() returns -ECHILD, Ptrace() misfires and
erroneously concludes the process is dead).

This Pwait() is completely unnecessary: we do a Ptrace() shortly after it
(before we do anything else that depends on tracee process state), and
Ptrace() does a Pwait() itself as part of its normal operation anyway
(syncing up our idea of the process state with its actual state).

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 6953c23ed49de7bff43647fc4b9503ceeb396ece
      https://github.com/oracle/dtrace-utils/commit/6953c23ed49de7bff43647fc4b9503ceeb396ece
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-07-31 (Wed, 31 Jul 2024)

  Changed paths:
    M libproc/Pcontrol.c

  Log Message:
  -----------
  libproc: non-ptraceable processes are not dead

You're only supposed to call Ptrace() on invasively-grabbed processes that
have already had a PTRACE_SEIZE set up on them.  But if you accidentally
call it on a noninvasively-traced process instead, this fails horribly
(ptrace() returns -ECHILD, Ptrace() misfires and erroneously concludes the
process is dead, most other operations on that process fail spuriously from
then on).  The proxying system makes it much easier to accidentally call
Ptrace() on a process than it was when Ptrace() was originally written: it's
not only the monitoring threads that call it any more, the main thread does
it all over the place (relying on proxying to the monitoring thread to do
its job), and it should *not* be incumbent on the main thread to check
whether children are invasively traced or not all over the place.

Since noninvasively-traced processes cannot be ptrace-stopped, Ptrace() has
no real utility for nontraced processes, so it's best to just NOP it in this
case (the balacing Puntrace() will already silently do nothing in such a
case).  This stops it mistakenly marking the process dead, which is a
definite improvement! (If it actually *is* dead, we'll figure that out soon
enough as soon as we start trying to do anything else to it.)

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 6626c27089175077a4b91969d39160b898dfa367
      https://github.com/oracle/dtrace-utils/commit/6626c27089175077a4b91969d39160b898dfa367
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-07-31 (Wed, 31 Jul 2024)

  Changed paths:
    M libproc/Pcontrol.c

  Log Message:
  -----------
  libproc: fix Ptrace() error returns

Ptrace() is defined to return a positive number (really zero) on success or
a negative number on error.  Those relatively few call sites that can do
anything useful when Ptrace() fails all do negative-number checks...

... so it's a shame that it also sometimes returns, uh, PS_DEAD, which is,
uh, 4, and sometimes returns an errno, which is a positive number.

Negate the latter and make a dead process return -ECHILD.

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 410a92d562fa88b91651f085fb5c7a2bb0bfa6ad
      https://github.com/oracle/dtrace-utils/commit/410a92d562fa88b91651f085fb5c7a2bb0bfa6ad
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-07-31 (Wed, 31 Jul 2024)

  Changed paths:
    M libproc/Psymtab.c

  Log Message:
  -----------
  libproc: detect dead process faster when updating maps

Scanning maps and lmids is really quite slow: it involves parsing text files
out of /proc and digging around in the dynamic linker and even doing
searches of victim process memory to detect changes in internal dynamic
linker data structures.  So, in Pupdate_syms(), after we do that, check if
the process has died before we run off and update all the per-file mappings,
which will all fail noisily if the process has died.

(Just a cosmetic improvement, but it can reduce the amount of debugging
output by hundreds of megabytes sometimes.)

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: ea592d60339035c4cf126913287bcdd01a4a9109
      https://github.com/oracle/dtrace-utils/commit/ea592d60339035c4cf126913287bcdd01a4a9109
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-07-31 (Wed, 31 Jul 2024)

  Changed paths:
    M libdtrace/dt_proc.c
    M libproc/Pcontrol.c
    M libproc/libproc.h

  Log Message:
  -----------
  proc: improve armouring against self-grabs

The DTrace victim process-monitoring loop (used by -c in particular, but also
by u*() actions) has some protection to keep DTrace from trying to ptrace()
itself: processes whose PID is the same as DTrace's, or which is already
being traced by DTrace, or which is a system daemon, do not get traced.

But this is not quite good enough. DTrace is a multithreaded process, but we
check the tracer pid (which is a kernel task ID derived from
/proc/$pid/status, i.e. a *thread* ID) against getpid() (which is a POSIX
pid, i.e. a *task group* ID).  We should dig out the task group ID of the
process being traced and compare *that* against our own PID.  (This still
does not stop two distinct dtraces trying to trace each other, but in that
case they shouldn't deadlock: each should sometimes let the other run and
they'll both make some sort of stuttering forward progress.)

To armour things a bit further, we shouldn't try to maintain a Pwait()ing
process-monitoring loop for anything libproc has already said it cannot
ptrace().  It doesn't matter whether we *asked* for it to be noninvasively
traced in the first place: what matters is purely whether we got a ptrace()
grab on it, because that's what controls whether we need to do the whole
waitpid() signal-redirection dance to it.

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: ede351f097e602ec77de8a9f31c559cb0424ce38
      https://github.com/oracle/dtrace-utils/commit/ede351f097e602ec77de8a9f31c559cb0424ce38
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-07-31 (Wed, 31 Jul 2024)

  Changed paths:
    M libdtrace/dt_consume.c
    A test/unittest/begin/tst.begin-starvation.sh
    M test/unittest/proc/tst.self-grab.sh
    A test/unittest/proc/tst.slow-self-grab.sh

  Log Message:
  -----------
  consume: consume only one gulp of buffer data

The per-CPU consume loop in dt_consume_cpu() works over the ring buffer and
sucks all its contents in: but for very high-volume tracing runs (like
test/unittest/proc/tst.slow-self-grab.sh) with records that are expensive to
process (like ustack()), new data can easily flow in fast enough that it
never manages to drain the buffer.

This means it never returns to its caller, which has all sorts of unpleasant
consequences from starving other CPUs through problems with BEGIN/END
processing through the simpler problem that it never returns to its caller,
so dtrace_work() never terminates, so any causes of termination other than a
exit() are never processed (cmd/dtrace.c can also terminate on SIGINT,
dtrace -c processes exiting, etc).

The fix is trivial: just don't advance the tail pointer until the whole
buffer is consumed.  It might take a while (the user can reduce the bufsize
to help with that if needed), but it will make forward progress, eventually,
getting through every CPU and then returning to its caller.

Add a couple of new tests to make sure that BEGIN is still processed first
even if the buffer is flooded with noise from other probes, and to verify
that dtrace -c-induced process termination and self-grabs both work and
don't disrupt things even when under high consume load (in this case, due to
I/O from DTRACE_DEBUG= output, which still triggers the relevant syscall
probe even though the shell promptly throws it all at /dev/null).

Thanks-to: Kris Van Hees <kris.van.hees at oracle.com>
Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: bdb6dcc2bca29dda282fcbb5db746bcae2e143e5
      https://github.com/oracle/dtrace-utils/commit/bdb6dcc2bca29dda282fcbb5db746bcae2e143e5
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-07-31 (Wed, 31 Jul 2024)

  Changed paths:
    M test/unittest/fbtprovider/tst.return1.d
    M test/unittest/syscall/tst.return_args.d

  Log Message:
  -----------
  test: fix two return tests to not cause trigger buffer overruns

test/triggers/bogus-ioctl.c is rather odd.  It was originally written for
test/unittest/io/tst.fds.d.  It uses bogus ioctl()s to trigger two things:

 - an infloop at the start with first arg -1, which the script responds to
   by raise()ing SIGUSR1 to get it going again via a signal handler and a
   siglongjmp() (you could use -x evaltime=main for the same purpose, but
   from the dates I believe this test predates that feature)
 - a loop at the end which passes the fd number as the first arg, which
   the script responds to by printing out that fd

A lot of other scripts have grown up that rely on it to just spray out
bogus ioctls forever, but alas two have grown up that assume that they
can get it going via hitting it with SIGUSR1 whenever a bogus ioctl()
is received, regardless of its arg values or anything.  This works fine
the first time, but the second time around it acts as a goto back to the
setjmp(), increments n too far, triggers a buffer overrun on the fds
array in bogus-ioctl and then bogus-ioctl hits an assertion failure and
dies.

This went unnoticed before now because it often happens that the assertion
failure and coredump takes long enough that runtest.sh has already tested
for a coredump by the time it happens, but it's still a bug.  Fix trivial,
we don't even need to look at the arg values: only raise(SIGUSR1) at most
once.

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 2b4381064de4f7a5d94c150bdc1bcae77aa07fff
      https://github.com/oracle/dtrace-utils/commit/2b4381064de4f7a5d94c150bdc1bcae77aa07fff
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-08-02 (Fri, 02 Aug 2024)

  Changed paths:
    M test/triggers/bogus-ioctl.c
    M test/triggers/pid-tst-args1.c
    M test/triggers/pid-tst-float.c
    M test/triggers/pid-tst-fork.c
    M test/triggers/pid-tst-gcc.c
    M test/triggers/pid-tst-ret1.c
    M test/triggers/pid-tst-ret2.c
    M test/triggers/pid-tst-vfork.c
    M test/triggers/pid-tst-weak1.c
    M test/triggers/pid-tst-weak2.c

  Log Message:
  -----------
  test/triggers: ensure triggers use a reasonable fd limit

Various triggers have a loop to close all possible fds, and they are
loop from 0 to rlim_max.  On some systems, that was such a high limit
that the loop was taking too long, causing tests to time out.  Set
the soft limit to 1024, and loop up to that limit (rlim_cur).

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Nick Alcock <nick.alcock at oracle.com>


  Commit: 4d10a8d404dbc8ca2a2317dabaa710ee6ee375ae
      https://github.com/oracle/dtrace-utils/commit/4d10a8d404dbc8ca2a2317dabaa710ee6ee375ae
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-08-02 (Fri, 02 Aug 2024)

  Changed paths:
    M test/unittest/codegen/tst.kernel_read_neg_small_scalar.d

  Log Message:
  -----------
  test: ensure casting does not affect value

On systems without CTF, we do not know the type of kernel variables.
By doing an explicit cast to int64_t a negative int is converted into a
large positive integer.  The proper cast is 'int' of course.

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Nick Alcock <nick.alcock at oracle.com>


  Commit: 1a4ceb1fa4046dd88c18f4cc905a5ea2b07aeb12
      https://github.com/oracle/dtrace-utils/commit/1a4ceb1fa4046dd88c18f4cc905a5ea2b07aeb12
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-08-02 (Fri, 02 Aug 2024)

  Changed paths:
    M test/unittest/actions/symmod/tst.symmod.sh

  Log Message:
  -----------
  test: remove unnecessary dependency on /proc/kallmodsyms

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>


  Commit: 443c02b9dd1f50bbddb93de50250542dd6300ab1
      https://github.com/oracle/dtrace-utils/commit/443c02b9dd1f50bbddb93de50250542dd6300ab1
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-08-02 (Fri, 02 Aug 2024)

  Changed paths:
    A test/unittest/consumer/tst.symbols.x

  Log Message:
  -----------
  test: skip tst.symbols.c if no /proc/kallmodsyms

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>


  Commit: dfe4109c69da139444c25b718a84088e04da98e6
      https://github.com/oracle/dtrace-utils/commit/dfe4109c69da139444c25b718a84088e04da98e6
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-08-02 (Fri, 02 Aug 2024)

  Changed paths:
    M libdtrace/dt_prov_fbt.c

  Log Message:
  -----------
  fbt: implement return value support for fexit-based FBT return probes

Commit fe2101e5 ("fbt: implement based on fentry/fexit probes") failed
to provide a proper implementation to pass the function return value as
arg1 for FBT return probes based on fexit probes.

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>


  Commit: 64bb3b05b72409df1e702a00c9f8b9043eef90bc
      https://github.com/oracle/dtrace-utils/commit/64bb3b05b72409df1e702a00c9f8b9043eef90bc
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-08-02 (Fri, 02 Aug 2024)

  Changed paths:
    M test/unittest/funcs/tst.inet_ntoa_nonDPTR.d

  Log Message:
  -----------
  test: Fix access to kernel variable

On systems with kernels that do not provide CTF, access to some kernel
variables requires an explicit &-operator.

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>


  Commit: cd70dbf6811b609d2b1b5d4b99f45da8c0630300
      https://github.com/oracle/dtrace-utils/commit/cd70dbf6811b609d2b1b5d4b99f45da8c0630300
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-08-02 (Fri, 02 Aug 2024)

  Changed paths:
    M test/unittest/types/err.unloaded_var.x

  Log Message:
  -----------
  test: adjust err.unloaded_var.x to match test

Commit d9158b26 ("test: adjust err.unloaded_var.d again.") adjusted the
test but failed to adjust the matching .x file.  Along with changing
the kernel module name (and location), we can also drop the testing for
the CTF archive since it is not necessary.  In addition, we allow for
either gfs2.ko or gfs2.ko.xz to handle compressed kernel modules.

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>


  Commit: 1781f153002410b55e2689f088be247fdde4032e
      https://github.com/oracle/dtrace-utils/commit/1781f153002410b55e2689f088be247fdde4032e
  Author: Alan Maguire <alan.maguire at oracle.com>
  Date:   2024-08-02 (Fri, 02 Aug 2024)

  Changed paths:
    M libdtrace/dt_cg.c
    M libdtrace/dt_consume.c
    M libdtrace/dt_impl.h
    M libdtrace/dt_printf.c
    M libdtrace/dt_printf.h

  Log Message:
  -----------
  print() action: identify ctf object used for print

when generating code for print() action we need to identify source
of CTF; is it shared CTF, cdefs or ddefs or another module?
Rework the print() action to be a printf()like function under the
hood using the format specifier as module name.  We can then
do away with dt_print_print(), calling dt_print_type() directly
from consume.

Suggested-by: Kris Van Hees <kris.van.hees at oracle.com>
Signed-off-by: Alan Maguire <alan.maguire at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: c34ee67044e8e55ae8afbfa54d1b31561cd9a03c
      https://github.com/oracle/dtrace-utils/commit/c34ee67044e8e55ae8afbfa54d1b31561cd9a03c
  Author: Alan Maguire <alan.maguire at oracle.com>
  Date:   2024-08-02 (Fri, 02 Aug 2024)

  Changed paths:
    M test/modules
    A test/unittest/print/tst.print.modtype.d
    A test/unittest/print/tst.print.modtype.r

  Log Message:
  -----------
  unittest/print: add test covering module-defined type

print() action tests do not cover module-defined types.  Add a test
using a module-defined type that has not changed recently.

struct tun_page was chosen since it is identical in UEK6U3 and upstream
and declared in tun.c which is a module on most distros.

Added tun to test/modules as suggested by Eugene.

Suggested-by: Nick Alcock <nick.alcock at oracle.com>
Signed-off-by: Alan Maguire <alan.maguire at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 57bfc8f3e22d9a1365ce3c8ed41f59faeef9d8ca
      https://github.com/oracle/dtrace-utils/commit/57bfc8f3e22d9a1365ce3c8ed41f59faeef9d8ca
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-08-02 (Fri, 02 Aug 2024)

  Changed paths:
    M dtrace.spec

  Log Message:
  -----------
  spec: install sdt*.h in /usr/lib64/dtrace/include/sys

This is the specfile part of the sdt.h move, rendered more
complex by the need to clean up the mess left behind by the
old sdt.h renaming.

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 9b874a4f4ddcf616fdfea73d4409714908c2d37c
      https://github.com/oracle/dtrace-utils/commit/9b874a4f4ddcf616fdfea73d4409714908c2d37c
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-08-02 (Fri, 02 Aug 2024)

  Changed paths:
    M GNUmakefile
    M configure
    M dtrace.spec
    M runtest.sh
    M uts/Build
    A uts/dtrace_sdt.pc.in

  Log Message:
  -----------
  build: initial pkg-config support

This initial pkg-config file, dtrace_sdt.pc, points at the location
of the sdt.h include file.  We immediately use it in make check in the
installed testsuite, compensating for any install-time changes in the
location of the dtrace libdir.

Further changes will be forthcoming to properly support relocatable
installation.

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: da6568ef4f50ea28dd57745b2d303928cbf4e988
      https://github.com/oracle/dtrace-utils/commit/da6568ef4f50ea28dd57745b2d303928cbf4e988
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-08-02 (Fri, 02 Aug 2024)

  Changed paths:
    M configure

  Log Message:
  -----------
  build: track configured vars

This lets the build system determine whether a variable was
explicitly set via ./configure (the assumption being that
if you set something explicitly, you knew what you were doing,
so e.g. if you set the --systemd-unit-dir to /foo/bar, you
have also arranged for systemd to look there for unit files,
so the build system can install the systemd unit files there
on the assumption that they will work).

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: fc2d6bf7b518d8f22b65dd9b2e700bacb217f15c
      https://github.com/oracle/dtrace-utils/commit/fc2d6bf7b518d8f22b65dd9b2e700bacb217f15c
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-08-02 (Fri, 02 Aug 2024)

  Changed paths:
    M GNUmakefile
    M configure

  Log Message:
  -----------
  build: --bindir is supposed to be equivalent to --sbindir

The configure script said as much, but actually it set a
BINDIR variable that was never used for anything.

Fix this.

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: d39ee4e4518c0f26053817513df61b66a4d61828
      https://github.com/oracle/dtrace-utils/commit/d39ee4e4518c0f26053817513df61b66a4d61828
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-08-02 (Fri, 02 Aug 2024)

  Changed paths:
    M GNUmakefile

  Log Message:
  -----------
  build: the TESTDIR is relative to the LIBDIR by default

If users change the LIBDIR but not the TESTDIR, the TESTDIR
is meant to follow it, but wasn't.

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 52a18d355ce5bf634473b9da13619806264a56c5
      https://github.com/oracle/dtrace-utils/commit/52a18d355ce5bf634473b9da13619806264a56c5
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-08-02 (Fri, 02 Aug 2024)

  Changed paths:
    M runtest.sh
    M uts/Build
    A uts/dtrace.pc.in

  Log Message:
  -----------
  build: add a pkg-config file for dtrace consumers: use it

This lets you relocate the include path anywhere you like: users of
<dtrace.h> et al should invoke $(pkg-config --cflags dtrace) and
$(pkg-config --libs dtrace) to get the dtrace consumer header directory and
-ldtrace invocation for linking.

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 7281fcccb297770451c8c62760df777032e629b0
      https://github.com/oracle/dtrace-utils/commit/7281fcccb297770451c8c62760df777032e629b0
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-08-02 (Fri, 02 Aug 2024)

  Changed paths:
    R runtest.conf.example
    M runtest.sh

  Log Message:
  -----------
  runtest: remove obsolete kernel coverage data collection

The DTrace kernel module is long dead: we don't need kernel coverage any
more.  Delete the example runtest.conf as well, and drop loading it, since
it served no purpose but to point to the kernel tree used for coverage.

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 4d4ba4997c0554e435044e86d556ee708e19e80f
      https://github.com/oracle/dtrace-utils/commit/4d4ba4997c0554e435044e86d556ee708e19e80f
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-08-02 (Fri, 02 Aug 2024)

  Changed paths:
    M Maketargets
    M cmd/Build
    M dtprobed/Build
    R dtprobed/dtprobed.service
    A dtprobed/dtprobed.service.in

  Log Message:
  -----------
  build: make dtrace and dtprobed relocatable

The majority of the complexity here involves figuring out what to
do about the systemd service file.  We presume that if the user
is installing such that the service file lands inone of the two fixed
locations systemd knows how to find persistent service files in, or
if the user has explicitly passed --systemd-unit-dir to configure,
it makes sense to install the systemd service file (because systemd
will find it): otherwise, we avoid installing it and print a
warning that the user must do so if dtprobed is to be properly
started.

Provide a new installation target, install-dtprobed-autostart, to do
so.

(Regardless, the service file is changed to substitute in the real
installed path of dtprobed.)

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 57ca2c2549da29952e28cdb38e1f5e1ec131c301
      https://github.com/oracle/dtrace-utils/commit/57ca2c2549da29952e28cdb38e1f5e1ec131c301
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-08-02 (Fri, 02 Aug 2024)

  Changed paths:
    M runtest.sh
    M test/unittest/usdt/tst.manyprocs.sh
    M test/unittest/usdt/tst.multitrace.sh
    M uts/Build
    M uts/dtrace.pc.in
    M uts/dtrace_sdt.pc.in

  Log Message:
  -----------
  test: work when relocated

We do this by adding a variable to the pkg-config files that points at
the dtrace binary, then using that.  To make this work when the prefix
is changed, runtest.sh sets its own PKG_CONFIG_PATH to a directory
relative to the testsuite.  This will fail if the pkg-config install
path is also changed, but in that case presumably the person installing
it has arranged for pkg-config to find the pkg-config files in the
installed location.  Fix a couple of tests that are assuming the
location of the dtrace binary can be used to determine whether the
installed testsuite is in use.

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 0ff219e91087c3559e9b06b0985b1b745680ee70
      https://github.com/oracle/dtrace-utils/commit/0ff219e91087c3559e9b06b0985b1b745680ee70
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-08-02 (Fri, 02 Aug 2024)

  Changed paths:
    M test/unittest/options/err.D_ASRELO.kdefs.d
    M test/unittest/options/tst.knodefs.sh
    M test/unittest/options/tst.linkmode.r
    M test/unittest/options/tst.linkmode.sh
    M test/unittest/tracemem/tst.tracemem.d

  Log Message:
  -----------
  test: fix more uses of kernel variable access

A few more cases where lack of datatype information for kernel variables
(i.e. lack of CTF, and BTF does not provide it) requires an explicit
use of the &-operator.

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>


  Commit: b12f021e52f1bafd696fb203bea92f2bd8f3fceb
      https://github.com/oracle/dtrace-utils/commit/b12f021e52f1bafd696fb203bea92f2bd8f3fceb
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-08-02 (Fri, 02 Aug 2024)

  Changed paths:
    M libdtrace/dt_btf.c
    M libdtrace/dt_btf.h
    M libdtrace/dt_prov_fbt.c
    A test/unittest/fbtprovider/err.D_ARGS_IDX.void-void.d
    A test/unittest/fbtprovider/err.D_ARGS_IDX.void-void.r
    A test/unittest/fbtprovider/err.D_ARGS_IDX.void-void.x
    A test/unittest/fbtprovider/err.D_ARGS_IDX.void.d
    A test/unittest/fbtprovider/err.D_ARGS_IDX.void.r
    A test/unittest/fbtprovider/err.D_ARGS_IDX.void.x

  Log Message:
  -----------
  bpf, fbt: do not try to get a return value for void function return probes

We were trying to access a return value for void functions, causing BPF
verifier failures.  We can determine the return type when getting the
probe info, and set the return probe argc value accordingly.  This then
drives the code generation in the trampoline.

Reported-by: Alan Maguire <alan.maguire at oracle.com>
Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>


  Commit: 75e57bdc279a9a7a86b268d37b665aff52997fe9
      https://github.com/oracle/dtrace-utils/commit/75e57bdc279a9a7a86b268d37b665aff52997fe9
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-08-02 (Fri, 02 Aug 2024)

  Changed paths:
    M libcommon/Build

  Log Message:
  -----------
  libcommon: disable _FORTIFY_SOURCE

_FORTIFY_SOURCE is incompatible with the dynamic-length-string trick we
pull in the DOF parser (which is in any case seccomp-jailed).

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 6228683c5f0115ed5adc282d6a396d67a9ff770d
      https://github.com/oracle/dtrace-utils/commit/6228683c5f0115ed5adc282d6a396d67a9ff770d
  Author: Alan Maguire <alan.maguire at oracle.com>
  Date:   2024-08-02 (Fri, 02 Aug 2024)

  Changed paths:
    M libdtrace/dt_prov_sched.c

  Log Message:
  -----------
  sched: fix firing of sched:::on-cpu

sched:::on-cpu is not firing very often versus off-cpu.  It appears
that - for recent kernels at least - fbt::schedule_tail:entry
placement is wrong.  The only way to efficiently ensure firing in
the right place - when the new task has been just scheduled in -
is to use fbt::__perf_event_task_sched_in:entry as it

- fires at the right time
- is not static, so not subject to inlining or other optimizations
- is stable across kernel versions.

However the downside is it will not be called unless context switch
perf events are enabled.  So the most efficient method is to
perf_event_open() such an event but not attach anything to it.
Also explored was attaching to cpc:::sched_switch-all-1 and weeding
out off-cpu events, but that required a copy in of task state,
comparison etc so in such a hot codepath a more precise attach
is preferable.

With this in place we get sensible on/off cpu numbers:

$ dtrace -n 'sched:::*-cpu { @c[probename] = count();}'
dtrace: description 'sched:::*-cpu ' matched 2 probes
^C

  off-cpu                                                        1454
  on-cpu                                                         1454

Signed-off-by: Alan Maguire <alan.maguire at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: c84954cdc6fb017034e2c3fe4445a7c8981d35e9
      https://github.com/oracle/dtrace-utils/commit/c84954cdc6fb017034e2c3fe4445a7c8981d35e9
  Author: Alan Maguire <alan.maguire at oracle.com>
  Date:   2024-08-02 (Fri, 02 Aug 2024)

  Changed paths:
    M test/unittest/sched/tst.oncpu.d

  Log Message:
  -----------
  unittest/sched: remove dtv2 xfail

...since tst.oncpu.d test passes now.

Signed-off-by: Alan Maguire <alan.maguire at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 6e305b0867c9fb4d91078cc5062a837190e40245
      https://github.com/oracle/dtrace-utils/commit/6e305b0867c9fb4d91078cc5062a837190e40245
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-08-19 (Mon, 19 Aug 2024)

  Changed paths:
    M libdtrace/dt_aggregate.c
    A libdtrace/dt_aggregate.h
    M libdtrace/dt_cg.c
    M libdtrace/dt_consume.c
    M libdtrace/dt_impl.h
    M libdtrace/dt_map.c
    M libdtrace/dt_open.c
    M libdtrace/dt_options.c
    M libdtrace/dt_printf.c
    M libdtrace/dt_work.c

  Log Message:
  -----------
  agg: move aggregation declarations from dt_impl.h to dt_agrgegate.h

This also changes how the aggregation root is stored in dtrace_hdl_t.
Rather than storing the struct inside dtrace_hdl_t we now store a
pointer to an allocated struct.

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>


  Commit: bca5b707cc42b245f5c096d2f77c9d041e499879
      https://github.com/oracle/dtrace-utils/commit/bca5b707cc42b245f5c096d2f77c9d041e499879
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-08-19 (Mon, 19 Aug 2024)

  Changed paths:
    M test/unittest/aggs/tst.aggpercpu.sh

  Log Message:
  -----------
  test: Allow aggpercpu test to omit some CPUs

The aggpercpu test uses profile-* to fire aggregations on every CPU.
But whether for good (offline CPUs) or bad (unreliable probe) reasons,
a CPU might not aggregate any values.

Allow this test to skip over such CPUs.  That is, while a BPF agg map
might have the correct default value for the aggregation function, it
may not see any anticipated data.  The quality of profile-* probes
should be checked by a different test.

Also, when computing avg() and stddev() in the awk check program,
truncate results to ints more often to mimic the algorithms in DTrace
for more robust checks.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 7221a9ba69cf43b1c1244ba715be1cc3cbf98659
      https://github.com/oracle/dtrace-utils/commit/7221a9ba69cf43b1c1244ba715be1cc3cbf98659
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-08-19 (Mon, 19 Aug 2024)

  Changed paths:
    M test/unittest/options/tst.aggrate-fast.d
    M test/unittest/options/tst.aggrate-fast.r
    M test/unittest/options/tst.aggrate-slow.d
    M test/unittest/options/tst.aggrate-slow.r

  Log Message:
  -----------
  test: Fix nonexistent @@sort option

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: d4894a6c720497ae0e22533e5b57c64c797ecdef
      https://github.com/oracle/dtrace-utils/commit/d4894a6c720497ae0e22533e5b57c64c797ecdef
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-08-19 (Mon, 19 Aug 2024)

  Changed paths:
    M test/unittest/usdt/tst.dlclose2.sh

  Log Message:
  -----------
  test: Remove unneeded -w option

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 0e8f350090b1f1435995814bdad23da6932a4a89
      https://github.com/oracle/dtrace-utils/commit/0e8f350090b1f1435995814bdad23da6932a4a89
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-08-19 (Mon, 19 Aug 2024)

  Changed paths:
    M libdtrace/dt_cg.c
    A test/unittest/aggs/tst.stddev2.d
    A test/unittest/aggs/tst.stddev2.r

  Log Message:
  -----------
  Fix stddev() carryover computation

The stddev() aggregation function squares 64-bit data values.  A
value is split into 32-bit high and low values.  Then, (high + low)
is squared to produce high*high, 2*high*low, and low*low.  Each is
managed in its own 64-bit register, with the final result residing
in two 64-bit registers.

When the 2*high*low portion is combined with the low*low portion,
care is exercised in case the combination has a carryover portion to
the higher bits.  This check was broken in the case where low==0.
That is, data values whose lowest 32 bits were 0 resulted in
outrageously bad stddev() results.

Fix the check and add a test for such cases.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 5a9d05c14f911de0fe3eafe889f3218349b424a0
      https://github.com/oracle/dtrace-utils/commit/5a9d05c14f911de0fe3eafe889f3218349b424a0
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-08-19 (Mon, 19 Aug 2024)

  Changed paths:
    M test/unittest/usdt/tst.forker.sh

  Log Message:
  -----------
  test: Check dtrace return status in USDT tst.forker.sh

This test was spuriously passing.  DTrace failed to run -- many error
messages in the log file indicated as much -- and yet the test passed.

Check the dtrace return status.

The test will pass once USDT supports wildcard provider names.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 9544d3c5ae26ef5b8d3e58a5dd6d9a632d9e5674
      https://github.com/oracle/dtrace-utils/commit/9544d3c5ae26ef5b8d3e58a5dd6d9a632d9e5674
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-08-19 (Mon, 19 Aug 2024)

  Changed paths:
    M dtprobed/dtprobed.c
    M libdtrace/dt_cg.c
    M libdtrace/dt_probe.c
    M libdtrace/dt_prov_fbt.c
    M libdtrace/dt_prov_lockstat.c
    M libdtrace/dt_prov_profile.c

  Log Message:
  -----------
  Clean up double semicolons

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: ecfc67c2447459a491aa861c96df4e3a69970c41
      https://github.com/oracle/dtrace-utils/commit/ecfc67c2447459a491aa861c96df4e3a69970c41
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-08-19 (Mon, 19 Aug 2024)

  Changed paths:
    M libdtrace/dt_bpf.c
    M libdtrace/dt_pid.c

  Log Message:
  -----------
  Turn some leading spaces into tabs

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 0b12c40832343c47b1e9bb65bc5300e2a1db6968
      https://github.com/oracle/dtrace-utils/commit/0b12c40832343c47b1e9bb65bc5300e2a1db6968
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-08-21 (Wed, 21 Aug 2024)

  Changed paths:
    M libdtrace/dt_prov_uprobe.c

  Log Message:
  -----------
  Move comment closer to the code it describes

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: f6c9267711965a216485539590b897d70f4a35a3
      https://github.com/oracle/dtrace-utils/commit/f6c9267711965a216485539590b897d70f4a35a3
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-08-21 (Wed, 21 Aug 2024)

  Changed paths:
    M libdtrace/dt_consume.c
    M libdtrace/dt_impl.h

  Log Message:
  -----------
  Move dt_spec_buf_data_t and dt_spec_buf_t into dt_consume.c

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 0fcf949d90b9e6423baa78ef54c713e68cbba60a
      https://github.com/oracle/dtrace-utils/commit/0fcf949d90b9e6423baa78ef54c713e68cbba60a
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-08-21 (Wed, 21 Aug 2024)

  Changed paths:
    M cmd/dtrace.c

  Log Message:
  -----------
  Get rid of apparently orphaned status[2]

This has apparently been replaced by the dtp component
"dtrace_status_t dt_status[2]".

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: ae2f327cdb4aa5bd797649842fceb08d25f7d4c5
      https://github.com/oracle/dtrace-utils/commit/ae2f327cdb4aa5bd797649842fceb08d25f7d4c5
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-08-21 (Wed, 21 Aug 2024)

  Changed paths:
    M cmd/dtrace.c
    R include/dtrace/buffer.h
    R include/dtrace/buffer_defines.h
    M include/dtrace/dtrace.h
    M include/dtrace/ioctl.h

  Log Message:
  -----------
  Get rid of apparently orphaned bufdesc stuff

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 38bb4e0247f442293a6e9d55a94967ff11434d11
      https://github.com/oracle/dtrace-utils/commit/38bb4e0247f442293a6e9d55a94967ff11434d11
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-08-21 (Wed, 21 Aug 2024)

  Changed paths:
    M include/dtrace/enabling.h
    R include/dtrace/enabling_defines.h

  Log Message:
  -----------
  Get rid of unneeded enabling_defines.h

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: afca2ff9024e727aea0c566de5ec31a602d0f647
      https://github.com/oracle/dtrace-utils/commit/afca2ff9024e727aea0c566de5ec31a602d0f647
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-08-21 (Wed, 21 Aug 2024)

  Changed paths:
    M include/dtrace/enabling.h

  Log Message:
  -----------
  Get rid of unused dtrace_repldesc_t

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 18e5183c06898ce077eae85e36a7907ca59c7022
      https://github.com/oracle/dtrace-utils/commit/18e5183c06898ce077eae85e36a7907ca59c7022
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-08-21 (Wed, 21 Aug 2024)

  Changed paths:
    M libdtrace/dt_prov_uprobe.c

  Log Message:
  -----------
  Clean up prp/pprp/uprp variable names

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 1b0a3e129bd541071cbee5ca2fb12b27bd3c5e6b
      https://github.com/oracle/dtrace-utils/commit/1b0a3e129bd541071cbee5ca2fb12b27bd3c5e6b
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-08-21 (Wed, 21 Aug 2024)

  Changed paths:
    M libdtrace/dt_probe.c

  Log Message:
  -----------
  Fix comment in dt_probe.c

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: c801f86eba930c1904cb05405c9acdc5eec05db2
      https://github.com/oracle/dtrace-utils/commit/c801f86eba930c1904cb05405c9acdc5eec05db2
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-08-21 (Wed, 21 Aug 2024)

  Changed paths:
    M libdtrace/dt_cg.c

  Log Message:
  -----------
  Fix comments that hardwire DBUF_ offsets

Also, change the numbered list into a bulleted list.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: d5c6131a29584795fc326a44d86a2614b50a98f3
      https://github.com/oracle/dtrace-utils/commit/d5c6131a29584795fc326a44d86a2614b50a98f3
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-08-21 (Wed, 21 Aug 2024)

  Changed paths:
    M libdtrace/dt_cg.c

  Log Message:
  -----------
  Fix comments in dt_cg.c

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: db31aae94caa64079d7f0deb5bb73af27453a0b1
      https://github.com/oracle/dtrace-utils/commit/db31aae94caa64079d7f0deb5bb73af27453a0b1
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-08-22 (Thu, 22 Aug 2024)

  Changed paths:
    M include/dtrace/dif.h
    M include/dtrace/dif_defines.h
    M include/dtrace/ioctl.h
    M libdtrace/dt_impl.h
    M libdtrace/dt_options.c
    M libdtrace/dt_probe.c
    M libdtrace/dt_work.c
    M runtest.sh
    M test/utils/.gitignore
    M test/utils/Build
    R test/utils/baddof.c
    R test/utils/badioctl.c

  Log Message:
  -----------
  ioctl: remove obsolete ioctl definitions and dead code that used them

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>


  Commit: a0c299e995b15bf3cc318044fd012af813c043b5
      https://github.com/oracle/dtrace-utils/commit/a0c299e995b15bf3cc318044fd012af813c043b5
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-08-22 (Thu, 22 Aug 2024)

  Changed paths:
    M README.md
    A README.pre-1.13.2.md

  Log Message:
  -----------
  doc: updates to README

Remove obsolete reference to kernel source and headers for building
DTrace.

Move build instructions for pre-1.13.2 versions to a new file.

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Sam James <sam at gentoo.org>

Link: https://github.com/oracle/dtrace-utils/issues/77


  Commit: 0e3231a26898ce0f5ddf9c8fa0832ba5f14df87a
      https://github.com/oracle/dtrace-utils/commit/0e3231a26898ce0f5ddf9c8fa0832ba5f14df87a
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-09-06 (Fri, 06 Sep 2024)

  Changed paths:
    M libdtrace/dt_ident.c

  Log Message:
  -----------
  ident: fix unsigned vs signed comparison

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>


  Commit: ff73e12ea0e839981ca25ea0d7eff99b77c91214
      https://github.com/oracle/dtrace-utils/commit/ff73e12ea0e839981ca25ea0d7eff99b77c91214
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-09-06 (Fri, 06 Sep 2024)

  Changed paths:
    M libdtrace/dt_prov_uprobe.c

  Log Message:
  -----------
  Add some comments

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 70040033d2a3561c4b9087f85abca1b2a08ff9b9
      https://github.com/oracle/dtrace-utils/commit/70040033d2a3561c4b9087f85abca1b2a08ff9b9
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-09-06 (Fri, 06 Sep 2024)

  Changed paths:
    M libdtrace/dt_cg.c

  Log Message:
  -----------
  Fix aggs comment in dt_cg_tramp_prologue_act()

Since 2dd92c02 ("Add support for aggregation keys") removed a bunch
of code, the corresponding comments should also have been removed.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 4057e6200a0b8d8561796f7c2ace2bb5b2a245fb
      https://github.com/oracle/dtrace-utils/commit/4057e6200a0b8d8561796f7c2ace2bb5b2a245fb
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-09-06 (Fri, 06 Sep 2024)

  Changed paths:
    M libdtrace/dt_cg.c

  Log Message:
  -----------
  Fix some dctx->mst->specsize comments

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 813c30e52b02a7a12944bb4c78e4022e29f246ce
      https://github.com/oracle/dtrace-utils/commit/813c30e52b02a7a12944bb4c78e4022e29f246ce
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-09-06 (Fri, 06 Sep 2024)

  Changed paths:
    M libdtrace/dt_impl.h

  Log Message:
  -----------
  Remove orphaned dtrace_hdl_t component dt_maxformat

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: f81de65b1d6140810dab66dbb2d2e6442f33b161
      https://github.com/oracle/dtrace-utils/commit/f81de65b1d6140810dab66dbb2d2e6442f33b161
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-09-06 (Fri, 06 Sep 2024)

  Changed paths:
    M libdtrace/dt_impl.h

  Log Message:
  -----------
  Remove orphaned dtrace_hdl_t component dt_prov_usdt

This component was introduced by commit 95ac5e2496d1
("usdt: DTrace userspace side").

Its use was removed by commit e71a20d8
("dt_pid, dtprobed: move uprobe creation to dtrace"),
but it was left in dt_impl.h.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 0922233585de7fbcaf9fe753c7383e7e7a799c67
      https://github.com/oracle/dtrace-utils/commit/0922233585de7fbcaf9fe753c7383e7e7a799c67
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-09-06 (Fri, 06 Sep 2024)

  Changed paths:
    M test/unittest/error/tst.DTRACEFLT_UNKNOWN.d
    M test/unittest/error/tst.DTRACEFLT_UNKNOWN.r
    M test/unittest/regression/tst.DTRACEFLT_BADADDR.d_path.d
    M test/unittest/regression/tst.DTRACEFLT_BADADDR.d_path.r
    A test/unittest/variables/bvar/tst.arg3-ERROR-b.sh
    A test/unittest/variables/bvar/tst.arg3-ERROR.r
    A test/unittest/variables/bvar/tst.arg3-ERROR.sh

  Log Message:
  -----------
  test: Handle dtrace:::ERROR arg3 specially

The ERROR probe's arg3 reports the culprit PC, whose value can vary
with minor implementation changes.  On the one hand, we do not want
tests to be overly sensitive to this value.  On the other hand, we
do want to check the value is correct.

Therefore:

*)  Change tests that dump ERROR's args to omit arg3.

*)  Add new tests that check that ERROR's arg3 is correct.
    One test is more stringent but potentially more sensitive
    to unrelated changes;  the other is more lax, simpler, and
    less sensitive to other variations.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: f7f123a7615fcc3729b1f9708a39fc52e7a1daf7
      https://github.com/oracle/dtrace-utils/commit/f7f123a7615fcc3729b1f9708a39fc52e7a1daf7
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-09-06 (Fri, 06 Sep 2024)

  Changed paths:
    M test/demo/dtrace/error.d
    M test/demo/dtrace/error.r
    M test/unittest/assocs/tst.invalidref.r
    M test/unittest/drops/drp.DTRACEDROP_DBLERROR.r
    M test/unittest/error/tst.DTRACEFLT_UNKNOWN.d
    M test/unittest/error/tst.DTRACEFLT_UNKNOWN.r
    R test/unittest/error/tst.DTRACEFLT_UNKNOWN.sparc64.r
    M test/unittest/pointers/err.BadAlign.d
    M test/unittest/pointers/err.BadAlign.r
    M test/unittest/pointers/err.InvalidAddress2.d
    M test/unittest/pointers/err.InvalidAddress2.r
    M test/unittest/pointers/err.InvalidAddress3.r
    M test/unittest/pointers/err.InvalidAddress4.d
    M test/unittest/pointers/err.InvalidAddress4.r
    M test/unittest/regression/tst.DTRACEFLT_BADADDR.d_path.r

  Log Message:
  -----------
  test: Clean up tests still expecting obsolete "at DIF offset NN"

Also, the numbering of EPIDs has changed.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 301767d36f9580b625ff04fd26d5b0a4ade39351
      https://github.com/oracle/dtrace-utils/commit/301767d36f9580b625ff04fd26d5b0a4ade39351
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-09-06 (Fri, 06 Sep 2024)

  Changed paths:
    M libdtrace/dt_aggregate.c
    M libdtrace/dt_aggregate.h
    M libdtrace/dt_consume.c
    A test/unittest/aggs/tst.clear-one.d
    A test/unittest/aggs/tst.clear-one.r
    A test/unittest/aggs/tst.trunc-one.d
    A test/unittest/aggs/tst.trunc-one.r

  Log Message:
  -----------
  Action clear() should clear only one aggregation

In dt_clear(), we:

*)  extract an aggregation ID (dtrace_aggid_t)

*)  increment the gen counter for this aggregation ID

*)  clear the consumer copy of the aggregation, using:

      /* Also clear our own copy of the data, in case it gets printed. */
      dtrace_aggregate_walk(dtp, dt_aggregate_clear_one, dtp);

However, this clears all the aggregations.  While the next snapshot of
the aggregations will refresh our copies of the aggregations -- after all,
dtrace_aggregate_snap() itself starts with a call to dtrace_aggregate_clear()
-- if we print aggregations before the next snapshot, we would display an
erroneously cleared aggregation.

Therefore, change dt_clear() to clear only those aggregations that
correspond to the specified aggregation ID.

In order that only a specific aggregation ID can be cleared, we
modify the last argument to dt_aggregate_clear_one() to be not
simply the dtp, but a pointer to a struct that has both the dtp
and the aggregation ID.  The previous "clear all" behavior can be
specified with an aggregation ID of DTRACE_AGGVARIDNONE.

Though trunc() appears not to be similarly afflicted, add a test for
it too.

Orabug: 36900180
Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 2a88e0fe949f929373376007db41b8ecd19c8360
      https://github.com/oracle/dtrace-utils/commit/2a88e0fe949f929373376007db41b8ecd19c8360
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-09-06 (Fri, 06 Sep 2024)

  Changed paths:
    M libdtrace/dt_consume.c

  Log Message:
  -----------
  Remove unused "next" arg from dt_flowindent()

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: cbedf86319c2d182b22b7bec8b794d857ad2fa21
      https://github.com/oracle/dtrace-utils/commit/cbedf86319c2d182b22b7bec8b794d857ad2fa21
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-09-13 (Fri, 13 Sep 2024)

  Changed paths:
    M bpf/probe_error.c
    M libdtrace/dt_cg.c
    M libdtrace/dt_dctx.h
    A test/unittest/error/tst.argv-corruption-by-error.d

  Log Message:
  -----------
  error: ERROR probe firing should not corrupt probe arguments

When an ERROR probe fires, it overwrites the first 6 probe arguments.
If other clauses are then executed for the original probe, the probe
arguments will have been corrupted.

Save arg0 through arg5 prior to calling the ERROR probe, and restore
them after the ERROR probe finishes.

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>


  Commit: dadb0c959702c539e93007d45634affdb67f0136
      https://github.com/oracle/dtrace-utils/commit/dadb0c959702c539e93007d45634affdb67f0136
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-09-14 (Sat, 14 Sep 2024)

  Changed paths:
    M bpf/probe_error.c
    M libdtrace/dt_dctx.h
    M libdtrace/dt_prov_dtrace.c
    A test/unittest/builtinvar/tst.id_ERROR.r
    A test/unittest/builtinvar/tst.id_ERROR.sh

  Log Message:
  -----------
  Set the ERROR PRID in BPF code

There are multiple options for how to set this value.  One is to
hardwire it to 3, its expected value.  Another is to set the value
during relocation.  Here, we choose a middle ground:  we define
the value symbolically (to 3) and also check that value.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 032cc0c7e3e43a153fe0091886e8454331893f4e
      https://github.com/oracle/dtrace-utils/commit/032cc0c7e3e43a153fe0091886e8454331893f4e
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-09-14 (Sat, 14 Sep 2024)

  Changed paths:
    M libdtrace/dt_prov_uprobe.c

  Log Message:
  -----------
  Fix provider lookup to use prv not prb

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: d44036087461d3848f204ae11608df8b843ea2f1
      https://github.com/oracle/dtrace-utils/commit/d44036087461d3848f204ae11608df8b843ea2f1
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-09-14 (Sat, 14 Sep 2024)

  Changed paths:
    M libdtrace/dt_probe.c
    M libdtrace/dt_prov_cpc.c
    M libdtrace/dt_prov_dtrace.c
    M libdtrace/dt_prov_fbt.c
    M libdtrace/dt_prov_profile.c

  Log Message:
  -----------
  probe: probes in providers without probe_info() have no args

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: c7f0a885f3ff52c041202fb3d1cecfc0f6cbc2c4
      https://github.com/oracle/dtrace-utils/commit/c7f0a885f3ff52c041202fb3d1cecfc0f6cbc2c4
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-09-14 (Sat, 14 Sep 2024)

  Changed paths:
    M libdtrace/dt_bpf.c
    A test/unittest/builtinvar/tst.probe_dtrace.d
    A test/unittest/builtinvar/tst.probe_dtrace.r

  Log Message:
  -----------
  Relocation processing for the ERROR program is done too early

When we call dtrace_go(), we do something like this:

    dt_bpf_make_progs()
        dt_program_construct()        // just for ERROR
            dt_link()
                dt_link_construct()
    dt_bpf_gmap_create()
    dt_bpf_load_progs()               // other
            dt_link()
                dt_link_construct()

In dt_link_construct() we dive down and find dt_get_bvar().  One of the
relocations is to supply the value of STBSZ.  The first dt_link() is for
ERROR, while the subsequent calls in dt_bpf_load_progs() are for other
clauses -- that is, two separate versions of dt_get_bvar() are used.
Meanwhile, the value of STBSZ is not set until dt_bpf_gmap_create().
This means that the ERROR copy of dt_get_bvar() does not have STBSZ set
properly. This means that if ERROR accesses probeprov or probename,
dt_get_bvar() returns the beginning of the string table, which is a NUL
terminator.  Some other relocation values have similar issues.

Move the ERROR program construction to dt_bpf_load_progs().

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: a730cfbe5b398a8e78d43863b5ede00b691d7fc7
      https://github.com/oracle/dtrace-utils/commit/a730cfbe5b398a8e78d43863b5ede00b691d7fc7
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-09-14 (Sat, 14 Sep 2024)

  Changed paths:
    M dtprobed/dof_stash.c

  Log Message:
  -----------
  dtprobed: Fix comment typo

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 651aeab7f192818aa0d958ffdcf23c9eb3e10292
      https://github.com/oracle/dtrace-utils/commit/651aeab7f192818aa0d958ffdcf23c9eb3e10292
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-09-14 (Sat, 14 Sep 2024)

  Changed paths:
    M libdtrace/dtrace.h

  Log Message:
  -----------
  Clean up dtsd_* members

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 203e57977bb973a944801b354599a88ae2601be5
      https://github.com/oracle/dtrace-utils/commit/203e57977bb973a944801b354599a88ae2601be5
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-09-14 (Sat, 14 Sep 2024)

  Changed paths:
    M libdtrace/dt_cc.c

  Log Message:
  -----------
  Simplify dt_stmt_create() attr init

Even though dt_stmt_create() initializes dtsd_descattr and dtsd_stmtattr,
there is no point to doing so.  It calls dtrace_stmt_create(), which also
sets these members.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 193d78eadb4509c72b28cd01c6b483af6c860830
      https://github.com/oracle/dtrace-utils/commit/193d78eadb4509c72b28cd01c6b483af6c860830
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-09-14 (Sat, 14 Sep 2024)

  Changed paths:
    M include/dtrace/pid.h

  Log Message:
  -----------
  DTPPT_POST_OFFSETS is unused

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: e50e4e49643bdc5d9b1edfee4dc78d853a5afa6e
      https://github.com/oracle/dtrace-utils/commit/e50e4e49643bdc5d9b1edfee4dc78d853a5afa6e
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-09-14 (Sat, 14 Sep 2024)

  Changed paths:
    M libdtrace/dt_aggregate.c

  Log Message:
  -----------
  Remove apparently redundant assignment

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 9322c4eb170622a5898f7e96035262c52728d2a8
      https://github.com/oracle/dtrace-utils/commit/9322c4eb170622a5898f7e96035262c52728d2a8
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-09-14 (Sat, 14 Sep 2024)

  Changed paths:
    M libdtrace/dt_consume.c

  Log Message:
  -----------
  Eliminate unused args to dt_spec_buf_add_data()

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 69e5a8ef61a99574c61aafb999a7599e92563b5e
      https://github.com/oracle/dtrace-utils/commit/69e5a8ef61a99574c61aafb999a7599e92563b5e
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-09-14 (Sat, 14 Sep 2024)

  Changed paths:
    M include/dtrace/dof.h
    M include/dtrace/enabling.h
    M libdtrace/dt_dof.c

  Log Message:
  -----------
  Both dted_uarg and dofe_uarg are unused

I confirmed in a run of the test suite that they are unused.

But I do not understand how any of the dof_ecbdesc_t fields are
used: dofe_probes, dofe_actions, or dofe_pad.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: c59a3ffbf4b1941ee55fe4ca2701da7e197079ad
      https://github.com/oracle/dtrace-utils/commit/c59a3ffbf4b1941ee55fe4ca2701da7e197079ad
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-09-14 (Sat, 14 Sep 2024)

  Changed paths:
    A test/unittest/speculation/tst.SpecSizeVariations.r
    A test/unittest/speculation/tst.SpecSizeVariations.sh
    R test/unittest/speculation/tst.SpecSizeVariations4.d
    R test/unittest/speculation/tst.SpecSizeVariations4.r
    R test/unittest/speculation/tst.SpecSizeVariations5.d
    R test/unittest/speculation/tst.SpecSizeVariations5.r

  Log Message:
  -----------
  test: Clean up the specsize tests

The tests had actions like
    printf("%lld: Lots of data\n", x);
    printf("%lld: Has to be crammed into this buffer\n", x);
    printf("%lld: Until it overflows\n", x);
    printf("%lld: And causes flops\n", x);
suggesting that these strings were crowding the buffer, but these
strings are not passed from producer to consumer at all.

The tests also only tested one clause per speculation.  It would be
nice also to test multiple clauses per speculation.

There is much replicated code from one of the tests to the other, a
shortcoming that is amplified if we want to test more specsize values,
which is the case when we test multiple clauses per speculation.

Therefore, replace the multiple tests with a single test that checks
multiple clauses per speculation and more values of specsize.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: f3a63d8683e38d573b0d4dd13596c2ef5d0f360c
      https://github.com/oracle/dtrace-utils/commit/f3a63d8683e38d573b0d4dd13596c2ef5d0f360c
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-09-14 (Sat, 14 Sep 2024)

  Changed paths:
    A test/unittest/options/err.bufsize-negative.d
    A test/unittest/options/err.bufsize-negative.r
    R test/unittest/speculation/err.BufSizeVariations1.d
    R test/unittest/speculation/err.BufSizeVariations2.d
    R test/unittest/speculation/err.NegativeBufSize.d
    R test/unittest/speculation/err.NegativeBufSize.r

  Log Message:
  -----------
  test: Fix the speculative tests that checked bufsize

Ever since speculations were reimplemented, these tests simply were
not testing what they claimed to test.  Among other things:

1)  There is a simple dependence on bufsize that is independent of
speculations.  So speculations have no special role in bufsize tests.

2)  The messages in the print statements were not taxing bufsize.
(A single default string would be enough to exhaust 60 bytes, but
the producer wasn't passing the consumer these strings at all.
The bufsize is being set by the implicit ERROR probe.)

3)  The various size ranges described in the comments do not exist
and were not being tested anyhow.

So remove these tests, and just rely on the other bufsize tests.

To be fair, there seemed to have been no other "negative bufsize"
test, but add a more straightforward such test and add it to where
the other bufsize tests are.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 65cf4e6d05cc7be316730075637b372c86edc96b
      https://github.com/oracle/dtrace-utils/commit/65cf4e6d05cc7be316730075637b372c86edc96b
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-09-14 (Sat, 14 Sep 2024)

  Changed paths:
    M test/unittest/error/tst.DTRACEFLT_BADADDR2.d
    M test/unittest/error/tst.DTRACEFLT_BADADDR2.r

  Log Message:
  -----------
  test: Remove tst.DTRACEFLT_BADADDR2.d dependency on specific PC

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: e4bbbcda1d3ab28542cf04cfb81c54eb8ac186ca
      https://github.com/oracle/dtrace-utils/commit/e4bbbcda1d3ab28542cf04cfb81c54eb8ac186ca
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-09-14 (Sat, 14 Sep 2024)

  Changed paths:
    M test/unittest/assocs/tst.invalidref.d
    M test/unittest/builtinvar/tst.ipl.d
    M test/unittest/builtinvar/tst.ipl1.d
    M test/unittest/builtinvar/tst.vtimestamp.d
    M test/unittest/builtinvar/tst.vtimestamp2.d
    M test/unittest/printa/err.D_PRINTF_ARG_TYPE.jstack.d
    M test/unittest/printa/tst.jstack.d
    M test/unittest/ustack/tst.jstack_unprintable-bug26045010.sh
    M test/unittest/variables/bvar/tst.ipl.d
    M test/unittest/variables/bvar/tst.vtimestamp.d

  Log Message:
  -----------
  test: Annotate some XFAILs

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 9341a9d5543ce2cfac0b6863c426981aeb1b2636
      https://github.com/oracle/dtrace-utils/commit/9341a9d5543ce2cfac0b6863c426981aeb1b2636
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-09-14 (Sat, 14 Sep 2024)

  Changed paths:
    M test/unittest/dtrace-util/tst.ListProbesNameUSDT.sh

  Log Message:
  -----------
  test: Fix DIRNAME

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: b3a5870de98358b330a5ecad955a524da56cc96b
      https://github.com/oracle/dtrace-utils/commit/b3a5870de98358b330a5ecad955a524da56cc96b
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-09-14 (Sat, 14 Sep 2024)

  Changed paths:
    M test/unittest/pid/tst.newprobes.sh

  Log Message:
  -----------
  test: Update tst.newprobes.sh xfail message

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 8421056c4c96d8cb56f0b0cc9de4675a2a80a531
      https://github.com/oracle/dtrace-utils/commit/8421056c4c96d8cb56f0b0cc9de4675a2a80a531
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-09-18 (Wed, 18 Sep 2024)

  Changed paths:
    M test/unittest/profile-n/tst.ufunc.sh

  Log Message:
  -----------
  test: adjust filter

The unittest/profile-n/tst.ufunc.sh test could report a false negative
due to the filter not excluding ld-linux-*.  It also did not filter out
unresolved addresses from the bash process.

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>


  Commit: f190675bddeaffe382154c787a4575bf6ecc6e31
      https://github.com/oracle/dtrace-utils/commit/f190675bddeaffe382154c787a4575bf6ecc6e31
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-09-30 (Mon, 30 Sep 2024)

  Changed paths:
    M libdtrace/dt_cg.c
    M libdtrace/dt_probe.c
    M libdtrace/dt_probe.h
    M libdtrace/dt_program.c

  Log Message:
  -----------
  Change probes from having lists of clauses to lists of stmts

Each stmt has a clause and a probe description.  Traditionally,
we have added clauses to probes.  Further, we have generated an
enabled probe ID for each probe/clause combination, and the
consumer has used the EPID to determine the PRID as well as the
data descriptor for the clause.

In this patch, change from probes having clauses associated
with them to having stmts.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: f7a9f0fe769a36b00f63b0adceecb859f301c77f
      https://github.com/oracle/dtrace-utils/commit/f7a9f0fe769a36b00f63b0adceecb859f301c77f
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-09-30 (Mon, 30 Sep 2024)

  Changed paths:
    M bpf/get_bvar.c
    M bpf/probe_error.c
    M include/dtrace/metadesc.h
    M include/dtrace/universal.h
    M libdtrace/dt_bpf.c
    M libdtrace/dt_bpf.h
    M libdtrace/dt_cc.c
    M libdtrace/dt_cg.c
    M libdtrace/dt_consume.c
    M libdtrace/dt_dctx.h
    M libdtrace/dt_dlibs.c
    M libdtrace/dt_error.c
    M libdtrace/dt_handle.c
    M libdtrace/dt_impl.h
    M libdtrace/dt_map.c
    M libdtrace/dt_open.c
    M libdtrace/dt_program.c
    M libdtrace/dtrace.h
    R test/demo/builtin/eipd.d
    M test/demo/dtrace/error.r
    M test/demo/spec/specopen.d
    M test/stress/buffering/tst.resize3-manual.d
    M test/stress/buffering/tst.resize3-manual.r
    M test/stress/buffering/tst.resize3.d
    M test/stress/buffering/tst.resize3.r
    M test/unittest/actions/setopt/tst.badopt.r
    M test/unittest/arrays/tst.declared-bounds.runtime_out.r
    M test/unittest/codegen/err.deref_0.r
    M test/unittest/codegen/err.deref_1.r
    M test/unittest/codegen/err.deref_i0.r
    M test/unittest/codegen/err.deref_i1.r
    M test/unittest/codegen/err.deref_string-assoc.r
    M test/unittest/codegen/err.deref_string-gvar.r
    M test/unittest/codegen/err.deref_string-lvar.r
    M test/unittest/codegen/err.deref_string-tvar.r
    M test/unittest/codegen/err.str_NULL_plus_offset-assoc.r
    M test/unittest/codegen/err.str_NULL_plus_offset-lvar.r
    M test/unittest/codegen/err.str_NULL_plus_offset-tvar.r
    M test/unittest/codegen/err.str_NULL_plus_offset.r
    M test/unittest/disasm/tst.vartab-bvar.r
    M test/unittest/drops/drp.DTRACEDROP_DBLERROR.r
    M test/unittest/error/tst.DTRACEFLT_BADADDR.null_ptr_field.d
    M test/unittest/error/tst.DTRACEFLT_BADADDR.null_ptr_field.r
    M test/unittest/error/tst.DTRACEFLT_BADADDR.r
    M test/unittest/error/tst.DTRACEFLT_BADADDR2.r
    M test/unittest/error/tst.DTRACEFLT_DIVZERO.div.d
    M test/unittest/error/tst.DTRACEFLT_DIVZERO.div.r
    M test/unittest/error/tst.DTRACEFLT_DIVZERO.mod.d
    M test/unittest/error/tst.DTRACEFLT_DIVZERO.mod.r
    M test/unittest/error/tst.DTRACEFLT_UNKNOWN.r
    M test/unittest/error/tst.clause_scope-begin-ended.r
    M test/unittest/error/tst.clause_scope-begin.r
    M test/unittest/error/tst.clause_scope-regular.r
    M test/unittest/error/tst.clause_scope-regular.r.p
    M test/unittest/error/tst.error.r
    M test/unittest/error/tst.errorend.r
    M test/unittest/funcs/alloca/err.alloca-bcopy-before-beyond.r
    M test/unittest/funcs/alloca/err.alloca-bcopy-before-bottom.r
    M test/unittest/funcs/alloca/err.alloca-bcopy-beyond-top.r
    M test/unittest/funcs/alloca/err.alloca-bcopy-crossing-bottom.r
    M test/unittest/funcs/alloca/err.alloca-bcopy-crossing-top.r
    M test/unittest/funcs/alloca/err.alloca-crossing-clauses.r
    M test/unittest/funcs/alloca/err.alloca-load-before-bottom.r
    M test/unittest/funcs/alloca/err.alloca-load-beyond-top.r
    M test/unittest/funcs/alloca/err.alloca-load-crossing-bottom.r
    M test/unittest/funcs/alloca/err.alloca-null-deref-lvalue.r
    M test/unittest/funcs/alloca/err.alloca-null-deref.r
    M test/unittest/funcs/alloca/err.alloca-scratch-exceeding-bcopy.r
    M test/unittest/funcs/alloca/err.alloca-store-before-bottom.r
    M test/unittest/funcs/alloca/err.alloca-store-beyond-top.r
    M test/unittest/funcs/alloca/err.alloca-store-crossing-bottom.r
    M test/unittest/funcs/bcopy/err.badbcopy1.r
    M test/unittest/funcs/bcopy/err.badbcopy4.r
    M test/unittest/funcs/bcopy/err.badbcopy5.r
    M test/unittest/funcs/bcopy/err.badbcopy6.r
    M test/unittest/funcs/bcopy/err.badbcopy7.r
    M test/unittest/funcs/bcopy/err.badbcopy8.r
    M test/unittest/funcs/copyin/err.badaddr.r
    M test/unittest/funcs/copyin/err.null_arg1.r
    M test/unittest/funcs/copyinstr/err.badaddr.r
    M test/unittest/funcs/copyinstr/err.null_arg1.r
    M test/unittest/funcs/copyinto/err.badaddr.r
    M test/unittest/funcs/copyinto/err.badsize.r
    M test/unittest/funcs/copyinto/err.null_arg1.r
    M test/unittest/funcs/err.badalloca.r
    M test/unittest/funcs/err.badalloca.r.p
    M test/unittest/funcs/err.link_ntopbadaddr.r
    M test/unittest/funcs/err.link_ntopbadarg.r
    M test/unittest/funcs/inet_ntoa6/err.inet_ntoa6.arg1_null.r
    M test/unittest/funcs/inet_ntoa6/err.inet_ntoa6.arg1_null_const.r
    M test/unittest/funcs/strlen/tst.null.r
    M test/unittest/funcs/strtok/tst.strtok_null.r
    M test/unittest/funcs/strtok/tst.strtok_nulldel.r
    M test/unittest/funcs/strtok/tst.strtok_nullstr.r
    M test/unittest/funcs/strtok/tst.strtok_nullstr2.r
    M test/unittest/funcs/substr/err.substr_null_arg1.r
    M test/unittest/pointers/err.AllocaOverrun.r
    M test/unittest/pointers/err.BadAlign.r
    M test/unittest/pointers/err.InvalidAddress2.r
    M test/unittest/pointers/err.InvalidAddress4.r
    M test/unittest/speculation/err.CommitWithInvalid.r
    M test/unittest/speculation/err.DiscardWithInvalid.r
    M test/unittest/speculation/tst.SpecSizeVariations.r
    M test/unittest/speculation/tst.SpecSizeVariations.sh
    M test/unittest/speculation/tst.negcommit.r
    M test/unittest/variables/bvar/tst.arg3-ERROR-b.sh
    M test/unittest/variables/bvar/tst.arg3-ERROR.sh

  Log Message:
  -----------
  Deprecate enabled probe ID (epid)

Historically, the enabled probe id (epid) was an integer, passed from
producer to consumer, that uniquely identified probe ID and statement
(data description).  It was used in error reporting and was available
to D users via a built-in variable "epid".

However, its value was opaque to users and difficult to use.

Deprecate the use of EPID:

*)  Have the producer pass to the consumer the probe ID and statement
    ID explicitly, instead of passing an opaque integer that requires
    additional lookup tables.

*)  Keep an array dt_stmts[] of statements, from which we can retrieve
    probe descriptions and data descriptions.

*)  Remove data structures related to epid: dt_ddesc[], dt_pdesc[],
    dt_nextepid, dt_maxprobe, etc.

Nevertheless, continue to provide a value for the built-in "epid" variable
for back compatability.  Expand the epid from 4 bytes to 8 bytes:  the
upper half is the probe ID and the lower half the statement ID.

The output buffer (written by the producer, read by the consumer) is
rearranged slightly.  Note that:

*)  It starts with a 4-byte size, which perf_event writes.

*)  The beginning of the output buffer should have 8-byte alignment.

*)  The beginning of the trace data within the output buffer should
    also have 8-byte alignment.

*)  So we rearrange as follows:

            old                        new

         0: pad / size                 pad / size    <==
         4: pad                        specid
         8: epid      <==              prid
        12: specid                     stid
        16: data[n]                    data[n]

    The arrow <== indicates where the buffer starts.

For error reporting:

*)  Report errors in terms of the probe ID (and description) and the
    clause function name, which is decipherable in terms of the
    disassembly output.  Specifically, change ERROR-probe arguments:

    -)  arg1 changes from epid to the probe ID

    -)  arg2 changes from "clause index" (which is no longer needed)
        to the statement ID that identifies the clause named in
        disassembly output

*)  No longer report the "action number", which has lost much of its
    meaning in the port to eBPF.  Nonetheless, keep dteda_action;  its
    value is not used, but set the value to stid for possible future use.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 05522529abae320e5454e6f78bc2e045d421fab7
      https://github.com/oracle/dtrace-utils/commit/05522529abae320e5454e6f78bc2e045d421fab7
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-09-30 (Mon, 30 Sep 2024)

  Changed paths:
    M libdtrace/dt_work.c
    M test/unittest/options/tst.b.d
    M test/unittest/options/tst.bufsize.d

  Log Message:
  -----------
  options, test: correct bufsize calculations and tests

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>


  Commit: 5d4249c23f28bd45e12e6a8f6fad1212a9941ed9
      https://github.com/oracle/dtrace-utils/commit/5d4249c23f28bd45e12e6a8f6fad1212a9941ed9
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-09-30 (Mon, 30 Sep 2024)

  Changed paths:
    M libdtrace/dt_cc.c

  Log Message:
  -----------
  Revert "Simplify dt_stmt_create() attr init"

The patch caused the default stability attributes to be applied
to each statement, ignoring those that are passed to dt_stmt_create()
explicitly.

This reverts commit 203e57977bb973a944801b354599a88ae2601be5.

Suggested-by: Eugene Loh <eugene.loh at oracle.com>
Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 337fd6da4a85b2b2d614bde398c15f8fd66c83fa
      https://github.com/oracle/dtrace-utils/commit/337fd6da4a85b2b2d614bde398c15f8fd66c83fa
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-09-30 (Mon, 30 Sep 2024)

  Changed paths:
    M libdtrace/dt_pid.c
    M libdtrace/dt_pid.h

  Log Message:
  -----------
  Split dt_pid_create_probes() into pid and USDT functions

The function dt_pid_create_probes() creates both pid and usdt probes.
Once the dtrace session has started, however, we only need to watch
for new usdt probes.

Therefore, reorganize dt_pid_create_probes():

*)  Rename
        dt_pid_create_pid_probes()
    to
        dt_pid_create_pid_probes_proc()
    and rename
        dt_pid_create_usdt_probes()
    to
        dt_pid_create_usdt_probes_proc()
    since these functions create probes for a specified process.

*)  Break dt_pid_create_probes() into two functions:
        dt_pid_create_pid_probes()
        dt_pid_create_usdt_probes()

*)  Make dt_pid_create_usdt_probes() available in dt_pid.h.

Also, start building support for wildcard USDT pid specifications.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: b55e34351d61bb3491c40f21633117ab8b57c3f9
      https://github.com/oracle/dtrace-utils/commit/b55e34351d61bb3491c40f21633117ab8b57c3f9
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-09-30 (Mon, 30 Sep 2024)

  Changed paths:
    M dtprobed/dof_stash.c

  Log Message:
  -----------
  USDT module names may contain dots; but forbid "." and ".." names

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 24342236ad1e19c47913eed4acead323dbff2cbd
      https://github.com/oracle/dtrace-utils/commit/24342236ad1e19c47913eed4acead323dbff2cbd
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-09-30 (Mon, 30 Sep 2024)

  Changed paths:
    M libdtrace/dt_pid.c

  Log Message:
  -----------
  USDT module names may contain dots; remove incorrect check

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: ce1981ec073f2b4ebd98dfc5b269606ab59f2cc4
      https://github.com/oracle/dtrace-utils/commit/ce1981ec073f2b4ebd98dfc5b269606ab59f2cc4
  Author: Sam James <sam at gentoo.org>
  Date:   2024-10-03 (Thu, 03 Oct 2024)

  Changed paths:
    M cmd/dtrace.8

  Log Message:
  -----------
  cmd: drop legacy DTrace references

We don't have a kernel module anymore.

Signed-off-by: Sam James <sam at gentoo.org>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: e4ed06c3ecbba547faf88e1f5eae8298d8b58be6
      https://github.com/oracle/dtrace-utils/commit/e4ed06c3ecbba547faf88e1f5eae8298d8b58be6
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-10-10 (Thu, 10 Oct 2024)

  Changed paths:
    M libdtrace/dt_prov_uprobe.c

  Log Message:
  -----------
  pid: mark PID-based providers only once

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>


  Commit: 76634e312a48bfbc7e1a8e5256866db1e8ac3260
      https://github.com/oracle/dtrace-utils/commit/76634e312a48bfbc7e1a8e5256866db1e8ac3260
  Author: Sam James <sam at gentoo.org>
  Date:   2024-10-11 (Fri, 11 Oct 2024)

  Changed paths:
    M test/unittest/ip/tst.ipv4remotetcp.sh

  Log Message:
  -----------
  test: fix exit code in tst.ipv4remotetcp.sh

$? was clobbered by the status=$? assignment above, see:
```
$ bash -c 'false ; x=$? ; echo $? ; echo ${x}'
0
1
```

We could just drop the status assignment but I just chose to do this
instead.

Signed-off-by: Sam James <sam at gentoo.org>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: aebbb7e986c186aa31d0e55dc3caccd03a892041
      https://github.com/oracle/dtrace-utils/commit/aebbb7e986c186aa31d0e55dc3caccd03a892041
  Author: Sam James <sam at gentoo.org>
  Date:   2024-10-11 (Fri, 11 Oct 2024)

  Changed paths:
    M test/unittest/options/tst.core.sh

  Log Message:
  -----------
  test: fix exit code typo in tst.core.sh

$rcc is not set, but $rc is. Use that.

Signed-off-by: Sam James <sam at gentoo.org>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 686e755f6451cc6255b3d5eadb672865275da140
      https://github.com/oracle/dtrace-utils/commit/686e755f6451cc6255b3d5eadb672865275da140
  Author: Sam James <sam at gentoo.org>
  Date:   2024-10-11 (Fri, 11 Oct 2024)

  Changed paths:
    M test/unittest/pid/tst.newprobes.sh

  Log Message:
  -----------
  test: fix exit code in tst.newprobes.sh

$status is never assigned, just use $?.

Signed-off-by: Sam James <sam at gentoo.org>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 90883db4f123ffd7d8073359822950a3e99b6ae9
      https://github.com/oracle/dtrace-utils/commit/90883db4f123ffd7d8073359822950a3e99b6ae9
  Author: Sam James <sam at gentoo.org>
  Date:   2024-10-11 (Fri, 11 Oct 2024)

  Changed paths:
    M test/unittest/sdt/tst.perf-types.sh

  Log Message:
  -----------
  test: fix missing line continuation in tst.perf-types.sh

shellcheck reports:
```
In test/unittest/sdt/tst.perf-types.sh line 14:
    -n 'END / hitany == 0 / { exit(1); }'
    ^-- SC2215 (warning): This flag is used as a command name. Bad line break or missing [ .. ]?
```

Add the missing '\'.

Signed-off-by: Sam James <sam at gentoo.org>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 11658071e9171efe26523df7457c105b496663d1
      https://github.com/oracle/dtrace-utils/commit/11658071e9171efe26523df7457c105b496663d1
  Author: Sam James <sam at gentoo.org>
  Date:   2024-10-11 (Fri, 11 Oct 2024)

  Changed paths:
    M test/internals/libproc/tst.plddGrab32.sh

  Log Message:
  -----------
  test: fix broken shebang in tst.plddGrab32.sh

shellcheck reports:
```
 In test/internals/libproc/tst.plddGrab32.sh line 2:
 #!/bin/bash
 ^-- SC1128 (error): The shebang must be on the first line. Delete blanks and move comments.
```

Signed-off-by: Sam James <sam at gentoo.org>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 712442501803d2a618bdc92ea77279037d4d09fd
      https://github.com/oracle/dtrace-utils/commit/712442501803d2a618bdc92ea77279037d4d09fd
  Author: Sam James <sam at gentoo.org>
  Date:   2024-10-11 (Fri, 11 Oct 2024)

  Changed paths:
    M test/unittest/aggs/tst.aggpercpu.sh
    M test/unittest/arrays/tst.uregsarray-check.sh
    M test/unittest/codegen/tst.kernel_read_scalar_regspill.r.p
    M test/unittest/cpc/tst.args_kernel.sh
    M test/unittest/cpc/tst.args_user.sh
    M test/unittest/pid/tst.offsets.sh
    M test/unittest/profile-n/tst.args_kernel.sh
    M test/unittest/profile-n/tst.args_user.sh

  Log Message:
  -----------
  test: awk -> gawk where we use strtonum

Signed-off-by: Sam James <sam at gentoo.org>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: ce09326fbcc3256e58e03dfafc2575bcc996f1b0
      https://github.com/oracle/dtrace-utils/commit/ce09326fbcc3256e58e03dfafc2575bcc996f1b0
  Author: Sam James <sam at gentoo.org>
  Date:   2024-10-11 (Fri, 11 Oct 2024)

  Changed paths:
    M test/unittest/drops/drp.DTRACEDROP_AGGREGATION.r.p
    M test/unittest/drops/drp.DTRACEDROP_PRINCIPAL.end.r.p
    M test/unittest/drops/drp.DTRACEDROP_PRINCIPAL.r.p
    M test/unittest/drops/test.drop-cpu-ids.r.p

  Log Message:
  -----------
  test: fix 'CPU' typo

Signed-off-by: Sam James <sam at gentoo.org>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 818f8208ce569e9f6670c5f913f84f6e49144718
      https://github.com/oracle/dtrace-utils/commit/818f8208ce569e9f6670c5f913f84f6e49144718
  Author: Sam James <sam at gentoo.org>
  Date:   2024-10-11 (Fri, 11 Oct 2024)

  Changed paths:
    A test/internals/libproc/tst.plddCreate.r.p
    A test/internals/libproc/tst.plddCreate32.r.p
    A test/internals/libproc/tst.plddCreatePIE.r.p
    A test/internals/libproc/tst.plddCreatePIE32.r.p
    A test/internals/libproc/tst.plddGrab.r.p
    A test/internals/libproc/tst.plddGrab32.r.p
    A test/internals/libproc/tst.plddGrabPIE.r.p
    A test/internals/libproc/tst.plddGrabPIE32.r.p

  Log Message:
  -----------
  test: libproc: cater to merged-usr systems

On merged-usr systems (where /lib -> /usr/lib and so on), we get spurious
failures like in tst.plddCreate.r:
```
-: dyn {ptr}, bias {ptr}, LMID 0: symbol search path:  (, /lib64/libc.so.6, /lib64/ld-linux-x86-64.so.2)
-/lib64/libc.so.6: dyn {ptr}, bias {ptr}, LMID 0: inherited symbol search path:  (, /lib64/libc.so.6, /lib64/ld-linux-x86-64.so.2)
-/lib64/ld-linux-x86-64.so.2: dyn {ptr}, bias {ptr}, LMID 0: inherited symbol search path:  (, /lib64/libc.so.6, /lib64/ld-linux-x86-64.so.2)
+: dyn {ptr}, bias {ptr}, LMID 0: symbol search path:  (, /usr/lib64/libc.so.6, /lib64/ld-linux-x86-64.so.2)
+/usr/lib64/libc.so.6: dyn {ptr}, bias {ptr}, LMID 0: inherited symbol search path:  (, /usr/lib64/libc.so.6, /lib64/ld-linux-x86-64.so.2)
+/lib64/ld-linux-x86-64.so.2: dyn {ptr}, bias {ptr}, LMID 0: inherited symbol search path:  (, /usr/lib64/libc.so.6, /lib64/ld-linux-x86-64.so.2)
3 libs seen.
```

sed out the difference.

Signed-off-by: Sam James <sam at gentoo.org>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 8a1264bf0e818c8624be250eb5174714b62ed93c
      https://github.com/oracle/dtrace-utils/commit/8a1264bf0e818c8624be250eb5174714b62ed93c
  Author: Sam James <sam at gentoo.org>
  Date:   2024-10-11 (Fri, 11 Oct 2024)

  Changed paths:
    M runtest.sh
    M test/stress/options/tst.cpu-BEGIN.sh
    M test/stress/options/tst.cpu-END.sh
    M test/stress/options/tst.cpu-cpc.sh
    M test/stress/options/tst.cpu-profile.sh
    M test/stress/options/tst.cpu-syscall.sh
    M test/stress/options/tst.cpu-tick.sh
    M test/unittest/actions/freopen/tst.badfreopen.sh
    M test/unittest/actions/raise/tst.sigdefs.sh
    M test/unittest/actions/symmod/tst.symmod.sh
    M test/unittest/actions/trace/tst.array.r.p
    M test/unittest/aggs/tst.aggmod_full.sh
    M test/unittest/aggs/tst.aggmod_full.x
    M test/unittest/aggs/tst.aggmod_full2.sh
    M test/unittest/aggs/tst.aggmod_full2.x
    M test/unittest/aggs/tst.multicpus.sh
    M test/unittest/bitfields/tst.bitfield-offset.x
    M test/unittest/codegen/tst.ALLOCA.r.p
    M test/unittest/codegen/tst.DPTR.r.p
    M test/unittest/codegen/tst.kernel_read_str.r.p
    M test/unittest/consumer/tst.merge_ranges_bug25767469.x
    M test/unittest/cpc/tst.allcpus.sh
    M test/unittest/cpc/tst.args_kernel.sh
    M test/unittest/cpc/tst.args_user.sh
    M test/unittest/cpc/tst.instructions.sh
    M test/unittest/cpc/tst.list_cpc.sh
    M test/unittest/disasm/tst.ann-agg.sh
    M test/unittest/disasm/tst.ann-bvar.sh
    M test/unittest/disasm/tst.ann-endian.sh
    M test/unittest/disasm/tst.ann-gvar-agg.sh
    M test/unittest/disasm/tst.ann-gvar-assoc.sh
    M test/unittest/disasm/tst.ann-js-neg.sh
    M test/unittest/disasm/tst.ann-reg-spill.sh
    M test/unittest/disasm/tst.ann-str_assoc.sh
    M test/unittest/disasm/tst.ann-str_gvar.sh
    M test/unittest/disasm/tst.ann-str_lvar.sh
    M test/unittest/disasm/tst.ann-str_tvar.sh
    M test/unittest/disasm/tst.ann-strconst-strtab.sh
    M test/unittest/disasm/tst.ann-strconst.sh
    M test/unittest/disasm/tst.ann-tramp-lvar.sh
    M test/unittest/disasm/tst.ann-tramp-tvar.sh
    M test/unittest/disasm/tst.ann-tvar-assoc.sh
    M test/unittest/disasm/tst.ann-tvar.sh
    M test/unittest/disasm/tst.ann-var.sh
    M test/unittest/disasm/tst.vartab-bvar-uregs0.sh
    M test/unittest/disasm/tst.vartab-bvar.sh
    M test/unittest/dtrace-util/tst.DisOption.sh
    M test/unittest/dtrace-util/tst.ListProbesModuleClause.sh
    M test/unittest/error/tst.fault-location.sh
    M test/unittest/fbtprovider/err.D_ARGS_IDX.void-void.x
    M test/unittest/fbtprovider/err.D_ARGS_IDX.void.x
    M test/unittest/funcs/alloca/tst.alloca0-values.sh
    M test/unittest/funcs/tst.rand_inter.sh
    M test/unittest/funcs/tst.rand_intra.sh
    M test/unittest/io/check_io_probe_args.sh
    M test/unittest/io/tst.local.sh
    M test/unittest/io/tst.local2.sh
    M test/unittest/io/tst.lv-done.r.p
    M test/unittest/io/tst.nfs2.sh
    M test/unittest/io/tst.wait.sh
    M test/unittest/ip/tst.ipv6localicmp.sh
    M test/unittest/ip/tst.ipv6remoteicmp.sh
    M test/unittest/lockstat/tst.lv-adaptive-acquire-error.r.p
    M test/unittest/lquantize/tst.normalize-bug26261502.sh
    M test/unittest/misc/tst.parser1.sh
    M test/unittest/misc/tst.parser2.sh
    M test/unittest/misc/tst.parser4.sh
    M test/unittest/options/err.ctfpath.sh
    M test/unittest/options/tst.S.sh
    M test/unittest/options/tst.core.sh
    M test/unittest/options/tst.cppargs.sh
    M test/unittest/options/tst.cpphdrs.sh
    M test/unittest/options/tst.cpu-BEGIN.sh
    M test/unittest/options/tst.cpu-END.sh
    M test/unittest/options/tst.cpu-cpc.sh
    M test/unittest/options/tst.cpu-profile.sh
    M test/unittest/options/tst.cpu-syscall.sh
    M test/unittest/options/tst.cpu-tick.sh
    M test/unittest/options/tst.ctfpath.sh
    M test/unittest/options/tst.ctypes.sh
    M test/unittest/options/tst.debug.sh
    M test/unittest/options/tst.dtypes.sh
    M test/unittest/options/tst.knodefs.sh
    M test/unittest/options/tst.linktype.sh
    M test/unittest/options/tst.modpath.sh
    M test/unittest/options/tst.modpath.x
    M test/unittest/options/tst.strip.sh
    M test/unittest/options/tst.switchrate.sh
    M test/unittest/options/tst.verbose.sh
    M test/unittest/options/tst.version.sh
    M test/unittest/pid/tst.offsets.sh
    M test/unittest/pid/tst.probemod.sh
    M test/unittest/printf/tst.wide-bug30404549.sh
    M test/unittest/printf/tst.wide.sh
    M test/unittest/profile-n/tst.args_kernel.sh
    M test/unittest/profile-n/tst.args_user.sh
    M test/unittest/profile-n/tst.ufunc.sh
    M test/unittest/profile-n/tst.umod.sh
    M test/unittest/profile-n/tst.usym.sh
    M test/unittest/providers/rawtp/err.lockmem-too-low.sh
    M test/unittest/providers/rawtp/tst.lv-sched_process_fork.r.p
    M test/unittest/sched/tst.lv-dequeue.r.p
    M test/unittest/scripting/tst.egid.sh
    M test/unittest/scripting/tst.euid.sh
    M test/unittest/scripting/tst.sid-valid.sh
    M test/unittest/usdt/tst.dlclose1.r.p
    M test/unittest/ustack/tst.jstack_unprintable-bug26045010.sh
    M test/unittest/variables/bvar/tst.curcpu_cpu_id.sh
    M test/unittest/variables/bvar/tst.id-valid.sh
    M test/unittest/variables/bvar/tst.offset-blank.sh
    M test/unittest/variables/gvar/tst.alignment-array.sh
    M test/unittest/variables/gvar/tst.alignment-char.sh
    M test/unittest/variables/gvar/tst.alignment-int.sh
    M test/unittest/variables/gvar/tst.alignment-long.sh
    M test/unittest/variables/gvar/tst.alignment-ptr.sh
    M test/unittest/variables/gvar/tst.alignment-short.sh
    M test/unittest/variables/gvar/tst.alignment-struct-2.sh
    M test/unittest/variables/gvar/tst.alignment-struct.sh
    M test/unittest/variables/gvar/tst.undecl-offset.sh
    M test/unittest/variables/lvar/tst.alignment-array.sh
    M test/unittest/variables/lvar/tst.alignment-char.sh
    M test/unittest/variables/lvar/tst.alignment-int.sh
    M test/unittest/variables/lvar/tst.alignment-long.sh
    M test/unittest/variables/lvar/tst.alignment-ptr.sh
    M test/unittest/variables/lvar/tst.alignment-short.sh
    M test/unittest/variables/lvar/tst.alignment-struct-2.sh
    M test/unittest/variables/lvar/tst.alignment-struct.sh
    M test/unittest/variables/tvar/tst.alignment-array.sh
    M test/unittest/variables/tvar/tst.alignment-char.sh
    M test/unittest/variables/tvar/tst.alignment-int.sh
    M test/unittest/variables/tvar/tst.alignment-long.sh
    M test/unittest/variables/tvar/tst.alignment-ptr.sh
    M test/unittest/variables/tvar/tst.alignment-short.sh
    M test/unittest/variables/tvar/tst.alignment-struct-2.sh
    M test/unittest/variables/tvar/tst.alignment-struct.sh
    M test/utils/clean_probes.sh
    M test/utils/perf_count_event.sh
    M test/utils/workload_analyze_loop.sh

  Log Message:
  -----------
  test: awk -> gawk universally

It doesn't feel worth it to keep playing whack-a-mole with gawkisms;
just unconditionally call 'gawk' instead of 'awk' to avoid issues where
e.g. /usr/bin/awk is provided by mawk instead.

Kris already analysed a few non-obvious cases where e.g. we used regex
extensions. It's not a good use of time.

Besides, we have a few tests which *definitely* require gawk, and
there's no interest in rewriting those, so using awk elsewhere doesn't
gain us anything.

Kept comments referring to awk the tool. This commit is best reviewed
with --word-diff.

Note: I've *not* done anything outside of tests as that's a slightly
more controversial decision.

Signed-off-by: Sam James <sam at gentoo.org>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 54bbde8aeaa43dc89a9d779abdaf8273b3ea69b0
      https://github.com/oracle/dtrace-utils/commit/54bbde8aeaa43dc89a9d779abdaf8273b3ea69b0
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-10-22 (Tue, 22 Oct 2024)

  Changed paths:
    M libdtrace/dt_error.c

  Log Message:
  -----------
  error: add missing EDT_PRINT entry

The lack of this made it impossible to print out the last error
in the list (which is EDT_PRINT itself).

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Alan Maguire <alan.maguire at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 879a20350fb958b0cc42ad609b49de6fd5bc06b0
      https://github.com/oracle/dtrace-utils/commit/879a20350fb958b0cc42ad609b49de6fd5bc06b0
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-10-25 (Fri, 25 Oct 2024)

  Changed paths:
    M libdtrace/dt_parser.c
    A test/unittest/types/tst.castwritable.d
    A test/unittest/types/tst.castwritable.r

  Log Message:
  -----------
  Cast should not change writable

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: f3bc7f12a11fb7393a50dedd3d0fe14130fe4653
      https://github.com/oracle/dtrace-utils/commit/f3bc7f12a11fb7393a50dedd3d0fe14130fe4653
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-10-25 (Fri, 25 Oct 2024)

  Changed paths:
    M test/unittest/ip/tst.ipv4localudp.sh

  Log Message:
  -----------
  test: Correct long-standing dt_flags typo

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 3a56a558531152ab3b9883dc62bc9cd31ba09cea
      https://github.com/oracle/dtrace-utils/commit/3a56a558531152ab3b9883dc62bc9cd31ba09cea
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-10-25 (Fri, 25 Oct 2024)

  Changed paths:
    M test/triggers/Build

  Log Message:
  -----------
  test: Remove some outdated and unhelpful comments

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: ce4b1b6ff51ee7c014aa22fa93c27ca7d2a74e10
      https://github.com/oracle/dtrace-utils/commit/ce4b1b6ff51ee7c014aa22fa93c27ca7d2a74e10
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-10-28 (Mon, 28 Oct 2024)

  Changed paths:
    M libdtrace/dt_bpf.c
    M libdtrace/dt_open.c
    M libdtrace/dt_provider.c
    M libdtrace/dt_provider.h
    M libdtrace/dt_work.c

  Log Message:
  -----------
  Add a dt_provider_discover() function

It is possible for new providers and probes to appear after dtrace_go().
Add a function that can be called for such discovery, on a per-provider
basis.  Each provider that supports such discovery needs to provide:

*)  a function discover() that performs discovery on behalf of the provider

*)  a function add_probe() that adds a particular (discovered) probe

To support looping over providers, move dt_providers[] from
dt_open.c to dt_provider.c and extern it in dt_provider.h.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: fad6a7cac8ddb4d1be7f9517101ea6c2c620ed84
      https://github.com/oracle/dtrace-utils/commit/fad6a7cac8ddb4d1be7f9517101ea6c2c620ed84
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-10-29 (Tue, 29 Oct 2024)

  Changed paths:
    M bpf/get_bvar.c
    M include/dtrace/options_defines.h
    M libdtrace/dt_bpf.c
    M libdtrace/dt_bpf.h
    M libdtrace/dt_bpf_maps.h
    M libdtrace/dt_cc.c
    M libdtrace/dt_dlibs.c
    M libdtrace/dt_impl.h
    M libdtrace/dt_open.c
    M libdtrace/dt_options.c
    M libdtrace/dt_prov_uprobe.c
    M libdtrace/dt_provider.c
    M libdtrace/dt_provider.h

  Log Message:
  -----------
  Create the BPF usdt_names and usdt_prids maps

As USDT processes come and go, the set of overlying probes for an
underlying probe will change.  Hence, we will move to a scheme in
which an underlying probe program will walk all possible clauses
that any of its possible overlying probes might call, for each
overlying probe only executing the clauses that apply, using a
bitmask.

In this patch, we create and update the BPF "usdt_prids" map.  This
is a hash map, where:

  *)  the key (size: dtp->dt_usdt_pridsmap_ksz) comprises
        - the PID of the firing process
        - the PRID of the underlying probe

  *)  the value (size: dtp->dt_usdt_pridsmap_vsz) comprises
        - the PRID over the overlying USDT probe
        - a bit mask indicating which clauses should be called

As USDT processes start up, we also add new overlying USDT probes,
whose name elements must be retrievable by prid for the built-in
variables probeprov, probemod, probefunc, and probename.  While
those strings are currently in the BPF "strtab" map, that monolithic
table cannot safely be updated by the consumer while the kernel might
be reading the map.  Therefore, we introduce a new variable,
dtp->dt_nprobes, that records the number of probes at the time of
dtrace_go().  For a prid < dtp->nprobes, get_bvar() uses the existing
scheme to retrieve probe name elements.  For newer prids, necessarily
USDT probes, use the new BPF "usdt_names" map instead.

The number of new USDT probes that can be accommodated at any one time
is set by the new "nusdtprobes" option.

The size of the bit mask limits the number of clauses, currently 64,
an underlying probe might call.  This is relatively easy to extend;
nevertheless, that work is left for a future patch.

We also want to be able to add new underlying probes, even after
dtrace_go() has finished.  Therefore, make dt_bpf_load_prog() callable
outside of dt_bpf.c and call dt_construct(), dt_link(),
dt_bpf_load_prog(), and attach() to add any new underlying probes.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 2560895b427b2236ffdacef36f777e12b3d176f1
      https://github.com/oracle/dtrace-utils/commit/2560895b427b2236ffdacef36f777e12b3d176f1
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-10-29 (Tue, 29 Oct 2024)

  Changed paths:
    M libdtrace/dt_prov_uprobe.c
    A test/unittest/pid/tst.entry_off0.sh

  Log Message:
  -----------
  Support multiple overlying probes in the uprobe trampoline

An underlying probe could support all sorts of overlying probes:
  - pid entry
  - pid return
  - pid offset
  - USDT
  - USDT is-enabled

The overlying probes belonging to an underlying probe match the
underlying probe -- except possibly in pid.  So, an underlying
probe loops over its overlying probes, looking for a pid match.

The trampoline would look for only one match.

However, more than one overlying probe might match.  Therefore,
change the loop to keep going even after a match has been found.

Incidentally, it is actually only pid offset probes that could
"collide" with any other overlying probes for a given pid:

-)  pid return probes are implemented with uretprobes
    and so cannot "collide" with any other probes

-)  no two USDT probes -- is-enabled or not -- can map
    to the same underlying probe for any pid

-)  no USDT probe -- is-enabled or not -- can map to
    to the same underlying probe as a pid entry

So, possibly one could optimize the trampoline -- e.g., by adding
BPF code to exit once two matches have been made.

Note that the flag we pass in to dt_cg_tramp_copy_args_from_regs()
should depend on whether the overlying probe is a pid or USDT probe.
We used to check PP_IS_FUNCALL, but the upp could be for both.  So
check the provider for the overlying probe instead.  (A later patch
will move USDT probes to a different mechanism anyhow.)

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: b4f7a456bc4bcda1f2a7b3f9e28d5e0727eca370
      https://github.com/oracle/dtrace-utils/commit/b4f7a456bc4bcda1f2a7b3f9e28d5e0727eca370
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-10-29 (Tue, 29 Oct 2024)

  Changed paths:
    M libdtrace/dt_prov_uprobe.c
    A test/unittest/usdt/tst.nusdtprobes.r
    A test/unittest/usdt/tst.nusdtprobes.sh

  Log Message:
  -----------
  Use usdt_prids map to call clauses conditionally for USDT probes

This version supports only up to 64 clauses for an underlying
probe, but it can be extended to more clauses.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: caf431aed4d8d2a891c8b13eb39fbccaf4ccd48a
      https://github.com/oracle/dtrace-utils/commit/caf431aed4d8d2a891c8b13eb39fbccaf4ccd48a
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-10-29 (Tue, 29 Oct 2024)

  Changed paths:
    M libdtrace/dt_prov_uprobe.c
    A test/unittest/usdt/tst.enable_pid.r
    A test/unittest/usdt/tst.enable_pid.r.p
    A test/unittest/usdt/tst.enable_pid.sh

  Log Message:
  -----------
  Remove the is-enabled provider

The trampoline for the is-enabled provider is unnecessarily complicated.
We do not need dt_cg_tramp_copy_regs() since the copied values will not
be used.  Nor do we need the (second) copy of regs[arg0] to mst->arg[0].
We can inline copyout_val().

Actually, we can simply consolidate the USDT and is-enabled providers.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: cab639d87921fa5b552abe57af18c314bc7fffb3
      https://github.com/oracle/dtrace-utils/commit/cab639d87921fa5b552abe57af18c314bc7fffb3
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-10-29 (Tue, 29 Oct 2024)

  Changed paths:
    M libdtrace/dt_cc.c
    M libdtrace/dt_pid.c
    M libdtrace/dt_pid.h
    M test/unittest/dtrace-util/tst.ListProbesFuncUSDT.sh
    M test/unittest/dtrace-util/tst.ListProbesModuleUSDT.sh
    M test/unittest/dtrace-util/tst.ListProbesNameUSDT.sh
    M test/unittest/dtrace-util/tst.ListProbesProviderUSDT.sh
    M test/unittest/usdt/tst.forker.sh

  Log Message:
  -----------
  Support USDT wildcard provider descriptions

To look for pid probes, whose pid values must be specified explicitly,
we can require that the provider description should end in a digit.

For USDT probes, however, there can be wildcard descriptions.  This
includes a blank provider description as well as a description that
ends in an '*'.

So, get rid of dt_pid_create_probes(), replacing it with
    dt_pid_create_pid_probes()
    dt_pid_create_usdt_probes()
calling each one appropriately.

This is rudimentary support.  We still need to:
- handle globs in dt_pid_create_probes_module()
- add process monitoring / inotify

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: b2158ddd657f59411eaae4e87779986b9e2362db
      https://github.com/oracle/dtrace-utils/commit/b2158ddd657f59411eaae4e87779986b9e2362db
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-10-29 (Tue, 29 Oct 2024)

  Changed paths:
    M libdtrace/dt_prov_uprobe.c

  Log Message:
  -----------
  Ignore clauses in USDT trampoline if we know they are impossible

An underlying probe might have to call all sorts of clauses if new
USDT processes start up.  Currently, the underlying probe trampoline
simply loops over all clauses, deciding whether to call a clause
based on a run-time bit mask.

While this approach works, it can mean, e.g., that clauses are being
loaded unnecessarily into BPF programs, bloating code.  It also means
that the trampoline is looping over unnecessarily many clauses.

Meanwhile, it is possible to know in certain cases that a clause
could never be called for a particular underlying probe.  The
heuristics can be tricky, but that challenge can be faced incrementally.

Introduce an ignore_clause() function that, for an underlying probe,
determines whether some clause (denoted by index) can safely be
ignored.

The same ignore_clause() function should be called both during code
generation of the trampoline as well as during the construction of
the bit mask.  Further, for a given clause n and underlying probe upp,
the function should always give the same output.  The set of ignored
clauses should remain fixed over the lifetime of an underlying probe.

For now, conservatively, ignore_clause() ignores nothing.  Later
patches will introduce heuristics for ignoring clauses.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 5c48caf0bac700f49da70dc795ad85359f586e04
      https://github.com/oracle/dtrace-utils/commit/5c48caf0bac700f49da70dc795ad85359f586e04
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-10-29 (Tue, 29 Oct 2024)

  Changed paths:
    M libdtrace/dt_program.c
    M libdtrace/dt_program.h
    M libdtrace/dt_prov_uprobe.c
    M libdtrace/dtrace.h

  Log Message:
  -----------
  Ignore clauses: some clauses are impossible regardless of uprp

In ignore_clauses, for an underlying probe uprp, we try to
decide if we can safely ignore clause n.

Meanwhile, for some clauses, the probe description tells us the
clause will not be called for any USDT probe, regardless of the
underlying probe.  For example, "syscall::write:" can safely be
ignored, for all uprp.

Add clause flags to track a statement's status.  Specifically,
a flag may indicate that a statement can be excluded for every
possible USDT probe or included because it might be needed for
some possible USDT probe.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 48f968635dd50ea43ab257d3d9fdf2b57bbcb3cc
      https://github.com/oracle/dtrace-utils/commit/48f968635dd50ea43ab257d3d9fdf2b57bbcb3cc
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-10-29 (Tue, 29 Oct 2024)

  Changed paths:
    M libdtrace/dt_prov_uprobe.c

  Log Message:
  -----------
  Ignore clauses: use underlying probe's function information

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 7995043b9f5aef1dd0d5ff75d1d51d9c0508cf35
      https://github.com/oracle/dtrace-utils/commit/7995043b9f5aef1dd0d5ff75d1d51d9c0508cf35
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-10-29 (Tue, 29 Oct 2024)

  Changed paths:
    A test/unittest/usdt/tst.pidprobes.r
    A test/unittest/usdt/tst.pidprobes.sh

  Log Message:
  -----------
  test: Add a pid-USDT test

This checks that pid entry, pid return, pid offset, USDT, and USDT
is-enabled probes can all coexist.  Specifically, pid offset probes
can sit on the same PCs as pid entry, USDT, and USDT is-enabled
probes.

Note that PCs for pid return probes are in the caller function
due to the uretprobe implementation in the kernel.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 65402988e24356aa4daca002df7f22edd644ffb9
      https://github.com/oracle/dtrace-utils/commit/65402988e24356aa4daca002df7f22edd644ffb9
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-10-29 (Tue, 29 Oct 2024)

  Changed paths:
    A test/unittest/usdt/tst.dlclose4.r
    A test/unittest/usdt/tst.dlclose4.sh

  Log Message:
  -----------
  test: Add another USDT open/close test

There is already a test to check that "dtrace -l" sees USDT
probes come and go as an executable loads and unloads a shared
library with USDT probes.  (See dlclose1.sh.)  But it could
also fail if DTrace does not immediately notice USDT probes
coming or going.

Introduce a test that allows a grace period before DTrace
notices a USDT probe come or go.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 3e3bc75d9d34206504737a024b610bebcdf7524e
      https://github.com/oracle/dtrace-utils/commit/3e3bc75d9d34206504737a024b610bebcdf7524e
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-10-29 (Tue, 29 Oct 2024)

  Changed paths:
    M test/triggers/Build
    A test/triggers/usdt-tst-defer-prov.d
    A test/triggers/usdt-tst-defer.c
    A test/unittest/usdt/tst.defer-nodtrace.r
    A test/unittest/usdt/tst.defer-nodtrace.sh

  Log Message:
  -----------
  test: Add a USDT "deferred" test trigger

After a dtrace session has started, it is possible for new USDT
processes to start and for there to be a delay before dtprobed
and then dtrace becomes aware of the new process.

Add a test trigger with USDT probes that waits for dtrace to
discover it and send it USR1.  Once the USR1 is received, a
short workload is run to completion.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: f99a6a45474181d9d82c30b53a4bc27018490027
      https://github.com/oracle/dtrace-utils/commit/f99a6a45474181d9d82c30b53a4bc27018490027
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-10-29 (Tue, 29 Oct 2024)

  Changed paths:
    A test/unittest/usdt/tst.defer-Z.r
    A test/unittest/usdt/tst.defer-Z.sh
    A test/unittest/usdt/tst.defer.r
    A test/unittest/usdt/tst.defer.sh

  Log Message:
  -----------
  test: Add USDT tests for deferred detection

When new USDT processes start up, we do not immediately trace
them.  First, dtprobed has to see these processes and then dtrace
has to find them.  Hence, many of our tests XFAIL.

Add some tests that check USDT tracing on processes that start
after the dtrace session has started, allowing for the possibility
that tracing does not start until after the trigger is already
underway.

There are two cases to consider.  One is when there is a USDT
process running when the dtrace session starts.  In this case,
an underlying probe is attached and later USDT processes just
get added on.  Another case is when no USDT processes are running
when the dtrace session starts.  In this case, -Z must be specified,
and the underlying probe will not be attached until one of the USDT
processes is detected.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 5530e5acf8dc57500bd652340557c0e29ea9cee5
      https://github.com/oracle/dtrace-utils/commit/5530e5acf8dc57500bd652340557c0e29ea9cee5
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-10-29 (Tue, 29 Oct 2024)

  Changed paths:
    A test/unittest/usdt/err.Z_no-w.r
    A test/unittest/usdt/err.Z_no-w.sh
    A test/unittest/usdt/err.no-Z.r
    A test/unittest/usdt/err.no-Z.sh
    A test/unittest/usdt/err.no-w.r
    A test/unittest/usdt/err.no-w.sh

  Log Message:
  -----------
  test: Add USDT error tests for -w and -Z

Error checking for USDT probes can be different from other probes.
So add specific USDT tests for -Z and -w.  Specifically:

    err.no-Z  No USDT process yet when dtrace is launched
              and -Z is not specified.  Therefore, dtrace
              will not start up.

    err.no-w  A USDT process is running when dtrace is
              launched, so -Z is not needed.  However, the
              action is destructive and -w is not specified.
              Therefore, dtrace will not start up.

    err.Z_no-w  No USDT process yet when dtrace is launched,
                but -Z is specified.  So, dtrace starts
                successfully.  But the action is destructive
                and -w is not specified.  So when the USDT
                process starts, dtrace fails.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 39cf54d2e98ac877d4b5e5ba6313f717173ca380
      https://github.com/oracle/dtrace-utils/commit/39cf54d2e98ac877d4b5e5ba6313f717173ca380
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-10-29 (Tue, 29 Oct 2024)

  Changed paths:
    M libdtrace/dt_proc.c

  Log Message:
  -----------
  Tweak self-armouring

Commit ea592d60 ("proc: improve armouring against self-grabs") has no
tests, but it breaks test/unittest/usdt/tst.multitrace.sh.  The patch
makes the following change in libdtrace/dt_proc.c dt_proc_control():

        if ((Psystem_daemon(dpr->dpr_pid, dtp->dt_useruid,
                    dtp->dt_sysslice) > 0) ||
    -       ((tracer_pid != 0) &&
    -        (tracer_pid != getpid())) ||
    +       (tracer_pid == getpid()) ||
    -       (dpr->dpr_pid == getpid()))
    +       (tgid == getpid()))
                noninvasive = 2;

We change a
        (tracer_pid != getpid())
into a
        (tracer_pid == getpid())

Changing that == back into a != makes tst.multitrace.sh work again.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 6a0c82be98ff1d3d25dfa6df176ccc6a196dc6ff
      https://github.com/oracle/dtrace-utils/commit/6a0c82be98ff1d3d25dfa6df176ccc6a196dc6ff
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-10-29 (Tue, 29 Oct 2024)

  Changed paths:
    M test/unittest/pid/tst.entry_off0.sh

  Log Message:
  -----------
  test: Increase timeout due to long shutdown

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 88c5c13279a7839e0a53ca3344bcd0dbe43fc158
      https://github.com/oracle/dtrace-utils/commit/88c5c13279a7839e0a53ca3344bcd0dbe43fc158
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-10-29 (Tue, 29 Oct 2024)

  Changed paths:
    M test/unittest/types/err.unloaded_var.x

  Log Message:
  -----------
  test: Do not return 1 for err.*.x checks

We can mark tests as expected to fail.  In fact, with .x files,
we can mark XFAIL based on a runtime check.

For err.* tests, however, we are expected to fail anyhow.  So,
having an err.*.x return 1 is at least confusing... certainly
for the runtest.sh script.

In practice, err.*.x files usually return only 0 or 2 -- that is,
we might elect to skip the test.

The sole exception is err.unloaded_var.x, which checks for
/lib/modules/$(uname -r)/kernel/fs/gfs2/gfs2.ko*.  If this module
is missing, the test is supposed to fail, but as it is err.* it is
expected to fail anyhow.  So the counterintuitive result is that
if the module is missing, the test produces XPASS.

Change this err.*.x file to skip the test if the module is missing.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 2319b1025561e907e97268958c560312b112736a
      https://github.com/oracle/dtrace-utils/commit/2319b1025561e907e97268958c560312b112736a
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-10-29 (Tue, 29 Oct 2024)

  Changed paths:
    M libdtrace/dt_pid.c

  Log Message:
  -----------
  USDT probes need provider spec ending with 0-9 or *

We can avoid the globbing when the provider name is inconsistent
with any USDT probe.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 1f034098c2eee413fff8eb03a0fb8204f0d6f2bd
      https://github.com/oracle/dtrace-utils/commit/1f034098c2eee413fff8eb03a0fb8204f0d6f2bd
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-10-29 (Tue, 29 Oct 2024)

  Changed paths:
    M libdtrace/dt_consume.c
    M libdtrace/dt_handle.c

  Log Message:
  -----------
  Fix prid fencepost errors

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: fb8e7f66da1c4f3cc4fdcbed05cbc73f17e1a90a
      https://github.com/oracle/dtrace-utils/commit/fb8e7f66da1c4f3cc4fdcbed05cbc73f17e1a90a
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-10-29 (Tue, 29 Oct 2024)

  Changed paths:
    M test/unittest/probes/tst.probestar.d

  Log Message:
  -----------
  test: Fix tst.probestar.d trigger

This test was relying on a trigger that uses the obsolete
dt_test, even though dt_test is irrelevant to the test.

Use a different trigger.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 751f8f46dd29f20352f526219568b67b9a51ac7c
      https://github.com/oracle/dtrace-utils/commit/751f8f46dd29f20352f526219568b67b9a51ac7c
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-10-29 (Tue, 29 Oct 2024)

  Changed paths:
    M test/demo/spec/specopen.d

  Log Message:
  -----------
  test: Clean up tst.specopen.d

The test does not do much.  Mostly, it is a speculation demo.
It just needed some syntactical cleanup to pass.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: b3c659ef7ffda475a4c18ecb3917b11ae691741d
      https://github.com/oracle/dtrace-utils/commit/b3c659ef7ffda475a4c18ecb3917b11ae691741d
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-10-29 (Tue, 29 Oct 2024)

  Changed paths:
    M test/unittest/begin/tst.begin-starvation.sh

  Log Message:
  -----------
  test: Remove misformatted and incorrect @@xfail

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 490e28a86fc5d3845e7fa18efc596d502362abeb
      https://github.com/oracle/dtrace-utils/commit/490e28a86fc5d3845e7fa18efc596d502362abeb
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-10-30 (Wed, 30 Oct 2024)

  Changed paths:
    M GNUmakefile
    M Makeconfig
    M configure
    M dtprobed/Build
    M dtprobed/dtprobed.c
    M include/port.h
    M libport/Build
    A libport/systemd_notify.c

  Log Message:
  -----------
  No longer depend on libsystemd

We only need this for the systemd notification protocol, and that's so
simple there is MIT-0-licensed reusable code in the sd_notify manpage
showing you how to use it.  That code looks pretty much OK, so I modified it
lightly and pulled it into libport, with one tweak to remove the use of
__attribute__((cleanup)) (it could be replaced by one line of perfectly
trivial standard C code, saving five or six lines in all).

With libsystemd linkage gone, we need another way for the user to indicate
that systemd is not in use and the systemd unit files are not wanted: so
introduce a new --without-systemd (and corresponding --with-systemd=no,
etc) in configure.  (Someone directly running make can just pass
WITH_SYSTEMD= to make.)

We lose one feature of libsystemd's sd_notify: we no longer remove the
NOTIFY_SOCKET env var from the environment, so our children could in theory
pretend to be us and notify systemd on our behalf.  Since our only child
is in a seccomped jail and is part of dtprobed anyway, this loss of
functionality is purely theoretical.

(Fix a bit of tabdamage in configure while we're at it.)

Bug: https://github.com/oracle/dtrace-utils/issues/92
Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 6f952c0a51db6c43e002f2c4b703bac577d21401
      https://github.com/oracle/dtrace-utils/commit/6f952c0a51db6c43e002f2c4b703bac577d21401
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-10-30 (Wed, 30 Oct 2024)

  Changed paths:
    M uts/dtrace.pc.in
    M uts/dtrace_sdt.pc.in

  Log Message:
  -----------
  pkgconfig: drop spaces in variable decls

The requirement to have variable declarations with no spaces in them is not
documented, nor does pkg-config seem to care, but most pkg-config scripts in
the wild conform to it and pkgconf --validate complains.

(pkgconf --validate may also complain about the Version lines. This is a bug
in pkgconf, <https://todo.sr.ht/~kaniini/pkgconf/15>, and should be
ignored.)

Bug: https://github.com/oracle/dtrace-utils/issues/105
Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: e51ff1312b8fc12533b3a8f0689f4e4b352da20f
      https://github.com/oracle/dtrace-utils/commit/e51ff1312b8fc12533b3a8f0689f4e4b352da20f
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-10-30 (Wed, 30 Oct 2024)

  Changed paths:
    M Makeconfig
    M configure
    M libdtrace/dt_work.c

  Log Message:
  -----------
  configure, build: make valgrind optional

We fail building if <valgrind/valgrind.h> is not available, which is
ridiculous given that the only reason we need it is to make valgrind go away
at suitable moments to let us drop uprobes.

A suitable new configure check (using a new check-header-macro-rule
function) lets us check for <valgrind/valgrind.h> and disable it if not
present: as usual, defining HAVE_VALGRIND or passing it to configure will
also suffice to override the check.

Bug: https://github.com/oracle/dtrace-utils/issues/80
Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: abbacc680551c591928d52d1fd82ea02ca1f3346
      https://github.com/oracle/dtrace-utils/commit/abbacc680551c591928d52d1fd82ea02ca1f3346
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-10-30 (Wed, 30 Oct 2024)

  Changed paths:
    M uts/Build

  Log Message:
  -----------
  build: substitute LIBDIR in pkg-config files

/usr/share/pkgconfig/dtrace.pc says

libdir = @LIBDIR@
/* ... */
Libs: -L${libdir} -ldtrace

which is unlikely to work.

Fix by substituting LIBDIR properly.

(I looked at these pkg-config files after installation I don't know how many
times and never once spotted this incredibly obvious problem.)

Bug: https://github.com/oracle/dtrace-utils/issues/104
Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: d229d0ad136a1f68999edb2da263096765973238
      https://github.com/oracle/dtrace-utils/commit/d229d0ad136a1f68999edb2da263096765973238
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-10-30 (Wed, 30 Oct 2024)

  Changed paths:
    M libdtrace/dt_impl.h
    M libdtrace/dt_probe.c
    M libdtrace/dt_subr.c

  Log Message:
  -----------
  probe: improve dt_probe_lookup2()

This function had numerous problems:

 - it broke _FORTIFY_SOURCE due to using a function that snprintf()ed
   with a size of INT_MAX, into a much smaller alloca()ed buffer
 - it claimed to call down to the dtrace kernel module for a probe
   description (long obsolete)
 - it invariably leaked the probe description it constructed by calling
   dtrace_xstr2desc()
 - it did meaningless errno testing to determine whether to return
   EDT_NOPROBE on error, which more or less led to EDT_NOPROBE never
   being returned even though it should always be in this case (there
   is no other cause for the ID hash lookup failing).

Fix the lot: while we're at it, implement a dt_desc_destroy() to
undo the strdup()s done by dtrace_xstr2desc(), and use it additionally
in dt_probe_destroy() instead of an identical sequence of dt_free()s.

Bug: https://github.com/oracle/dtrace-utils/issues/78
Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 36ebdff781ea4652d7b510228499bfad12daa7d5
      https://github.com/oracle/dtrace-utils/commit/36ebdff781ea4652d7b510228499bfad12daa7d5
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-10-30 (Wed, 30 Oct 2024)

  Changed paths:
    M GNUmakefile
    M cmd/Build
    M configure

  Log Message:
  -----------
  configure: fix dreadful behaviour of MANDIR / --mandir

This should obviously refer to the top-level mandir, i.e. PREFIX/share/man,
not PREFIX/share/man/man8!  Literally no package ever does that, I don't
know what I was thinking...

Bug: https://github.com/oracle/dtrace-utils/issues/106
Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 77c9bf3c7a516c28bee94cb8f53333f1019f988d
      https://github.com/oracle/dtrace-utils/commit/77c9bf3c7a516c28bee94cb8f53333f1019f988d
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-10-30 (Wed, 30 Oct 2024)

  Changed paths:
    M cmd/dtrace.8

  Log Message:
  -----------
  man: the synopsis is ended with .YS, not .SY

.SY *starts* the synopsis.

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 0d3ca706e0ae84032e1f3c32f1a229adcf676977
      https://github.com/oracle/dtrace-utils/commit/0d3ca706e0ae84032e1f3c32f1a229adcf676977
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-10-30 (Wed, 30 Oct 2024)

  Changed paths:
    M cmd/dtrace.8

  Log Message:
  -----------
  man: use \- for option dashes, not -

- is a line-breaking hyphen, almost always wrong for options.  (Its use
prevents the option from working when pasted into some terminal
emulators.)

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 6d2f620a0ad066b9df1063eb143cb1b03aaaa77f
      https://github.com/oracle/dtrace-utils/commit/6d2f620a0ad066b9df1063eb143cb1b03aaaa77f
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-10-30 (Wed, 30 Oct 2024)

  Changed paths:
    M cmd/dtrace.8

  Log Message:
  -----------
  man: drop blank lines

They don't do what you might expect in troff: a leading . is preferable.

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 473b33fec8fa84873d0e3921c822d43362516eb8
      https://github.com/oracle/dtrace-utils/commit/473b33fec8fa84873d0e3921c822d43362516eb8
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-10-30 (Wed, 30 Oct 2024)

  Changed paths:
    M cmd/dtrace.8

  Log Message:
  -----------
  man: fix blank line in environment variables list

Use .IP instead, to get an indented linebreak.

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 69e45263151629b434b268d513418ea9834f96e0
      https://github.com/oracle/dtrace-utils/commit/69e45263151629b434b268d513418ea9834f96e0
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-10-30 (Wed, 30 Oct 2024)

  Changed paths:
    M dtprobed/dtprobed.c

  Log Message:
  -----------
  dtprobed: fix parser child timeout

This was always meant to be five seconds, but when the option was
rejigged to take seconds rather than milliseconds, the default was
not changed, leading to a ridiculously huge multi-hour default
timeout.  We definitely don't want the parser child hanging for
nearly two hours: go back to seconds again.

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 98e2472768f22523523aaa6eef1780a32fa57924
      https://github.com/oracle/dtrace-utils/commit/98e2472768f22523523aaa6eef1780a32fa57924
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-10-30 (Wed, 30 Oct 2024)

  Changed paths:
    M cmd/dtrace.8
    M dtprobed/Build
    A dtprobed/dtprobed.8

  Log Message:
  -----------
  man: add manpage for dtprobed(8)

Cross-reference it from dtrace(8) and vice versa.

Bug: https://github.com/oracle/dtrace-utils/issues/94
Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: e410c612b66499ec2e367b8f22c2530323874ae9
      https://github.com/oracle/dtrace-utils/commit/e410c612b66499ec2e367b8f22c2530323874ae9
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-10-30 (Wed, 30 Oct 2024)

  Changed paths:
    M cmd/dtrace.8

  Log Message:
  -----------
  man: drop double-\fB at the start of every option line

All this does is stops \fP (which goes back to the previous font)
from working.  (The manpage looks fine afterwards, both on
the terminal and typeset.)

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 33bf8650bcfef147d464e8eecb66d552313f84b8
      https://github.com/oracle/dtrace-utils/commit/33bf8650bcfef147d464e8eecb66d552313f84b8
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-10-30 (Wed, 30 Oct 2024)

  Changed paths:
    M cmd/dtrace.8

  Log Message:
  -----------
  man: \fP-ize

This adjusts everything to use \fN...\fP rather than \fN...\fR everywhere:
the few places that were using \fP (usually \fB\fIfilename\fP.ext\fR) were
re-expressed into \fIfilename\fP\fB.ext\fP. \& was added in the instances
of this pattern that weren't using it (about half were).

No effect on terminal or typeset output, other than very slightly improved
layout around the filename stuff above.

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 8d1160c0b7b4ccac32ab0fe052cbc4a38fe2669f
      https://github.com/oracle/dtrace-utils/commit/8d1160c0b7b4ccac32ab0fe052cbc4a38fe2669f
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-11-01 (Fri, 01 Nov 2024)

  Changed paths:
    M test/utils/showUSDT.c

  Log Message:
  -----------
  utils: add args output to showUSDT.c

The showUSDT utility now reports argument type (native and translated)
and mapping data for probes.

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Nick Alcock <nick.alcock at oracle.com>


  Commit: d402bc98f3c9ca655aef5cd6c664eefce6fd1639
      https://github.com/oracle/dtrace-utils/commit/d402bc98f3c9ca655aef5cd6c664eefce6fd1639
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-11-05 (Tue, 05 Nov 2024)

  Changed paths:
    A test/unittest/speculation/tst.zerosize-chill.d
    A test/unittest/speculation/tst.zerosize-chill.r
    M test/unittest/speculation/tst.zerosize.d
    M test/unittest/speculation/tst.zerosize.r

  Log Message:
  -----------
  test: Clean up zero-size speculation + chill()

The chill() action is not yet supported, but it also is not needed
for the test.  Therefore, remove the chill() from the legacy test.

But we do not want to diminish test coverage.  Therefore, make a
copy of the test that keeps the chill (and annotates its XFAIL
more clearly).

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 9546afc22783badccc2d7b56bf9744e55e7a40a4
      https://github.com/oracle/dtrace-utils/commit/9546afc22783badccc2d7b56bf9744e55e7a40a4
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-11-05 (Tue, 05 Nov 2024)

  Changed paths:
    M test/unittest/usdt/tst.dlclose1.sh
    M test/unittest/usdt/tst.enable_pid.sh
    M test/unittest/usdt/tst.exec-dof-replacement.sh
    M test/unittest/usdt/tst.nusdtprobes.sh

  Log Message:
  -----------
  test: Disown child pid for cleaner stderr

The shell can report when a job is killed, potentially
polluting stderr and thereby mismatching the results file.

When a job is killed at the end of test, appearance of such
reports may depend on timing details:  does the parent test
or the child job terminate first?

Many tests deal with this problem by disowning child jobs.

Disown jobs in a few more possibly problematic tests.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 0f507f964a914df3aaace2d887481c90aad82004
      https://github.com/oracle/dtrace-utils/commit/0f507f964a914df3aaace2d887481c90aad82004
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-11-05 (Tue, 05 Nov 2024)

  Changed paths:
    M test/unittest/usdt/tst.pidprobes.sh

  Log Message:
  -----------
  test: Remove duplicated check

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: fbe27aa2fd6b003c65ecf3e839cb8fd318bd36af
      https://github.com/oracle/dtrace-utils/commit/fbe27aa2fd6b003c65ecf3e839cb8fd318bd36af
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-11-05 (Tue, 05 Nov 2024)

  Changed paths:
    M cmd/Build
    M dtprobed/Build

  Log Message:
  -----------
  build: mkdir man directories before installing to them

You need this for DESTDIR installs.

Bug: https://github.com/oracle/dtrace-utils/issues/106
Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 167c754d7661066c4cb3f0c70d869681caf5000f
      https://github.com/oracle/dtrace-utils/commit/167c754d7661066c4cb3f0c70d869681caf5000f
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-11-06 (Wed, 06 Nov 2024)

  Changed paths:
    M dtprobed/dof_stash.c
    M dtprobed/dtprobed.c
    M include/dtrace/pid.h
    M libcommon/dof_parser.c
    M libcommon/dof_parser.h
    M libdtrace/dt_pid.c

  Log Message:
  -----------
  usdt: get arg types and xlations into DTrace from the DOF

This change propagates native and xlated arg types and mapping info all
the way from the DOF, through the parser and dtprobed and the DOF stash,
into DTrace, where they end up in the pid_probespec_t for USDT probes.
We don't do anything with them once they get there in this commit: no
user-visible impacts expected.

We bump the DOF_PARSED_VERSION since we add three new types of record to the
dof_parser_t, all optional, covering native and xlated args and arg mapping
tables; to make life easier for consumers we emit them in a defined order
(documented in dof_parser.h), and add arg counts to the DIT_PROBE record
that precedes them indicating which will be present and how many args are in
them.  This means we retain the property that you can always tell which
records within a provider are coming next purely from records you already
have: there's no need to make decisions once the records turn up.  The DOF
stash hardly changes: all that happens is that the parsed data written to
each per-probe file gains some extra types of record (it can have
DIT_ARGS_NATIVE, DIT_ARGS_XLAT and DIT_ARGS_MAP entries following the
DIT_PROBE record now).

As usual with DOF_PARSED_VERSION bumps, DTraces that cross this change will
refuse to read probes added by dtprobeds that are on the other side of it.
(Restarting dtprobed will reparse all the probes in the stash to match the
new layout, and newly-started DTraces will pick that up -- so this only
affects running DTraces picking up new probes, which DTrace cannot do yet:
so no visible effects are expected.)

The code is a bit repetitive, with nargs, xargs and arg mapping all handled
separately even though the code is very similar.  In future maybe we could
unify them (but my attempts led to code that was much harder to read than
the original).

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: a09a449eb880098f8ea8bbc3ee62f3557e81a842
      https://github.com/oracle/dtrace-utils/commit/a09a449eb880098f8ea8bbc3ee62f3557e81a842
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-11-06 (Wed, 06 Nov 2024)

  Changed paths:
    M dtprobed/dof_stash.c

  Log Message:
  -----------
  dtprobed: stop skipping zero-tracepoint probes in dof_stash.c

We already validate that they don't exist in dof_parser.c, so no such probes
can ever get here.  Handling this impossible, untestable case has just got
harder, because we'd have to skip DIT_ARGS_{NATIVE,XLAT,MAP} records too.
Just stop considering it.

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 0134e3d9a427afb52bd8ad6388c34c94fda538c7
      https://github.com/oracle/dtrace-utils/commit/0134e3d9a427afb52bd8ad6388c34c94fda538c7
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-11-06 (Wed, 06 Nov 2024)

  Changed paths:
    M libdtrace/dt_cg.c
    M libdtrace/dt_cg.h

  Log Message:
  -----------
  cg: add argument mapping in the trampoline

Before now, argument mapping was restricted to the args[] array, and was
implemented in dt_cg_array_op in the same place where we decide whether
to automatically copyin() userspace strings.

But existing DTrace testcases suggest that arg mapping is also applied to
argN for USDT, even though this is inconsistent with SDT and arguably less
flexible than having argN be the unmapped arguments in all cases.  Add a new
function dt_cg_tramp_map_args(), which can be called from trampolines to
apply mappings (destructively, but it keeps a copy of the old args in the
save area so you can unapply them if you need to).  No existing providers do
any mapping, so this is not yet called, but it's about to be.

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: f52251d4a54cd40f7d4845ec03770f2c98e1b8b5
      https://github.com/oracle/dtrace-utils/commit/f52251d4a54cd40f7d4845ec03770f2c98e1b8b5
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-11-06 (Wed, 06 Nov 2024)

  Changed paths:
    M include/dtrace/pid.h
    M libdtrace/dt_pid.c
    M libdtrace/dt_prov_uprobe.c
    M test/triggers/usdt-tst-argmap-prov.d
    M test/triggers/usdt-tst-argmap.c
    A test/unittest/dtrace-util/tst.ListProbesArgsUSDT.r
    A test/unittest/dtrace-util/tst.ListProbesArgsUSDT.r.p
    A test/unittest/dtrace-util/tst.ListProbesArgsUSDT.sh
    A test/unittest/usdt/err.argmap-null.d
    A test/unittest/usdt/err.argmap-null.r
    A test/unittest/usdt/err.argmap-null.r.p
    A test/unittest/usdt/tst.argmap-null.d
    A test/unittest/usdt/tst.argmap-typed-partial.d
    A test/unittest/usdt/tst.argmap-typed.d
    M test/unittest/usdt/tst.argmap.d

  Log Message:
  -----------
  usdt: typed args and arg mapping

This change propagates the arg type and mapping info we just got into the
pid_probespec_t onward into the underlying dt_uprobe_t and shuffles the
argument values by calling dt_cg_tramp_map_args().  With this, USDT probes
should now have visible types which obey the :-notation translators
specified in their .d file (this is now tested).

The probe_info hook has been moved from the underlying probe to the
overlying one as part of this: underlying probes don't have any user-visible
args to get info for, and their probe_info functions are never called.  We
populate the dt_argdesc_t in a function ultimately called from USDT probe
discovery via provide_underlying, so it predates trampoline setup let alone
probe_info on the overlying probe and all the args info is present before it
is needed.

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 71fb89093a84455a6b762c0c4dbc6acadfd604a2
      https://github.com/oracle/dtrace-utils/commit/71fb89093a84455a6b762c0c4dbc6acadfd604a2
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-11-06 (Wed, 06 Nov 2024)

  Changed paths:
    M libdtrace/dt_prov_uprobe.c
    A test/unittest/usdt/pidprobes.sh
    A test/unittest/usdt/tst.pidargmap.sh
    A test/unittest/usdt/tst.pidargs.sh
    R test/unittest/usdt/tst.pidprobes.sh

  Log Message:
  -----------
  usdt: new tests for USDT arg sanity with overlapping pid probes

This generalizes the existing tst.pidprobes.sh to check the args
reported by the probe both with and without arg mapping in place.

Everything seems to work.

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 2bd6b8f5b3feff535184dd6ac713b2ff46239571
      https://github.com/oracle/dtrace-utils/commit/2bd6b8f5b3feff535184dd6ac713b2ff46239571
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-11-06 (Wed, 06 Nov 2024)

  Changed paths:
    M libdtrace/dt_prov_uprobe.c

  Log Message:
  -----------
  usdt: fix create_underlying error path

On error, we were destroying the underlying probe using the wrong call,
as if it were an overlying probe.

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 1a87c88ebb6e8b13dc5ce348d825a8dc3512ace0
      https://github.com/oracle/dtrace-utils/commit/1a87c88ebb6e8b13dc5ce348d825a8dc3512ace0
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-11-07 (Thu, 07 Nov 2024)

  Changed paths:
    M runtest.sh
    M test/expensive/locking/tst.DestructionDoubleUnlock.sh
    M test/expensive/locking/tst.exit-process-kill-races.sh
    M test/internals/headers/tst.header-endianness.sh
    M test/unittest/actions/symmod/tst.symmod.sh
    M test/unittest/aggs/tst.aggmod_full2.sh
    M test/unittest/aggs/tst.aggpercpu.sh
    M test/unittest/aggs/tst.multicpus.sh
    M test/unittest/arrays/tst.uregsarray-check.sh
    M test/unittest/builtinvar/tst.errno3.sh
    M test/unittest/cpc/err.cpcvscpustatpart1.sh
    M test/unittest/cpc/err.cpcvscpustatpart2.sh
    M test/unittest/cpc/err.cputrackfailtostart.sh
    M test/unittest/cpc/err.cputrackterminates.sh
    M test/unittest/cpc/tst.platformevent.sh
    M test/unittest/dtrace-util/tst.ListProbesArgsUSDT.sh
    M test/unittest/dtrace-util/tst.ListProbesFuncUSDT.sh
    M test/unittest/dtrace-util/tst.ListProbesModuleSDT.sh
    M test/unittest/dtrace-util/tst.ListProbesModuleUSDT.sh
    M test/unittest/dtrace-util/tst.ListProbesNameUSDT.sh
    M test/unittest/dtrace-util/tst.ListProbesProviderUSDT.sh
    M test/unittest/dtrace-util/tst.ProcInvalid.sh
    M test/unittest/fbtprovider/err.D_ARGS_IDX.void-void.x
    M test/unittest/fbtprovider/err.D_ARGS_IDX.void.x
    M test/unittest/ip/tst.ipv4remotetcp.sh
    M test/unittest/misc/err.lockmem-pragma.sh
    M test/unittest/misc/tst.include.sh
    M test/unittest/misc/tst.lockmem-cmdline.sh
    M test/unittest/misc/tst.lockmem-envvar.sh
    M test/unittest/misc/tst.lockmem-x.sh
    M test/unittest/misc/tst.parser1.sh
    M test/unittest/misc/tst.parser2.sh
    M test/unittest/misc/tst.parser4.sh
    M test/unittest/options/tst.bpflog-cmdline.sh
    M test/unittest/options/tst.bpflog-pragma.sh
    M test/unittest/options/tst.bpflogsize-pragma.sh
    M test/unittest/options/tst.iregs.sh
    M test/unittest/options/tst.linktype.sh
    M test/unittest/options/tst.modpath.x
    M test/unittest/options/tst.strip.sh
    M test/unittest/options/tst.switchrate.sh
    M test/unittest/options/tst.tregs.sh
    M test/unittest/pid/tst.offsets.sh
    M test/unittest/pid/tst.provregex3.sh
    M test/unittest/pid/tst.provregex4.sh
    M test/unittest/predicates/tst.predcache.sh
    M test/unittest/printf/tst.wide-bug30404549.sh
    M test/unittest/printf/tst.wide.sh
    M test/unittest/providers/rawtp/err.lockmem-too-low.sh
    M test/unittest/syscall/tst.openret.sh
    M test/unittest/usdt/tst.allargs.sh
    M test/unittest/usdt/tst.andpid.ksh
    M test/unittest/usdt/tst.badguess.sh
    M test/unittest/usdt/tst.corruptenv.sh
    M test/unittest/usdt/tst.dlclose1.sh
    M test/unittest/usdt/tst.dlclose2.sh
    M test/unittest/usdt/tst.dlclose3.sh
    M test/unittest/usdt/tst.dlclose4.sh
    M test/unittest/usdt/tst.eliminate.sh
    M test/unittest/usdt/tst.enable_pid.sh
    M test/unittest/usdt/tst.enabled.sh
    M test/unittest/usdt/tst.enabled2.sh
    M test/unittest/usdt/tst.entryreturn.sh
    M test/unittest/usdt/tst.exec-dof-replacement.sh
    M test/unittest/usdt/tst.execstack.sh
    M test/unittest/usdt/tst.fork.sh
    M test/unittest/usdt/tst.forker.sh
    M test/unittest/usdt/tst.guess32.sh
    M test/unittest/usdt/tst.guess64.sh
    M test/unittest/usdt/tst.header.sh
    M test/unittest/usdt/tst.lingering.sh
    M test/unittest/usdt/tst.link-idempotence.sh
    M test/unittest/usdt/tst.linkpriv.sh
    M test/unittest/usdt/tst.linkunpriv.sh
    M test/unittest/usdt/tst.manyprobes.sh
    M test/unittest/usdt/tst.manyprocs.sh
    M test/unittest/usdt/tst.multiple.sh
    M test/unittest/usdt/tst.multitrace.sh
    M test/unittest/usdt/tst.nusdtprobes.sh
    M test/unittest/usdt/tst.onlyenabled.sh
    M test/unittest/usdt/tst.pie.sh
    M test/unittest/usdt/tst.reeval.sh
    M test/unittest/usdt/tst.static.sh
    M test/unittest/usdt/tst.static2.sh
    M test/unittest/usdt/tst.user.sh

  Log Message:
  -----------
  test: testsuite $dt_flags and linker flags problems

The testsuite passes in a $dtrace environment variable: this must
be an ELF executable because some tests use it in hashbang lines,
so necessary flags are passed in in a $dt_flags variable which
must be passed to every dtrace invocation.  These flags are largely
path adjustments (-I etc) pointing DTrace to the in-source-tree
testsuite or the out-of-tree SDT headers and such things: as such,
it's unfortunate that a great many invocations were missed and that
those invocations were largely things like -G that actually *use* -I.

It also passes in a $test_cppflags variable which is meant to be
used for C preprocessor invocations, but many tests which should
use it don't use it, leading to the possibility (and, these days,
the likelihood) of picking up SystemTap <sys/sdt.h> instead, or
simply a compilation error if an installed testsuite is run.

This uncovers another bug: the -I flags passed in in all the
above cases are relative paths, so they are wrong for any tests
that cd, such as almost any test that does any compiles (which
all cd into directories under the $tmpdir). Make them absolute.

runtest.sh also populates a test_ldflags containing -L arguments
for libraries in the build tree, but this is never exported or
used by any tests: pass that in too, and change linker invocations
to use it instead.

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: ba6e6542c44f22b3707949e859b13209bebefae2
      https://github.com/oracle/dtrace-utils/commit/ba6e6542c44f22b3707949e859b13209bebefae2
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-11-08 (Fri, 08 Nov 2024)

  Changed paths:
    R test/unittest/usdt/pidprobes.sh
    M test/unittest/usdt/tst.pidargmap.sh
    M test/unittest/usdt/tst.pidargs.sh
    A test/unittest/usdt/tst.pidprobes.sh

  Log Message:
  -----------
  tests: repair accidentally deleted tst.pidprobes.sh

My intent when writing the earlier tests was to have
test/unittest/usdt/pidprobes.sh as a sort of shell script library
called by tst.pidprobes.sh, tst.pidargs.sh and tst.pidargmap.sh.
Alas, *.sh is executed as a test by runtest.sh, so
pidprobes.sh was treated as a test, not a library.  So rename it
back to what it was called before and make sure it works when
invoked directly by runtest.sh, but also let it be called by
the other two tests to test other corners of this.

(Also: apply some small review comments that never made it
before the previous patch hit dev.)

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>


  Commit: 62af7a88cd61fcb1685f03312d372b65dd7ccab6
      https://github.com/oracle/dtrace-utils/commit/62af7a88cd61fcb1685f03312d372b65dd7ccab6
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-11-11 (Mon, 11 Nov 2024)

  Changed paths:
    M dtrace.spec

  Log Message:
  -----------
  spec: add dtrace.pc to filelist

Commit 52a18d35 "build: add a pkg-config file for dtrace consumers: use it"
added a dtrace.pc file but failed to add it to the dtrace.spec as well.

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Nick Alcock <nick.alcock at oracle.com>


  Commit: 7f27e4e82386215cc46404d5f88dd1110f6afb89
      https://github.com/oracle/dtrace-utils/commit/7f27e4e82386215cc46404d5f88dd1110f6afb89
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-11-11 (Mon, 11 Nov 2024)

  Changed paths:
    M dtrace.spec

  Log Message:
  -----------
  spec: add dtprobed.8 to filelist

Commit 98e24727 "man: add manpage for dtprobed(8)" did not add the
manpage to the filelist in dtrace.spec as it should have.

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Nick Alcock <nick.alcock at oracle.com>


  Commit: 68d14f30b5ffaaea405354a2edf44279127d209a
      https://github.com/oracle/dtrace-utils/commit/68d14f30b5ffaaea405354a2edf44279127d209a
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-11-11 (Mon, 11 Nov 2024)

  Changed paths:
    M dtprobed/Build

  Log Message:
  -----------
  dtprobed: fix install of dtprobed.service

Commit 4d4ba4997 "build: make dtrace and dtprobed relocatable" added
makefile instructions to install dtprobed.service that could fail due
to permission problems.  Instead of using sed to write to the install
location, and then applying chown/chmod, use the install command.

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Nick Alcock <nick.alcock at oracle.com>


  Commit: b8b31f75add42b9b5001034dd96a874676a8720d
      https://github.com/oracle/dtrace-utils/commit/b8b31f75add42b9b5001034dd96a874676a8720d
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-11-15 (Fri, 15 Nov 2024)

  Changed paths:
    M dtprobed/dof_stash.c
    M dtprobed/dtprobed.c
    M libcommon/dof_parser.c
    M libcommon/dof_parser.h
    M test/triggers/Build
    A test/triggers/usdt-tst-multiprovider-prov.d
    A test/triggers/usdt-tst-multiprovider.c
    A test/unittest/usdt/tst.multiprovider.r
    A test/unittest/usdt/tst.multiprovider.r.p
    A test/unittest/usdt/tst.multiprovider.sh

  Log Message:
  -----------
  dtprobed: handle multiple providers in a single piece of DOF

A given ELF object can of course contain as many providers as you like.  The
DOF stash format, DOF stash management code and DTrace itself are all set up
fine to handle DOF with multiple providers in: but, alas, the code that
reads the DOF from the parser child in response to an ioctl() assumes that
one provider is all it will ever see.

This is not ideal, but rejigging it introduces an interesting problem: when
do you *stop* reading providers from the parser stream?  Right now,
dof_parser.c loops over all of its providers and emits them until all are
done, then just stops: there is no indication of how many providers there
are or that this is the last provider or anything (though if there are none,
it does try to send an empty provider to avoid the caller blocking waiting
for a reply that will never come).

It's a bit annoying to try to figure out how many providers there are in
advance, so instead of that, take a route that's easier both to emit and
parse, drop the empty provider stuff, and simply add a DIT_EOF record which
indicates "no more providers expected", which is always sent last.  (We
stuff this in before DIT_ARGS_* in the enum because it makes more conceptual
sense right after DIT_ERR, and DIT_ARGS_* hasn't released anywhere yet.)

With that in place it's a simple matter to loop adding parsed DOF to the
stash's accumulator until we hit an EOF record.  Memory management is
complicated a little, because a single parsed buffer (reply from dof_parser)
is now owned by multiple accumulator records in the stash: but every one of
those is terminated by a DIT_EOF, which appears nowhere else, so we can just
not free a parsed buffer unless it's of type DIT_EOF.

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 117b60dec8819497b9748fc0fc1e9e48779e49c7
      https://github.com/oracle/dtrace-utils/commit/117b60dec8819497b9748fc0fc1e9e48779e49c7
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-11-15 (Fri, 15 Nov 2024)

  Changed paths:
    M runtest.sh

  Log Message:
  -----------
  runtest: detect coredumps in more cases

Exitcode 139 == signal 11 == a coredump that should be reported as such,
even if we can't find a core file anywhere.

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: d7e79a3510c6e5235b9f5f09ab35a4cab52e680a
      https://github.com/oracle/dtrace-utils/commit/d7e79a3510c6e5235b9f5f09ab35a4cab52e680a
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-11-15 (Fri, 15 Nov 2024)

  Changed paths:
    M libdtrace/dt_probe.c
    A test/unittest/misc/err.bad-prov-2.d
    A test/unittest/misc/err.bad-prov-2.r
    A test/unittest/misc/err.bad-prov.d
    A test/unittest/misc/err.bad-prov.r

  Log Message:
  -----------
  probe: guard against providers without implementation

Providers defined in .d files are created without implementation by
the parser because they only exist for declaration purposes.  The
dt_probe_iter() function tries to call the provide() hook in providers
to give them a chance to create all their probes before dt_probe_iter()
tries to match against them.  That should obviously not be done for
providers without implementation.

Test included.

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 84d03ae1f5fe13a1b2851172fdd1143cb669435e
      https://github.com/oracle/dtrace-utils/commit/84d03ae1f5fe13a1b2851172fdd1143cb669435e
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-11-20 (Wed, 20 Nov 2024)

  Changed paths:
    R test/unittest/stack/tst.stack3_fbt.aarch64.r
    R test/unittest/stack/tst.stack3_fbt.d
    R test/unittest/stack/tst.stack3_fbt.x
    R test/unittest/stack/tst.stack3_fbt.x86_64.r
    R test/unittest/stack/tst.stack_fbt.aarch64.r
    R test/unittest/stack/tst.stack_fbt.d
    A test/unittest/stack/tst.stack_fbt.sh
    R test/unittest/stack/tst.stack_fbt.x
    R test/unittest/stack/tst.stack_fbt.x86_64.r

  Log Message:
  -----------
  test: stack_fbt

The test was being skipped on UEKR7 systems because __vfs_write
was no longer traceable.  The expected stack on UEKR6 x86_64 was
out of date.

Switch to fbt::vfs_write:entry.  Convert to a .sh test, so that
different stacks can be expected depending both on machine type
and release number.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 51e4cd22da9902c0ed047087ed39e640d341b97e
      https://github.com/oracle/dtrace-utils/commit/51e4cd22da9902c0ed047087ed39e640d341b97e
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-11-20 (Wed, 20 Nov 2024)

  Changed paths:
    M test/unittest/misc/err.bad-prov.r

  Log Message:
  -----------
  test: Number refers to nonexistent line

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 504b546c610de3f88bb4c6e4d5f75980834e30be
      https://github.com/oracle/dtrace-utils/commit/504b546c610de3f88bb4c6e4d5f75980834e30be
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-11-20 (Wed, 20 Nov 2024)

  Changed paths:
    M test/demo/spec/specopen.d

  Log Message:
  -----------
  test: Change open() to openat() in specopen

In commit 751f8f46dd29 "test: Clean up tst.specopen.d", there was
minor cleanup to make this example run.  Actually, it should have
converted to openat() calls, since open() is deprecated.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 8c31ab6784861ddc05a58d970f61cf8aa206e098
      https://github.com/oracle/dtrace-utils/commit/8c31ab6784861ddc05a58d970f61cf8aa206e098
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-11-20 (Wed, 20 Nov 2024)

  Changed paths:
    M libdtrace/dt_cg.c
    M test/unittest/profile-n/tst.umod.sh

  Log Message:
  -----------
  Preface usym/umod/uaddr with pid

Translation of user space addresses requires that we know which process
to use for the translation.  We have been prefacing the address to
translate like this:
        /* Preface the value with the user process tgid. */
        emit(dlp, BPF_CALL_HELPER(BPF_FUNC_get_current_pid_tgid));
        emit(dlp, BPF_ALU64_IMM(BPF_AND, BPF_REG_0, 0xffffffff));

One problem is that the IMM "and" operation is a no-op.  The 0xffffffff
is promoted to a 64-bit -1, leading to no %r0 bits changing.  Another
problem is that we are pulling out the tgid.  This means that the
translation will fail.  Further, even if the consumer knew which part
of the pid_tgid combination to use for address translation, keys for
aggregations could fail spuriously due to different tgids for the same
process.

Convert to
        /* Preface the value with the user process pid. */
        emit(dlp, BPF_CALL_HELPER(BPF_FUNC_get_current_pid_tgid));
        emit(dlp, BPF_ALU64_IMM(BPF_RSH, BPF_REG_0, 32));

Also, in the umod test (which uncovered this problem), add ld-*.so to
the list of shared objects we're going to skip.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: fc4e21f4dd3ebc876395f7ff0c9decc891f067c8
      https://github.com/oracle/dtrace-utils/commit/fc4e21f4dd3ebc876395f7ff0c9decc891f067c8
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-11-22 (Fri, 22 Nov 2024)

  Changed paths:
    M libdtrace/dt_open.c
    M libdtrace/dt_prov_cpc.c

  Log Message:
  -----------
  Fix memory leaks

The array of statements was never freed.
The PFM library data was never cleaned up.
The comment in dtrace_close() concerning provider cleanup is no longer
applicable because providers have a destroy() callback.

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>


  Commit: ab8e4ce5b0ead08d849d8c61107e6cd03ea68872
      https://github.com/oracle/dtrace-utils/commit/ab8e4ce5b0ead08d849d8c61107e6cd03ea68872
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-12-06 (Fri, 06 Dec 2024)

  Changed paths:
    M libdtrace/dt_bpf.c

  Log Message:
  -----------
  bpf: improve BPF feature check

The check for BPF attach types was trying to attach to bpf_check, but
attaching to that function is rejected by the BPF verifier on some
kernel versions.  Use bpf_get_btf_vmlinux because that function does
not take any arguments and therefore should always succeed.

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>


  Commit: e40a56931ecced4c4558e536fe490633c3ac9ad2
      https://github.com/oracle/dtrace-utils/commit/e40a56931ecced4c4558e536fe490633c3ac9ad2
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-12-06 (Fri, 06 Dec 2024)

  Changed paths:
    M libdtrace/dt_prov_fbt.c
    M libdtrace/dt_prov_rawtp.c
    M libdtrace/dt_prov_sdt.c
    M libdtrace/dt_provider_tp.c
    M libdtrace/dt_provider_tp.h

  Log Message:
  -----------
  tp: clean up the API

All functions that can operate on a tracepoint object had a convenience
function for probes that are purely tracepoint-based, except the setting
and getting of the (event of BTF) id.  We now have dt_tp_probe_* and
dt_tp_* variants for that.

Also renamed event_id/event_fd to be id/fd.

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>


  Commit: 2a09b3bea504e49893d9a7027267ac6b93c81848
      https://github.com/oracle/dtrace-utils/commit/2a09b3bea504e49893d9a7027267ac6b93c81848
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-12-06 (Fri, 06 Dec 2024)

  Changed paths:
    M libdtrace/dt_prov_fbt.c
    M libdtrace/dt_provider.c
    M libdtrace/dt_provider.h

  Log Message:
  -----------
  fbt: clean up fprobe/kprobe support

Instead of leaking dt_fbt_fprobe outside of the FBT provider so that
there is *something* to represent the FBT provider, use a minimal
dt_fbt that does the job of providing a hook to the populate function,
which then will update dt_fbt from dt_fbt_fprobe or dt_fbt_kprobe
depending on what implementation is available (fprobe is preferred).

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>


  Commit: b5106b1a76e550ee83a7b2b2c7bf89bb7f24c9bc
      https://github.com/oracle/dtrace-utils/commit/b5106b1a76e550ee83a7b2b2c7bf89bb7f24c9bc
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-12-06 (Fri, 06 Dec 2024)

  Changed paths:
    M libdtrace/Build
    A libdtrace/dt_prov_rawfbt.c
    M libdtrace/dt_provider.c
    M libdtrace/dt_provider.h
    A test/unittest/providers/rawfbt/err.D_ARGS_IDX.entry.d
    A test/unittest/providers/rawfbt/err.D_ARGS_IDX.entry.r
    A test/unittest/providers/rawfbt/err.D_ARGS_IDX.return.d
    A test/unittest/providers/rawfbt/err.D_ARGS_IDX.return.r
    A test/unittest/providers/rawfbt/err.D_PDESC_ZERO.d
    A test/unittest/providers/rawfbt/err.D_PDESC_ZERO.r
    A test/unittest/providers/rawfbt/tst.entry.d
    A test/unittest/providers/rawfbt/tst.return.d
    A test/unittest/providers/rawfbt/tst.return0.d
    A test/unittest/providers/rawfbt/tst.return0.r
    A test/unittest/providers/rawfbt/tst.return1.d
    A test/unittest/providers/rawfbt/tst.return1.r
    A test/unittest/providers/rawfbt/tst.synthetic-entry.d
    A test/unittest/providers/rawfbt/tst.synthetic-entry.r
    A test/unittest/providers/rawfbt/tst.synthetic-entry.x
    A test/unittest/providers/rawfbt/tst.synthetic-return.d
    A test/unittest/providers/rawfbt/tst.synthetic-return.r
    A test/unittest/providers/rawfbt/tst.synthetic-return.x
    M test/utils/clean_probes.sh

  Log Message:
  -----------
  rawfbt: new provider

This provider provides access to all kprobe-based probes that are
available on the system.  This includes any compiler-generated
optimized variants of functions, named <func>.<suffix>.

This provider is mostly a revival of the old kprobe-based FBT provider.

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>


  Commit: 3bb4dd97ef72eb5d698c77ef30856c2e40a5c9e6
      https://github.com/oracle/dtrace-utils/commit/3bb4dd97ef72eb5d698c77ef30856c2e40a5c9e6
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-12-06 (Fri, 06 Dec 2024)

  Changed paths:
    M test/unittest/fbtprovider/err.D_ARGS_IDX.void-void.x
    M test/unittest/fbtprovider/err.D_ARGS_IDX.void.x
    M test/unittest/options/tst.modpath.x

  Log Message:
  -----------
  tests: $dt_flags should not be used in .x files

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Nick Alcock <nick.alcock at oracle.com>


  Commit: f5cebaa757eb3ebfbff2031ed30937d12169ac3d
      https://github.com/oracle/dtrace-utils/commit/f5cebaa757eb3ebfbff2031ed30937d12169ac3d
  Author: Alan Maguire <alan.maguire at oracle.com>
  Date:   2024-12-06 (Fri, 06 Dec 2024)

  Changed paths:
    M libdtrace/dt_prov_sched.c

  Log Message:
  -----------
  sched: fix on-cpu firing for kernels < 5.16

The solution for sched:::on-cpu firing (probing
__perf_event_task_sched_in) only works on 5.16 and later as the relevant
function is not in available_filter_functions in earlier kernels.

Instead use fbt::finish_task_switch:return and
rawfbt:vmlinux:finish_task_switch.*:return (to cover optimizations that
result in a .-suffixed variant).

Signed-off-by: Alan Maguire <alan.maguire at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 999e4b1efc0854ce987375bc4b163c070a4b4c6e
      https://github.com/oracle/dtrace-utils/commit/999e4b1efc0854ce987375bc4b163c070a4b4c6e
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-12-06 (Fri, 06 Dec 2024)

  Changed paths:
    M libdtrace/dt_proc.c

  Log Message:
  -----------
  Revert "Tweak self-armouring"

This reverts commit 39cf54d2e98ac877d4b5e5ba6313f717173ca380.

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 5ee58d50bf3896acd995264a857f34e152bfae5c
      https://github.com/oracle/dtrace-utils/commit/5ee58d50bf3896acd995264a857f34e152bfae5c
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-12-06 (Fri, 06 Dec 2024)

  Changed paths:
    M libdtrace/dt_proc.c

  Log Message:
  -----------
  proc: more self-grab improvements

The self-grab armouring code is clearly too hard to read: the change just
reverted broke it entirely and caused DTrace to never take out self-grabs on
anything (because it misinterpreted processes that were not being debugged
as processes that *were* being debugged: Ptracer_pid() returns zero if
no tracer is active).

Refactor it into something more readable via giving some of the conditions
names.  Doing this forces us to think things through properly.  Some things
can never work reliably and should always be blocked:

 - grabbing the thread doing the tracing
 - grabbing any other of this DTrace instance's threads, given the
   complexity of the proxy-call back-and-forth
 - grabbing a thread being debugged by someone else (a process cannot have
   two tracers at once)
 - grabbing PID 1 (init)

Some things are just a bit risky and are reasonable to do if the user
explicitly asks for it via dtrace -p, but not if it's implicitly requested
by some thread doing a ustack() or something:

 - grabbing a system daemon

Grabbing a thread we have already grabbed is probably impossible from this
location (process-control thread initialization), but if it does happen it's
fine: you can PTRACE_SEIZE the same thread from the same debugger more than
once, that's routine and normal operation for a debugger.

So split things up accordingly, and implement the "any other of DTrace's
threads" case, which was not implemented before: "we grabbed ourself"
i.e. the PID is ourself or the tgid of ourself and the tgid of the PID we're
grabbing are the same; and "someone else is debugging us", i.e.  there is a
tracer in force already and it's not the current thread.

This makes the code *ever* so much easier to read, and makes it possible to
give decent error messages when things go wrong as well.

(The lack of handling of the "any other of our threads" case explains the
tst.multitrace.sh failure: when a shortlived grab from a ustack() etc hits,
the initial grab and release request is issued by the main DTrace thread.
If a shortlived grab hits for the main thread itself, only this case will
prevent the tracer thread from stopping it and then trying to return to the
stopped thread, deadlocking forever.)

This has survived a thousand iterations of test/unittest/proc/tst.self-grab.sh
and test/unittest/usdt/tst.multitrace.sh with no failures (after the other
patches in this series are applied).

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: d9021b036cb16182d95c03d7c87b16502b0961f0
      https://github.com/oracle/dtrace-utils/commit/d9021b036cb16182d95c03d7c87b16502b0961f0
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-12-06 (Fri, 06 Dec 2024)

  Changed paths:
    M libdtrace/dt_proc.c
    M libproc/Pcontrol.c
    M libproc/rtld_db.c
    M test/unittest/usdt/tst.multitrace.sh

  Log Message:
  -----------
  libproc: debugging improvements

Attempting to track down the intermittent failures in
test/unittest/proc/tst.multitrace.sh is rendered difficult by the fact that
multiple dtraces are running at once, tracing multiple processes, but the
debugging messages emitted by libproc do not provide either the TID of the
tracing thread or the PID of the process being traced in too many cases.

Worse yet, if you do turn debugging on, both dtraces emit debugging output
simultaneously to the same stderr stream.  The interleaving is bad enough,
but very often this causes lines to be emitted to stderr that do not start
with the standard libproc DEBUG time-since-epoch: string, because it got
interspersed into the previous line. runtest then partitions that partial
line off into a separate part of the log, rendering everything entirely
incomprehensible.

So emit more PID-related info, including the TID of the process-control
thread; and arrange for tst.multitrace.sh to capture DTrace debugging output
itself and dump it as two separated pieces: if a dtrace exits nonzero, note
which one exited as well as dumping its debug output.

Also, when this-should-never-happen conditions like a Pwait() returning
-ECHILD happen (usually indicating that we were not the victim's tracer
after all) by dumping the entire /proc/$pid/status of that process to
the debug stream, so we can tell what the tracer *was* and whether the
process was even stopped.  (No impact at all if this condition never
happens, which it never should, of course, or if debugging is off.)

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 2dce91740d26175b70bb4a43f874e4286108303d
      https://github.com/oracle/dtrace-utils/commit/2dce91740d26175b70bb4a43f874e4286108303d
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-12-06 (Fri, 06 Dec 2024)

  Changed paths:
    M libproc/Pcontrol.c

  Log Message:
  -----------
  libproc: guard against Puntrace() of terminated processes

If processes terminate while the main dtrace thread is doing something in
libproc, the process-control thread will clean up, releasing all resources,
including cancelling all ptraces.  Unfortunately if the main thread is in
the middle of a Ptrace()-related operation at the time, it will finish off
by doing a balancing Puntrace().  This is of course now unbalanced, because
the process cleanup did all the Puntrace()s for us; it will then try to pop
a state vector that has already been freed, yielding a crash that looks like
this:

 #0  0x00007f55dbe8035f in dt_list_delete (dlp=0x7f55d0001428, existing=0x0) at libcommon/dt_list.c:81
 #1  0x00007f55dbe8239b in Ppop_state (P=0x7f55d0001410) at libproc/Pcontrol.c:1280
 #2  0x00007f55dbe827fb in Puntrace (P=0x7f55d0001410, leave_stopped=0) at libproc/Pcontrol.c:1456
 #3  0x00007f55dbe8bffd in rd_ldso_consistent_end (rd=0x7f55d00046e0) at libproc/rtld_db.c:1113
 #4  0x00007f55dbe8d5d8 in rd_loadobj_iter (rd=0x7f55d00046e0, fun=0x7f55dbe863cb <map_iter>, state=0x7f55d0001410)
     at libproc/rtld_db.c:1934
 #5  0x00007f55dbe876d3 in Pupdate_lmids (P=0x7f55d0001410) at libproc/Psymtab.c:813
 #6  0x00007f55dbe87827 in Paddr_to_map (P=0x7f55d0001410, addr=4199075) at libproc/Psymtab.c:883
 #7  0x00007f55dbe5354c in dt_pid_create_usdt_probes_proc (dtp=0x1a47ebb0, dpr=0x29234ea0, pdp=0x7fff392bb090, pcb=0x7fff392bb170)
     at libdtrace/dt_pid.c:987
 #8  0x00007f55dbe54056 in dt_pid_create_usdt_probes (pdp=0x2ac157c0, dtp=0x1a47ebb0, pcb=0x7fff392bb170)
     at libdtrace/dt_pid.c:1265
 #9  0x00007f55dbe71ce2 in discover (dtp=0x1a47ebb0) at libdtrace/dt_prov_uprobe.c:520
 #10 0x00007f55dbe747a2 in dt_provider_discover (dtp=0x1a47ebb0) at libdtrace/dt_provider.c:183
 #11 0x00007f55dbe7c1b1 in dtrace_work (dtp=0x1a47ebb0, fp=0x7f55dbcfc780 <_IO_2_1_stdout_>, pfunc=0x404211 <chew>,
     rfunc=0x40419e <chewrec>, arg=0x0) at libdtrace/dt_work.c:377
 #12 0x00000000004066d5 in main (argc=11, argv=0x7fff392bb7b8) at cmd/dtrace.c:1556

(This can also kick in when DTrace erroneously considers a process dead even
though it isn't, which is actually what happened here: we fix that in a
later commit.)

Fixed by simply checking to see if the process has been Prelease()d in
Puntrace(), and returning early.  The process is released and all
Puntrace()s have already been done: there is nothing left to do.

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 380c18717ed57c18b41e674b6928d716aa4bce5d
      https://github.com/oracle/dtrace-utils/commit/380c18717ed57c18b41e674b6928d716aa4bce5d
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2024-12-06 (Fri, 06 Dec 2024)

  Changed paths:
    M libproc/Pcontrol.c

  Log Message:
  -----------
  libproc: drop Pgrab() special cases in Ptrace()

Way back in 2013, in commit f5f05eb28058f2a62efeefef7c5faeca62b09578, we
added a special case to Ptrace() causing it to not fail with an error
if ptrace() failed and Ptrace() was being called by Pgrab().

The need for this is long past: noninvasive tracing provides the semantics
this change was meant to provide, far less unpleasantly.  Worse yet, the
patch is not threadsafe (even though we can have arbitrarily many threads
monitoring arbitrarily many processes), and worse yet, the noninvasive
tracing support in Pgrab() wants to *detect* failure to ptrace() so we
can switch to tracing noninvasively instead.  If the failure is hidden,
we assume ptrace() has worked, and our first attempt to use this and
waitpid() on the traced child fails with an -ECHILD and causes us to
assume the process dead.  Since it's not dead, bad things happen:

libproc DEBUG 1733155118: 386060: Ppush_state(): ptrace_count 1, state 1
libproc DEBUG 1733155118: 386060: Ppop_state(): ptrace_count 2, state 1
libproc DEBUG 1733155118: Pgrab: grabbed PID 386060.
[...]
libproc DEBUG 1733155118: 386060: Activated rtld_db agent.
libproc DEBUG 1733155118: 386060: link map iteration failed: process is dead.
libdtrace DEBUG 1733155118: Called dt_attach() with attach_time 0
libdtrace DEBUG 1733155118: pid 386060: dropping breakpoint on AT_ENTRY
libproc DEBUG 1733155118: 386060: Ppush_state(): ptrace_count 1, state 4
libproc DEBUG 1733155118: 386060: Ppop_state(): ptrace_count 2, state 4
libproc DEBUG 1733155118: 386060: Cannot add breakpoint on ffffffffffffffff: Operation not permitted
libdtrace DEBUG 1733155118: Cannot drop breakpoint in child process: acting as if evaltime=exec were in force.

(Note that we weren't even logging the fact that Pgrab() had failed, up ther
before the [...], and the first visible failure happened some time later,
with entirely inaccurate messages about processes being dead and the like.)

The solution is simple: take out the whole horrible Pgrab() special case,
and treat invocations of Ptrace() from Pgrab() just like any other
invocation from anywhere else.  Pgrab() already deals with failure-to-grab
errors perfectly well, if we only let it see the errors at all.

With this in place, test/unittest/usdt/tst.multitrace.sh survives 200+
invocations with zero failures.

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: 5bff8de4c710efbabb13840a3732d98f2785c7d5
      https://github.com/oracle/dtrace-utils/commit/5bff8de4c710efbabb13840a3732d98f2785c7d5
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-12-07 (Sat, 07 Dec 2024)

  Changed paths:
    R test/unittest/builtinvar/tst.errno2.aarch64.x
    M test/unittest/builtinvar/tst.errno2.d

  Log Message:
  -----------
  test: Clean up tst.errno2.d

Check only on the process of interest -- that is, /progenyof(parent)/.

Check that self->fn has been set before applying copyinstr() to it.

Add option zdefs in case open() is deprecated, so that the test will
run on aarch64.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>


  Commit: d68b4e26e7d5d4741dc5b35b19509b16c3011087
      https://github.com/oracle/dtrace-utils/commit/d68b4e26e7d5d4741dc5b35b19509b16c3011087
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-12-13 (Fri, 13 Dec 2024)

  Changed paths:
    M NEWS
    M dtrace.spec

  Log Message:
  -----------
  Update NEWS and dtrace.spec for release 2.0.2

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>


Compare: https://github.com/oracle/dtrace-utils/compare/cc48b157766a...d68b4e26e7d5

To unsubscribe from these emails, change your notification settings at https://github.com/oracle/dtrace-utils/settings/notifications



More information about the DTrace-devel mailing list