[DTrace-devel] [oracle/dtrace-utils] c39672: Update procfs.d.in for T->state to T->__state change

Kris Van Hees noreply at github.com
Fri Oct 15 13:12:05 PDT 2021


  Branch: refs/heads/2.0-branch-dev
  Home:   https://github.com/oracle/dtrace-utils
  Commit: c39672f87c439e0fb95e4dbead0ad40555c90808
      https://github.com/oracle/dtrace-utils/commit/c39672f87c439e0fb95e4dbead0ad40555c90808
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-09-24 (Fri, 24 Sep 2021)

  Changed paths:
    M libdtrace/procfs.d.in

  Log Message:
  -----------
  Update procfs.d.in for T->state to T->__state change

Starting with v5.14 kernels, the 'state' member in the task_struct has
been renamed as '__state'.

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


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

  Changed paths:
    M include/bpf_asm.h

  Log Message:
  -----------
  Add 'endianness conversion' BPF instruction macro

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


  Commit: 91ee4101d475035f0452c7c0b2ede6272cb52b94
      https://github.com/oracle/dtrace-utils/commit/91ee4101d475035f0452c7c0b2ede6272cb52b94
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2021-09-24 (Fri, 24 Sep 2021)

  Changed paths:
    M libdtrace/dt_cg.c
    M test/unittest/dif/htonl.d
    M test/unittest/dif/htonll.d
    M test/unittest/dif/htons.d
    A test/unittest/funcs/tst.hton2.aarch64.r
    A test/unittest/funcs/tst.hton2.d
    A test/unittest/funcs/tst.hton2.x86_64.r

  Log Message:
  -----------
  Add support for hton and ntoh subroutines

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


  Commit: 5a570398cce9d7116fddb019ca87f9f421c18009
      https://github.com/oracle/dtrace-utils/commit/5a570398cce9d7116fddb019ca87f9f421c18009
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2021-09-24 (Fri, 24 Sep 2021)

  Changed paths:
    R test/unittest/scripting/tst.sid.r
    M test/unittest/scripting/tst.sid.sh

  Log Message:
  -----------
  Add diagnostics for tst.sid.sh

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


  Commit: 8d2f51bb07f11af0d314040f980329b3ff233b77
      https://github.com/oracle/dtrace-utils/commit/8d2f51bb07f11af0d314040f980329b3ff233b77
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2021-09-24 (Fri, 24 Sep 2021)

  Changed paths:
    A test/unittest/scripting/tst.sid-valid.sh
    R test/unittest/scripting/tst.sid.sh
    A test/unittest/variables/bvar/tst.id-valid.sh
    R test/unittest/variables/bvar/tst.id.sh

  Log Message:
  -----------
  Rename tests where same name is used for .d and .sh test

When two tests have the same base name but .d and .sh extensions,
the .d test is silently ignored and the .sh test is run in its
place.  Rename either test to avoid such a conflict.

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


  Commit: ccbf8bd0266448db172073349bc2197d5187a9c7
      https://github.com/oracle/dtrace-utils/commit/ccbf8bd0266448db172073349bc2197d5187a9c7
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2021-09-29 (Wed, 29 Sep 2021)

  Changed paths:
    M libdtrace/dt_cg.c

  Log Message:
  -----------
  cg: fix calls to rand

For many types of identifier, a di_id of 0 means "undefined".  But for
subrs, di_id 0 is DIF_SUBR_RAND, a valid (albeit currently
unimplemented) subr.

Fixes several assertion failures running the testsute.

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


  Commit: 01b22a1b50b9feedb08c34e16ad1b9bef119f606
      https://github.com/oracle/dtrace-utils/commit/01b22a1b50b9feedb08c34e16ad1b9bef119f606
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2021-09-29 (Wed, 29 Sep 2021)

  Changed paths:
    M test/unittest/dtrace-util/tst.APIVersion.d
    M test/unittest/dtrace-util/tst.APIVersion.r

  Log Message:
  -----------
  tests: fix API version test

