[DTrace-devel] [oracle/dtrace-utils] 91258e: test: Move disassembly and extracting PCs earlier

Sam James noreply at github.com
Wed Feb 26 21:54:22 UTC 2025


  Branch: refs/heads/devel
  Home:   https://github.com/oracle/dtrace-utils
  Commit: 91258e673b0b6bb2da23b7cb0f3af1e742e4a411
      https://github.com/oracle/dtrace-utils/commit/91258e673b0b6bb2da23b7cb0f3af1e742e4a411
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2025-02-25 (Tue, 25 Feb 2025)

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

  Log Message:
  -----------
  test: Move disassembly and extracting PCs earlier

This will allow a future patch to use the PCs earlier in the test.

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


  Commit: 35a4f05c2abe05edaf964ad29c4fccbb482f5395
      https://github.com/oracle/dtrace-utils/commit/35a4f05c2abe05edaf964ad29c4fccbb482f5395
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2025-02-25 (Tue, 25 Feb 2025)

  Changed paths:
    M include/dtrace/pid.h
    M libdtrace/dt_pid.c
    M libdtrace/dt_prov_uprobe.c
    A test/unittest/pid/tst.dash.r
    A test/unittest/pid/tst.dash.sh
    M test/unittest/usdt/tst.pidprobes.sh

  Log Message:
  -----------
  Add support for pid function "-" with absolute offset

The pid providers allow users to specify a probe function "-",
meaning that the probe name gives an absolute offset.

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


  Commit: daa7c8431c3516beb50b3802ea4fd4f72b1acdcd
      https://github.com/oracle/dtrace-utils/commit/daa7c8431c3516beb50b3802ea4fd4f72b1acdcd
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2025-02-25 (Tue, 25 Feb 2025)

  Changed paths:
    M libdtrace/dt_pid.c

  Log Message:
  -----------
  Move proc lock to where we actually find a USDT process

The function dt_pid_create_usdt_probes_proc() creates USDT probes
for a specific process.  It is called in one of two ways:

    dt_proc_scan(dtp, dpr) ->
    dt_pid_create_probes_module(dtp, dpr)

        The process has been locked and we are updating its
        USDT probes.

    dt_pid_create_usdt_probes(pdp, dtp, pcb)

        Here, we look for any pids that might have USDT probes,
        calling the pid-specific function for each candidate.

One problem is that the first code path assumes the process is locked.
This means the second code path has to lock processes even before we
know if it has any USDT probes we care about.

Change dt_pid_create_usdt_probes_proc() so the caller can specify the
process in either one of two ways:

    by pid (implying the process has not been locked)

    by dpr (implying the process has been locked)

In the first case, the function will lock the process, but only if
USDT probes have been found.

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


  Commit: 097907a3f94d7c04540c70463d76227d4988cbe5
      https://github.com/oracle/dtrace-utils/commit/097907a3f94d7c04540c70463d76227d4988cbe5
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2025-02-25 (Tue, 25 Feb 2025)

  Changed paths:
    A test/unittest/vars/tst.ucaller.d
    M test/unittest/vars/tst.ucaller.r
    R test/unittest/vars/tst.ucaller.sh
    R test/unittest/vars/tst.ucaller.x

  Log Message:
  -----------
  test: Have tst.ucaller use a predictable trigger

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


  Commit: ee1e1a3437a2979335bf7a146d5330becfe2349b
      https://github.com/oracle/dtrace-utils/commit/ee1e1a3437a2979335bf7a146d5330becfe2349b
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2025-02-25 (Tue, 25 Feb 2025)

  Changed paths:
    M libdtrace/dt_prov_uprobe.c

  Log Message:
  -----------
  Convert some indenting 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: 6a9cface7fabf0d9ef9f7a4fbe4ea8ef3fd435c5
      https://github.com/oracle/dtrace-utils/commit/6a9cface7fabf0d9ef9f7a4fbe4ea8ef3fd435c5
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2025-02-26 (Wed, 26 Feb 2025)

  Changed paths:
    M libdtrace/dt_prov_proc.c
    M test/unittest/lquantize/tst.32bit-bug26268136.sh

  Log Message:
  -----------
  Fix trampoline use of BPF stack for scratch

