[DTrace-devel] [oracle/dtrace-utils] 823323: proc: use a rawtp for the proc:::exit probe

Kris Van Hees noreply at github.com
Sat Jan 20 06:02:26 UTC 2024


  Branch: refs/heads/devel
  Home:   https://github.com/oracle/dtrace-utils
  Commit: 8233237138028c0d58ca2e37b57ed49869fbf0dd
      https://github.com/oracle/dtrace-utils/commit/8233237138028c0d58ca2e37b57ed49869fbf0dd
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-01-11 (Thu, 11 Jan 2024)

  Changed paths:
    M libdtrace/dt_prov_proc.c
    M test/unittest/proc/tst.exitkilled.sh
    M test/unittest/proc/tst.signal.sh

  Log Message:
  -----------
  proc: use a rawtp for the proc:::exit probe

Also fix up tst.exitkilled.sh to not depend on pr_psargs (for which we
do not have an translator implementation yet).

Also fix up tst.signal.sh to not depend on pr_psargs and account for the
fact that when a process does not handle SIGUSR1, the kernel will deliver
it as a SIGKILL.

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


  Commit: 52eea158c4ca45b9d239bfaa0133b606d83bd757
      https://github.com/oracle/dtrace-utils/commit/52eea158c4ca45b9d239bfaa0133b606d83bd757
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-01-11 (Thu, 11 Jan 2024)

  Changed paths:
    M libdtrace/dt_cg.c
    M test/unittest/io/tst.fds.aarch64.r
    M test/unittest/io/tst.fds.d
    M test/unittest/io/tst.fds.sparc64.r
    M test/unittest/io/tst.fds.x86_64.r

  Log Message:
  -----------
  cg: Dummy implementation for d_path()

Hardwire d_path() to always return "<unknown>" pending an implementation
that really works.  This stub allows io and procfs translators to work.
Tests that will have their expected output adjusted for this stub will
FAIL when a real implementation is introduced, and should be adjusted at
that time.

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


  Commit: 7cb553cc8b68e95963338e7eff28fd96d7308e3a
      https://github.com/oracle/dtrace-utils/commit/7cb553cc8b68e95963338e7eff28fd96d7308e3a
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-01-11 (Thu, 11 Jan 2024)

  Changed paths:
    M libdtrace/dt_cg.c

  Log Message:
  -----------
  cg: reserve %r7 and %r8 in trampolines

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


  Commit: 0826927b677a05f721e469a04f989bc445f9dcd8
      https://github.com/oracle/dtrace-utils/commit/0826927b677a05f721e469a04f989bc445f9dcd8
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-01-11 (Thu, 11 Jan 2024)

  Changed paths:
    M libdtrace/dt_options.c
    M test/unittest/options/tst.iregs.r

  Log Message:
  -----------
  options: report EDT_NOREG for iregs < DIF_DIR_NREGS

The trampoline generation code hardcodes the use of %r7 and %r8, which
means that iregs cannot be less than 8 (DIF_DIR_NREGS).

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


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

  Changed paths:
    M libdtrace/dt_cc.c

  Log Message:
  -----------
  cc: use dt_node_root() in trampline compilation for clarity

Node trees roots are typically (in the parser) registered with the PCB
for compilation.  While the trampoline generation does not strictly
need it, it is the proper way to do this.

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


  Commit: 5aa6ced54092ebc727af4466e6c703b9956019de
      https://github.com/oracle/dtrace-utils/commit/5aa6ced54092ebc727af4466e6c703b9956019de
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-01-11 (Thu, 11 Jan 2024)

  Changed paths:
    M libdtrace/dt_cg.c
    M libdtrace/dt_parser.c
    A test/unittest/assocs/tst.store_zero_deletes_struct.d
    A test/unittest/assocs/tst.store_zero_deletes_struct.r
    A test/unittest/assocs/tst.store_zero_deletes_union.d
    A test/unittest/assocs/tst.store_zero_deletes_union.r
    A test/unittest/variables/tvar/tst.store_zero_deletes_struct.d
    A test/unittest/variables/tvar/tst.store_zero_deletes_struct.r
    A test/unittest/variables/tvar/tst.store_zero_deletes_union.d
    A test/unittest/variables/tvar/tst.store_zero_deletes_union.r

  Log Message:
  -----------
  Assigning 0 to any dynamic variable should delete it

Assigning 0 to a scalar dynamic variable deletes it from storage, but
due to type compatibility rules, this could not be used to delete dynamic
variables of struct or union type.

This does not actually change the D language as far as it is documented
(even though the implementation failed to do what was documented):

"[...], assigning an associative array element to zero causes DTrace to
 deallocate the underlying storage."
"Also, as with associative array elements, assigning zero to a
 thread-local variable causes DTrace to deallocate the underlying
 storage."

Add a special case for assigning a literal 0 constant value to any
dynamic variable to signify deleting the variable from storage.

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


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

  Changed paths:
    M libdtrace/dt_work.c
    A test/unittest/drops/drp.DTRACEDROP_DYNAMIC.local_only.d
    A test/unittest/drops/drp.DTRACEDROP_DYNAMIC.local_only.r

  Log Message:
  -----------
  Fix drop counter handling for local-only updates