This just needs results regeneration.

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


  Commit: 2015eb271f669a52ba0b9a581df75947b8713f8c
      https://github.com/oracle/dtrace-utils/commit/2015eb271f669a52ba0b9a581df75947b8713f8c
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2021-09-29 (Wed, 29 Sep 2021)

  Changed paths:
    M libdtrace/dt_probe.c
    M test/unittest/dtrace-util/tst.InvalidTraceID1.sh
    M test/unittest/dtrace-util/tst.InvalidTraceID3.sh
    M test/unittest/dtrace-util/tst.InvalidTraceID7.sh
    M test/unittest/dtrace-util/tst.ZeroProbeIdentifier.sh

  Log Message:
  -----------
  errors: invalid probe IDs should return EDT_BADID, as in v1

They were returning EDT_NOPROBE, causing several tests for -i to fail.

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


  Commit: 85ecfd9d68bba44b56a606e79f8ef5a43ecb7047
      https://github.com/oracle/dtrace-utils/commit/85ecfd9d68bba44b56a606e79f8ef5a43ecb7047
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2021-09-29 (Wed, 29 Sep 2021)

  Changed paths:
    M test/unittest/printa/tst.many.d

  Log Message:
  -----------
  tests: printa/tst.many.d is not relevant for DTrace based on BPF

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: 8359ab81fa5eca54f499529ba91ac225eebce151
      https://github.com/oracle/dtrace-utils/commit/8359ab81fa5eca54f499529ba91ac225eebce151
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2021-09-29 (Wed, 29 Sep 2021)

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

  Log Message:
  -----------
  tests: fix usdt/tst.dlclose1.sh

This test fails purely because of a bufsize expansion message, since in
v2 the bufsize must be at least one page.

Boost the bufsize in the test to the largest likely page size (64KiB,
seen on AArch64) to quash the message.

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


  Commit: f1d8646be43f392b1e4d5456498c8de9e955b132
      https://github.com/oracle/dtrace-utils/commit/f1d8646be43f392b1e4d5456498c8de9e955b132
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2021-09-29 (Wed, 29 Sep 2021)

  Changed paths:
    M test/demo/intro/countdown.d
    M test/demo/intro/countdown.r
    M test/demo/intro/counter.d
    M test/demo/intro/counter.r

  Log Message:
  -----------
  tests: fix two more trivially passing tests

These tests just need results regenerating to account for tiny spacing
changes.

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


  Commit: c3f94d807a6653799e8859c9ebd8163ff0fbf77d
      https://github.com/oracle/dtrace-utils/commit/c3f94d807a6653799e8859c9ebd8163ff0fbf77d
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2021-10-08 (Fri, 08 Oct 2021)

  Changed paths:
    M dtrace.spec
    M libdtrace/dt_work.c

  Log Message:
  -----------
  work: run under valgrind

Running BEGIN/END probes under valgrind failed because these probes work
by dropping uprobes on DTrace itself, and uprobes fail if the uprobed
process is being valgrinded: the breakpoint instruction inserted by
uprobes is translated into VEX IR and then emulated by valgrind, and the
emulation is located at a different address than the address originally
used by the kernel: so the kernel has no idea it was a uprobe, and
passes the breakpoint through to dtrace itself, killing it with a
SIGTRAP.

The solution is to use the bizarrely-named VALGRIND_NON_SIMD_CALL0
request to call the probes when valgrind is in use.  This asks valgrind
to invoke a function on the real CPU rather than the emulated one, which
invokes it from the right address, so the kernel spots the uprobe for
what it is. VALGRIND_NON_SIMD_CALL* has harsh and barely-documented
requirements on what it can be used to call, but our probe functions are
entirely empty, so we can be pretty sure it'll always work for us.

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


  Commit: 5f57f40aa61d2d4a6892ac757bc51b013de0c1eb
      https://github.com/oracle/dtrace-utils/commit/5f57f40aa61d2d4a6892ac757bc51b013de0c1eb
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2021-10-08 (Fri, 08 Oct 2021)

  Changed paths:
    M libdtrace/dt_kernel_module.c

  Log Message:
  -----------
  modules: support .gz and .xz-compressed modules

The module path ends in .ko.*:, where * depends on the compression
algorithm: so systems with compressed modules would skip all modules on
the incorrect grounds that none existed.

Add a few compression algorithms to make this subsystem work again.
(It is mostly invisible for in-tree modules.)

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


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

  Changed paths:
    M runtest.sh
    M test/unittest/consumer/addr2str-null.c
    M test/unittest/consumer/tst.merge_ranges_bug25767469.c
    M test/unittest/consumer/tst.symbols.c

  Log Message:
  -----------
  Fix compilation problems in C tests