The trampoline starts by setting %r9 = %fp + -DCTX_SIZE -- that is,
%r9 = %fp - 88.  Then, it fills the BPF stack from %fp-88 to %fp with
the various dctx-> pointers.  Calls to clauses will reset %fp.

The proc provider's trampoline was using the BPF stack for scratch
space for the exit and signal-handle probes.  Specifically, it used
%fp + DT_STK_SPILL(0), which overwrites a dctx-> pointer.

Switch to DT_TRAMP_SP_SLOT(0), which is intended for this purpose.

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


  Commit: 72a79b7843889fcf7b57cb5d4f27d8164b9e8b80
      https://github.com/oracle/dtrace-utils/commit/72a79b7843889fcf7b57cb5d4f27d8164b9e8b80
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2025-02-26 (Wed, 26 Feb 2025)

  Changed paths:
    M test/unittest/ustack/tst.uaddr-pid0.r
    A test/unittest/ustack/tst.uaddr-pid0.r.p
    M test/unittest/ustack/tst.uaddr.r
    A test/unittest/ustack/tst.uaddr.r.p
    M test/unittest/ustack/tst.ufunc-pid0.r
    A test/unittest/ustack/tst.ufunc-pid0.r.p
    M test/unittest/ustack/tst.usym-pid0.r
    A test/unittest/ustack/tst.usym-pid0.r.p

  Log Message:
  -----------
  test: Improve resilience of tests to ptr widths

When tests are run, runtest.sh runs postprocess(), which among
other things turns irreproducible hex strings (presumably offsets
and pointers) into fixed strings (like "ptr") for correctness
checking.  In a few cases, however, there are trailing blanks
to justify the right margin, meaning that the width of the hex
string can cause the number of trailing blanks to vary.

Improve the resilience of these tests by stripping out such
trailing blanks.

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


  Commit: 5c0c8ed1360a5a78a06e52666d29fa14e47eba7f
      https://github.com/oracle/dtrace-utils/commit/5c0c8ed1360a5a78a06e52666d29fa14e47eba7f
  Author: Sam James <sam at gentoo.org>
  Date:   2025-02-26 (Wed, 26 Feb 2025)

  Changed paths:
    M test/unittest/io/check_io_probe_args.sh
    M test/unittest/io/dump_io_probe_args.d

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

Noticed when grepping for something else.

Signed-off-by: Sam James <sam at gentoo.org>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>


  Commit: d33337525534ffaa95ae6c1c049fe3744d9bdff7
      https://github.com/oracle/dtrace-utils/commit/d33337525534ffaa95ae6c1c049fe3744d9bdff7
  Author: Sam James <sam at gentoo.org>
  Date:   2025-02-26 (Wed, 26 Feb 2025)

  Changed paths:
    M test/unittest/bitfields/tst.bitfield-offset.x

  Log Message:
  -----------
  test: fix bashism in tst.bitfield-offset.x

trap ERR is a bashism and won't work with e.g. dash, just change
the shebang to #!/bin/bash in this case as ERR is a bit messy to handle
(it'd be trivial here but there's no real reason to not use bash).

Signed-off-by: Sam James <sam at gentoo.org>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>


  Commit: 39a5e0a8866b38679619fa357bb3082bc245aada
      https://github.com/oracle/dtrace-utils/commit/39a5e0a8866b38679619fa357bb3082bc245aada
  Author: Sam James <sam at gentoo.org>
  Date:   2025-02-26 (Wed, 26 Feb 2025)

  Changed paths:
    M test/unittest/builtinvar/tst.id_ERROR.sh
    M test/unittest/error/tst.clause_scope-regular.r.p
    M test/unittest/variables/bvar/tst.arg3-ERROR-b.sh
    M test/unittest/variables/bvar/tst.arg3-ERROR.sh

  Log Message:
  -----------
  test: finalize porting small awk stragglers to gawk

We missed some in 8a1264bf0e818c8624be250eb5174714b62ed93c because some
other test changes landed before it landed.

Signed-off-by: Sam James <sam at gentoo.org>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>


Compare: https://github.com/oracle/dtrace-utils/compare/a6b626a89236...39a5e0a8866b

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