When at the end of a work loop, the drop counters are updated for local
updates only (i.e. when tracing is not stopped yet), an invalid drop
count could be reported if a drop occured in the BEGIN probe.  The cause
is that the code assumed that both copies of the status data contained
valid data.  But when a drop occurs in the BEGIN probe, only the first
copy will have non-zero values.  Since local-only updates assume that
the two copies are identical except for a possible change due to the
local update, and any earlier status update would already have reported
any differences, it is safe to just copy all data prior to performing
the local updates.

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


  Commit: 7edcdf898031d1eabd212eeb8d5bf0b8bb13a248
      https://github.com/oracle/dtrace-utils/commit/7edcdf898031d1eabd212eeb8d5bf0b8bb13a248
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-01-11 (Thu, 11 Jan 2024)

  Changed paths:
    M libdtrace/dt_cg.c

  Log Message:
  -----------
  cg: integrate dvar lookup into dt_cg_prep_dvar()

The loading and storing of dynamic variables was implemented using a
function dt_cg_prep_dvar_args() to prepare the arguments for a function
call, followed by performing the actual function call in the respective
callers.  Those calls are identical, so it makes sense to consolidate
argument setup and call into a single function.

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


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

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

  Log Message:
  -----------
  cg: allow access to variables from trampolines

Upcoming work on providers that need to keep some state depends on the
ability to create, store to, and load from variables.  This patch adds
support for that.

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


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

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

  Log Message:
  -----------
  cg: make bpf_ldst_size() available outside dt_cg.c

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


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

  Changed paths:
    M libdtrace/dt_cg.c

  Log Message:
  -----------
  cg: wrap dctx and dctx->member accesses in a function

Introduce dt_cg_access_dctx() to implement access to the DTrace context
and members therein for both regular programs and trampolines.

Replace
	BPF_LOAD(BPF_DW, <reg>, BPF_REG_FP, DT_STK_DCTX)
	BPF_LOAD(<size>, <reg>, <reg>, <member>)
with
	dt_cg_access_dctx(<reg>, dlp, drp, <member>)

Replace
	BPF_LOAD(BPF_DW, <reg>, BPF_REG_FP, DT_STK_DCTX)
	(not followed by access to a member of dctx)
with
	dt_cg_access_dctx(<reg>, dlp, drp, -1)

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


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

  Changed paths:
    M libdtrace/dt_cg.c

  Log Message:
  -----------
  cg: fix tiny spacing issue

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


  Commit: 33f03b4e87a56bb3fa9b14996726759ec2ab3e7f
      https://github.com/oracle/dtrace-utils/commit/33f03b4e87a56bb3fa9b14996726759ec2ab3e7f
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-01-18 (Thu, 18 Jan 2024)

  Changed paths:
    M libdtrace/dt_open.c
    M libdtrace/dt_prov_cpc.c
    M libdtrace/dt_prov_dtrace.c
    M libdtrace/dt_prov_fbt.c
    M libdtrace/dt_prov_proc.c
    M libdtrace/dt_prov_profile.c
    M libdtrace/dt_prov_rawtp.c
    M libdtrace/dt_prov_sdt.c
    M libdtrace/dt_prov_syscall.c
    M libdtrace/dt_prov_uprobe.c
    M libdtrace/dt_provider.c
    M libdtrace/dt_provider_sdt.c

  Log Message:
  -----------
  Abort if provider population fails for any provider

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


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

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

  Log Message:
  -----------
  cg: allow declaring variables from trampolines

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


  Commit: ef0d1202fd7fb838677d8ed1db429a4e6830c364
      https://github.com/oracle/dtrace-utils/commit/ef0d1202fd7fb838677d8ed1db429a4e6830c364
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-01-20 (Sat, 20 Jan 2024)

  Changed paths:
    M libdtrace/Build
    M libdtrace/dt_open.c
    A libdtrace/dt_prov_io.c
    M libdtrace/dt_provider.h
    M test/demo/io/applicat.d
    M test/demo/io/iocpu.d
    M test/demo/io/iothrough.d
    M test/demo/io/whoio.d
    M test/triggers/doio.sh
    A test/unittest/io/check_io_probe_args.sh
    A test/unittest/io/dump_io_probe_args.d
    M test/unittest/io/tst.local.sh
    A test/unittest/io/tst.local2.sh
    A test/unittest/io/tst.lv-done.r
    A test/unittest/io/tst.lv-done.r.p
    A test/unittest/io/tst.lv-done.sh
    A test/unittest/io/tst.lv-start.r
    A test/unittest/io/tst.lv-start.r.p
    A test/unittest/io/tst.lv-start.sh
    A test/unittest/io/tst.lv-wait-done.r
    A test/unittest/io/tst.lv-wait-done.r.p
    A test/unittest/io/tst.lv-wait-done.sh
    A test/unittest/io/tst.lv-wait-start.r
    A test/unittest/io/tst.lv-wait-start.r.p
    A test/unittest/io/tst.lv-wait-start.sh
    M test/unittest/io/tst.nfs.sh
    A test/unittest/io/tst.nfs2.sh
    M test/unittest/io/tst.wait.sh

  Log Message:
  -----------
  Implement the io provider

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>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>


  Commit: 2355f1afddc1a6260313e944f953bb199ad70060
      https://github.com/oracle/dtrace-utils/commit/2355f1afddc1a6260313e944f953bb199ad70060
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2024-01-20 (Sat, 20 Jan 2024)

  Changed paths:
    M libdtrace/dt_dis.c
    A test/unittest/disasm/tst.ann-tramp-lvar.r
    A test/unittest/disasm/tst.ann-tramp-lvar.sh
    A test/unittest/disasm/tst.ann-tramp-tvar.r
    A test/unittest/disasm/tst.ann-tramp-tvar.sh

  Log Message:
  -----------
  dis: add support for variables used in trampoline code

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


Compare: https://github.com/oracle/dtrace-utils/compare/c99bce85efba...2355f1afddc1



More information about the DTrace-devel mailing list