The tests that are C source files are not compiling.  Fix those
errors, including:

- augmenting test_incflags in runtest.sh
  (and improving readability while we are at it)

- remove xfail for some tests

- update names of dtrace_syminfo_t members

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


  Commit: 9f27b8c7bb406ff3337072bfae69758e4eddc0f8
      https://github.com/oracle/dtrace-utils/commit/9f27b8c7bb406ff3337072bfae69758e4eddc0f8
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-10-08 (Fri, 08 Oct 2021)

  Changed paths:
    M test/utils/.gitignore

  Log Message:
  -----------
  Clean up order of entries in test/utils/.gitignore

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


  Commit: 9939955a5741c5a729fac809f6ea9a52d29291da
      https://github.com/oracle/dtrace-utils/commit/9939955a5741c5a729fac809f6ea9a52d29291da
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2021-10-12 (Tue, 12 Oct 2021)

  Changed paths:
    M libdtrace/dt_consume.c

  Log Message:
  -----------
  Refactor dt_consume_one()

Split the bulk of dt_consume_one() into a new dt_consume_one_probe(),
which can get probe data from places other than the perf ring buffer.
Much code got reindented.

Signed-off-by: Nick Alcock <nick.alcock 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: a981b73eda5e63bcd18529b72ab65463c3fc47a5
      https://github.com/oracle/dtrace-utils/commit/a981b73eda5e63bcd18529b72ab65463c3fc47a5
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2021-10-12 (Tue, 12 Oct 2021)

  Changed paths:
    M libdtrace/dt_htab.c

  Log Message:
  -----------
  htab: remove "based on a string" comment

The speculation code (upcoming) will have htabs of non-strings.

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


  Commit: 7fe6ce9a8a887c3a78e49a8eddefe96ea9e5b493
      https://github.com/oracle/dtrace-utils/commit/7fe6ce9a8a887c3a78e49a8eddefe96ea9e5b493
  Author: Nick Alcock <nick.alcock at oracle.com>
  Date:   2021-10-13 (Wed, 13 Oct 2021)

  Changed paths:
    M bpf/Build
    A bpf/speculation.c
    M libdtrace/dt_bpf.c
    M libdtrace/dt_bpf.h
    M libdtrace/dt_bpf_maps.h
    M libdtrace/dt_cc.c
    M libdtrace/dt_cg.c
    M libdtrace/dt_consume.c
    M libdtrace/dt_dlibs.c
    M libdtrace/dt_errtags.h
    M libdtrace/dt_impl.h
    M libdtrace/dt_open.c
    M libdtrace/dt_peb.h
    M libdtrace/dtrace.h
    A test/unittest/speculation/err.CommitWithInvalid.d
    A test/unittest/speculation/err.CommitWithInvalid.r
    M test/unittest/speculation/err.D_ACT_SPEC.SpeculateWithCopyOut.d
    M test/unittest/speculation/err.D_ACT_SPEC.SpeculateWithCopyOutStr.d
    R test/unittest/speculation/err.D_COMM_COMM.CommitAftCommit.d
    R test/unittest/speculation/err.D_COMM_COMM.CommitAftCommit.r
    R test/unittest/speculation/err.D_COMM_COMM.DisjointCommit.d
    R test/unittest/speculation/err.D_COMM_COMM.DisjointCommit.r
    A test/unittest/speculation/err.DiscardWithInvalid.d
    A test/unittest/speculation/err.DiscardWithInvalid.r
    R test/unittest/speculation/err.SpecSizeVariations1.d
    R test/unittest/speculation/err.SpecSizeVariations1.r
    R test/unittest/speculation/err.SpecSizeVariations2.d
    R test/unittest/speculation/err.SpecSizeVariations2.r
    M test/unittest/speculation/tst.CommitAfterDiscard.d
    M test/unittest/speculation/tst.CommitAfterDiscard.r
    A test/unittest/speculation/tst.CommitCommitCommit.d
    A test/unittest/speculation/tst.CommitCommitCommit.r
    A test/unittest/speculation/tst.CommitDiscard4x.d
    A test/unittest/speculation/tst.CommitDiscard4x.r
    A test/unittest/speculation/tst.CommitWithInactive.d
    A test/unittest/speculation/tst.CommitWithInactive.r
    M test/unittest/speculation/tst.CommitWithZero.d
    M test/unittest/speculation/tst.CommitWithZero.r
    M test/unittest/speculation/tst.DataRecAftDiscard.d
    M test/unittest/speculation/tst.DiscardAftCommit.d
    M test/unittest/speculation/tst.DiscardAftCommit.r
    M test/unittest/speculation/tst.DiscardAftDataRec.d
    M test/unittest/speculation/tst.DiscardAftDiscard.d
    A test/unittest/speculation/tst.DiscardWithInactive.d
    A test/unittest/speculation/tst.DiscardWithInactive.r
    M test/unittest/speculation/tst.DiscardWithZero.d
    M test/unittest/speculation/tst.DiscardWithZero.r
    M test/unittest/speculation/tst.ExitAftDiscard.d
    M test/unittest/speculation/tst.NoSpecBuffer.d
    M test/unittest/speculation/tst.NoSpecBuffer.r
    A test/unittest/speculation/tst.SingleCPU.d
    A test/unittest/speculation/tst.SingleCPU.r
    R test/unittest/speculation/tst.SpecSizeVariations3.d
    R test/unittest/speculation/tst.SpecSizeVariations3.r
    M test/unittest/speculation/tst.SpecSizeVariations4.d
    M test/unittest/speculation/tst.SpecSizeVariations4.r
    M test/unittest/speculation/tst.SpecSizeVariations5.d
    M test/unittest/speculation/tst.SpecSizeVariations5.r
    M test/unittest/speculation/tst.SpeculationCommit.d
    A test/unittest/speculation/tst.SpeculationCommitNotQuiet.d
    A test/unittest/speculation/tst.SpeculationCommitNotQuiet.r
    A test/unittest/speculation/tst.SpeculationDefault.d
    A test/unittest/speculation/tst.SpeculationDefault.r
    A test/unittest/speculation/tst.SpeculationDefaultCommit.d
    A test/unittest/speculation/tst.SpeculationDefaultCommit.r
    A test/unittest/speculation/tst.SpeculationDefaultDiscard.d
    A test/unittest/speculation/tst.SpeculationDefaultDiscard.r
    M test/unittest/speculation/tst.SpeculationDiscard.d
    M test/unittest/speculation/tst.SpeculationDiscard.r
    A test/unittest/speculation/tst.SpeculationDiscardNotQuiet.d
    A test/unittest/speculation/tst.SpeculationDiscardNotQuiet.r
    M test/unittest/speculation/tst.SpeculationID.d
    M test/unittest/speculation/tst.SpeculationWithZero.d
    M test/unittest/speculation/tst.SpeculationWithZero.r
    M test/unittest/speculation/tst.TwoSpecBuffers.d
    M test/unittest/speculation/tst.TwoSpecBuffers.r
    M test/unittest/speculation/tst.negcommit.d
    M test/unittest/speculation/tst.negcommit.r
    M test/unittest/speculation/tst.zerosize.d

  Log Message:
  -----------
  consume, cg: implement speculations

This works by tracking live speculations in a specs map containing
dt_bpf_specs_t, each of which tracks the number of buffers written and
whether a commit/discard has been called on it.  (dt_speculation(),
which finds free speculations, is limited to 16 speculations and needs
adjusting when BPF loops work).  Successful speculate()s record the ID
of the active speculation in the clause header.  When a commit happens,
a COMMIT/DISCARD record is written.

At consume time, buffers with active speculate()s are hived off into a
list of dt_spec_buf_data_t under a dt_spec_buf_t (when peeking, this is
only done on the first peek, identified via the CONSUME_PEEK_START
peekflag); when a commit/discard hits for a given speculation, the efunc
invocation etc is suppressed if need be (discards can be followed by
data-recording actions, in which case the efunc is not suppressed), and
the specs map entry for this speculation is sucked into the dt_spec_buf
and this chained into the dt_spec_bufs_draining list.  This list is
traversed on every consume, and any new spec bufs committed (as if just
received from the ring buffer) or discarded appropriately.

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


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

  Changed paths:
    M libdtrace/dt_bpf.c
    M libdtrace/dt_peb.c
    M libdtrace/dt_prov_profile.c
    M libdtrace/dt_provider_tp.c

  Log Message:
  -----------
  Ensure all perf_event_open() calls use the PERF_FLAG_FD_CLOEXEC flag

Also set the size of the attribute struct, and only use PERF_SAMPLE_RAW
for the output buffers.

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: 2542ec13c79acafe7221c56886790e92f37a1b5b
      https://github.com/oracle/dtrace-utils/commit/2542ec13c79acafe7221c56886790e92f37a1b5b
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-10-14 (Thu, 14 Oct 2021)

  Changed paths:
    A test/unittest/struct/tst.implicit_decl.d
    A test/unittest/struct/tst.implicit_decl.r

  Log Message:
  -----------
  test: Add test to Verify storage size for implicit struct declarations

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: 9b337db309e35256164b86de0484c0229e0bff61
      https://github.com/oracle/dtrace-utils/commit/9b337db309e35256164b86de0484c0229e0bff61
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2021-10-14 (Thu, 14 Oct 2021)

  Changed paths:
    M libdtrace/dt_cg.c

  Log Message:
  -----------
  Check not-NULL pointer before trace(string)

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


  Commit: 05f0212ca2a84e6f5db4f6d3890f72767f37d72d
      https://github.com/oracle/dtrace-utils/commit/05f0212ca2a84e6f5db4f6d3890f72767f37d72d
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2021-10-14 (Thu, 14 Oct 2021)

  Changed paths:
    M bpf/Build
    A bpf/strcmp.S
    M libdtrace/dt_bpf.c
    M libdtrace/dt_cg.c
    M libdtrace/dt_dlibs.c
    M test/demo/builtin/probename.d
    M test/demo/builtin/probeprov.d
    M test/demo/fbt/xioctl.d
    M test/unittest/dif/strncmp.d
    M test/unittest/dtrace-util/tst.ListProbesFunc.sh
    M test/unittest/dtrace-util/tst.ListProbesName.sh
    A test/unittest/operators/tst.str_comparison-basic.d
    A test/unittest/operators/tst.str_comparison-longer.d
    A test/unittest/operators/tst.str_comparison-nested.d
    A test/unittest/operators/tst.str_comparison-nested.r
    A test/unittest/operators/tst.str_comparison-signed.d
    M test/unittest/types/tst.condexpr.d
    M test/unittest/types/tst.relstring.d

  Log Message:
  -----------
  Add support for string comparisons

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


  Commit: 8a9815ab47894f4d857fe62faca96f7e4a1b5c4b
      https://github.com/oracle/dtrace-utils/commit/8a9815ab47894f4d857fe62faca96f7e4a1b5c4b
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2021-10-14 (Thu, 14 Oct 2021)

  Changed paths:
    M bpf/Build
    A bpf/strchr.S
    M libdtrace/dt_cg.c
    M libdtrace/dt_dlibs.c
    M test/unittest/dif/strchr.d

  Log Message:
  -----------
  Add support for strchr() subroutine

This implementation tries to minimize branching and looping in BPF code
to ease the load on the BPF verifier, which tries to walk each branch.
It does so by using bpf_probe_read() to copy the string into scratch
memory.  Then, the byte in question is xor'ed with every byte in scratch
memory.  This means the matching byte will now be a NULL byte while all
other bytes are non-null.  This means that bpf_probe_read_str() can now
give us the location of the byte in question.

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


  Commit: 16c9de01cfe1e116ccb86407c3093e0aab666e41
      https://github.com/oracle/dtrace-utils/commit/16c9de01cfe1e116ccb86407c3093e0aab666e41
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2021-10-14 (Thu, 14 Oct 2021)

  Changed paths:
    M bpf/Build
    A bpf/strrchr.S
    M libdtrace/dt_cg.c
    M libdtrace/dt_dlibs.c
    M test/unittest/funcs/tst.strchr.d

  Log Message:
  -----------
  Add support for strrchr() subroutine

The algorithm is different from the one used for strchr() due to
how the BPF verifier handles decrementing and incrementing loops
differently.

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


  Commit: 5f8c4107a6a1b3afdc589714a30b5c47fda83b89
      https://github.com/oracle/dtrace-utils/commit/5f8c4107a6a1b3afdc589714a30b5c47fda83b89
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2021-10-14 (Thu, 14 Oct 2021)

  Changed paths:
    M bpf/Build
    A bpf/index.S
    M libdtrace/dt_cg.c
    M libdtrace/dt_dlibs.c
    M test/unittest/dif/index2arg.d
    M test/unittest/dif/index3arg.d
    A test/unittest/funcs/tst.index2.d
    A test/unittest/funcs/tst.index2.r

  Log Message:
  -----------
  Add support for index() subroutine

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


  Commit: 67e980df60798b5f9e87cdfc6275fdad802d95ff
      https://github.com/oracle/dtrace-utils/commit/67e980df60798b5f9e87cdfc6275fdad802d95ff
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2021-10-14 (Thu, 14 Oct 2021)

  Changed paths:
    M bpf/Build
    A bpf/rindex.S
    M libdtrace/dt_cg.c
    M libdtrace/dt_dlibs.c
    M test/stress/fbtsafety/tst.shortstr.d
    A test/unittest/funcs/tst.rindex.d
    A test/unittest/funcs/tst.rindex.r

  Log Message:
  -----------
  Add support for rindex() subroutine

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


  Commit: e352545c94376abbf83838aa716dbc9c97f00111
      https://github.com/oracle/dtrace-utils/commit/e352545c94376abbf83838aa716dbc9c97f00111
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2021-10-14 (Thu, 14 Oct 2021)

  Changed paths:
    M libdtrace/dt_cg.c
    M test/unittest/dif/strstr.d
    M test/unittest/funcs/tst.strstr.d

  Log Message:
  -----------
  Add support for strstr() subroutine

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


  Commit: ccc2097066e72f4720b7bf98c9c02401274b9f1a
      https://github.com/oracle/dtrace-utils/commit/ccc2097066e72f4720b7bf98c9c02401274b9f1a
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2021-10-14 (Thu, 14 Oct 2021)

  Changed paths:
    M bpf/Build
    A bpf/lltostr.S
    M libdtrace/dt_cg.c
    M libdtrace/dt_dlibs.c
    M test/unittest/dif/lltostr.d
    A test/unittest/funcs/tst.lltostr-short.d
    A test/unittest/funcs/tst.lltostr-short.r
    M test/unittest/funcs/tst.lltostr.d
    M test/unittest/funcs/tst.lltostr.r

  Log Message:
  -----------
  Add support for lltostr() subroutine

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


  Commit: 91182c2c3a5a8419c0551c39588096cbbad9d24f
      https://github.com/oracle/dtrace-utils/commit/91182c2c3a5a8419c0551c39588096cbbad9d24f
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2021-10-14 (Thu, 14 Oct 2021)

  Changed paths:
    M libdtrace/dt_module.c
    M test/unittest/aggs/tst.aggmod_full2.sh
    M test/unittest/consumer/tst.symbols.c

  Log Message:
  -----------
  Missing symbols for loadable modules when reading /proc/kallmodsyms

As DTrace-on-BPF development started, the patch
"dtrace: handle .init.scratch section in /proc/kallmodsyms" was applied,
but different versions were applied to legacy DTrace and DTrace on BPF:
81c6542 and f5c1f088, respectively.  The patch applied to DTrace on BPF was
wrong.  In particular, once dt_modsym_update() starts reading symbols for
loadable modules, it sets kernel_flag=-1.  If there is no .init.scratch
section, the code will forever think it is nonetheless in such a section
and ignore all symbols.  Hence, symbols for loadable modules are never read.

Fix dt_modsym_update(), specifically more in line with legacy DTrace.
Importantly,
  - handle .init.scratch first
  - make kernel_flag an unsigned int
  - signal the beginning of loadable modules by
      setting only one bit of kernel_flag, not all of them

Thanks to Rajan Shanmugavelu for reporting this problem.

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: ce6bb1ed463137f8f3b75fc881bcd3f85814b3ce
      https://github.com/oracle/dtrace-utils/commit/ce6bb1ed463137f8f3b75fc881bcd3f85814b3ce
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-10-15 (Fri, 15 Oct 2021)

  Changed paths:
    M NEWS
    M dtrace.spec

  Log Message:
  -----------
  Update NEWS and spec file for errata release 2.0.0-1.8

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>


Compare: https://github.com/oracle/dtrace-utils/compare/a0c70c5de7cb...ce6bb1ed4631



More information about the DTrace-devel mailing list