[DTrace-devel] [oracle/dtrace-utils] 561f84: Eliminate BPF instruction in agg buf preparation

Kris Van Hees noreply at github.com
Mon Jun 21 10:23:39 PDT 2021


  Branch: refs/heads/dev
  Home:   https://github.com/oracle/dtrace-utils
  Commit: 561f8425fa0f964e472bd38aabe5e388af0675ea
      https://github.com/oracle/dtrace-utils/commit/561f8425fa0f964e472bd38aabe5e388af0675ea
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2021-04-23 (Fri, 23 Apr 2021)

  Changed paths:
    M libdtrace/dt_cg.c

  Log Message:
  -----------
  Eliminate BPF instruction in agg buf preparation

An unneeded BPF instruction can be eliminated in the preparation
of the agg buffer.  A similar optimization in the (currently unused)
DT_AGG_NUM_COPIES!=1 code path is not possible;  there, the pointer
is advanced by both an IMM and a reg value, two operations that
cannot be combined.

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


  Commit: 6437db5d60cad3edc97c0ba024f9f7c0bc967f13
      https://github.com/oracle/dtrace-utils/commit/6437db5d60cad3edc97c0ba024f9f7c0bc967f13
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M test/unittest/variables/bvar/tst.arg0.d
    M test/unittest/variables/bvar/tst.arg1.d
    M test/unittest/variables/bvar/tst.arg2.d
    M test/unittest/variables/bvar/tst.arg3.d
    M test/unittest/variables/bvar/tst.arg4.d
    M test/unittest/variables/bvar/tst.arg5.d
    M test/unittest/variables/bvar/tst.arg6.d
    M test/unittest/variables/bvar/tst.arg7.d
    M test/unittest/variables/bvar/tst.arg8.d
    M test/unittest/variables/bvar/tst.arg9.d
    M test/unittest/variables/bvar/tst.args.d
    M test/unittest/variables/bvar/tst.caller.d
    M test/unittest/variables/bvar/tst.curcpu.d
    M test/unittest/variables/bvar/tst.curthread.d
    M test/unittest/variables/bvar/tst.epid.d
    M test/unittest/variables/bvar/tst.errno.d
    M test/unittest/variables/bvar/tst.execname.d
    M test/unittest/variables/bvar/tst.gid.d
    M test/unittest/variables/bvar/tst.id.d
    M test/unittest/variables/bvar/tst.ipl.d
    M test/unittest/variables/bvar/tst.pid.d
    M test/unittest/variables/bvar/tst.ppid.d
    M test/unittest/variables/bvar/tst.ppid2.d
    M test/unittest/variables/bvar/tst.probefunc.d
    M test/unittest/variables/bvar/tst.probemod.d
    M test/unittest/variables/bvar/tst.probename.d
    M test/unittest/variables/bvar/tst.probeprov.d
    M test/unittest/variables/bvar/tst.stackdepth.d
    M test/unittest/variables/bvar/tst.tid.d
    M test/unittest/variables/bvar/tst.timestamp-bug31632630.d
    M test/unittest/variables/bvar/tst.timestamp.d
    M test/unittest/variables/bvar/tst.ucaller.d
    M test/unittest/variables/bvar/tst.uid.d
    M test/unittest/variables/bvar/tst.uregs.d
    M test/unittest/variables/bvar/tst.ustackdepth.d
    M test/unittest/variables/bvar/tst.vtimestamp.d
    M test/unittest/variables/bvar/tst.walltimestamp.d

  Log Message:
  -----------
  Add ERROR probe to bvar tests

A number of tested built-in variables are not yet supported.  So
their respective tests are marked XFAIL.  This is satisfactory, but
a number of those variables currently cause DTrace errors, causing
their tests to hang (time out).  This costs unnecessary test time.

When support for the ERROR probe (patch "ERROR probe implementation")
was introduced, the test/unittest/builtinvar/tst.*.d tests were
augmented with ERROR probes to catch errors and result in faster
failures.

Add similar ERROR probes to test/unittest/variables/bvar/tst.*.d
for the same reason.

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


  Commit: 9a4c70e57a22730517e22bedd1672609b31070c4
      https://github.com/oracle/dtrace-utils/commit/9a4c70e57a22730517e22bedd1672609b31070c4
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M libdtrace/dt_parser.c
    A test/unittest/variables/gvar/tst.undecl-offset.r
    A test/unittest/variables/gvar/tst.undecl-offset.sh

  Log Message:
  -----------
  Correct storage size assignment for variables

The implementation of global and local variables using BPF maps added
calls to dt_ident_set_storage() to set the offset and size of the data
storage for each variable.  It was setting the storage requirement for
any automatically declared variable to 8 bytes regardless of its type.
Since the datatype of such a variable is determined dynamically based
on its use, the storage assignment must be done once the datatype is
known.  But by then, some code was already generated based on the wrong
size.

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


  Commit: 5f05d3962a61ec1f562ef935d02237f85361699b
      https://github.com/oracle/dtrace-utils/commit/5f05d3962a61ec1f562ef935d02237f85361699b
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M libdtrace/dt_cg.c
    M libdtrace/dt_dis.c
    M libdtrace/dt_parser.c
    M test/unittest/arithmetic/tst.basics.r
    A test/unittest/variables/gvar/tst.alignment-array.r
    A test/unittest/variables/gvar/tst.alignment-array.sh
    A test/unittest/variables/gvar/tst.alignment-char.r
    A test/unittest/variables/gvar/tst.alignment-char.sh
    A test/unittest/variables/gvar/tst.alignment-int.r
    A test/unittest/variables/gvar/tst.alignment-int.sh
    A test/unittest/variables/gvar/tst.alignment-long.r
    A test/unittest/variables/gvar/tst.alignment-long.sh
    A test/unittest/variables/gvar/tst.alignment-ptr.r
    A test/unittest/variables/gvar/tst.alignment-ptr.sh
    A test/unittest/variables/gvar/tst.alignment-short.r
    A test/unittest/variables/gvar/tst.alignment-short.sh
    A test/unittest/variables/gvar/tst.alignment-struct-2.r
    A test/unittest/variables/gvar/tst.alignment-struct-2.sh
    A test/unittest/variables/gvar/tst.alignment-struct.r
    A test/unittest/variables/gvar/tst.alignment-struct.sh
    A test/unittest/variables/gvar/tst.store-char.d
    A test/unittest/variables/gvar/tst.store-char.r
    A test/unittest/variables/lvar/tst.alignment-array.r
    A test/unittest/variables/lvar/tst.alignment-array.sh
    A test/unittest/variables/lvar/tst.alignment-char.r
    A test/unittest/variables/lvar/tst.alignment-char.sh
    A test/unittest/variables/lvar/tst.alignment-int.r
    A test/unittest/variables/lvar/tst.alignment-int.sh
    A test/unittest/variables/lvar/tst.alignment-long.r
    A test/unittest/variables/lvar/tst.alignment-long.sh
    A test/unittest/variables/lvar/tst.alignment-ptr.r
    A test/unittest/variables/lvar/tst.alignment-ptr.sh
    A test/unittest/variables/lvar/tst.alignment-short.r
    A test/unittest/variables/lvar/tst.alignment-short.sh
    A test/unittest/variables/lvar/tst.alignment-struct-2.r
    A test/unittest/variables/lvar/tst.alignment-struct-2.sh
    A test/unittest/variables/lvar/tst.alignment-struct.r
    A test/unittest/variables/lvar/tst.alignment-struct.sh
    A test/unittest/variables/lvar/tst.store-char.d
    A test/unittest/variables/lvar/tst.store-char.r

  Log Message:
  -----------
  Fix alignment of global and local variables

Storage for global and local variables was allocated at a 8-byte
boundary regardless of the datatype of the variables.  We now use
the proper alignment for each specific variable based on its
datatype.

This patch also corrects the expected output for the tst.basics.d
arithmetic test.

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


  Commit: 6701d40a72f1c1dcf05469c1ddcf6d8219c76940
      https://github.com/oracle/dtrace-utils/commit/6701d40a72f1c1dcf05469c1ddcf6d8219c76940
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M libdtrace/dt_dis.c
    A test/unittest/variables/bvar/tst.offset-blank.r
    A test/unittest/variables/bvar/tst.offset-blank.sh
    M test/unittest/variables/gvar/tst.undecl-offset.r

  Log Message:
  -----------
  Do not print an offset for builtin variables

Builtin variables are global variables but their value is not stored
in the gvars BPF map.  Therefore, their offset is always -1 which is
displayed as ffffffff.  That value is too wide for the OFFSET field
in the variable list in the disassembly listing.  Since the offset
value is not meaningful in this case, it is no longer printed.

Offsets are now also printed in decimal rather than hexadecimal to be
consistent with other offset values in disassembly listings.

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


  Commit: 1c610859ee0f0fe584ca947036a2a8416a681987
      https://github.com/oracle/dtrace-utils/commit/1c610859ee0f0fe584ca947036a2a8416a681987
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M libdtrace/dt_dis.c

  Log Message:
  -----------
  Increase the instruction counter to 4 digits for BPF programs

BPF programs are becoming longer as more features are implemented, and
we are now routinely encountering progrmas that are 1000 or more
instructions.  The disassembler listings were limited to 3 digits for
the instruction counter and 4 for the offset.  This is now increased
to 4 digits for the counter and 5 for the offset.

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


  Commit: a73bd1b16c6190d56935ce565b75b88797fba821
      https://github.com/oracle/dtrace-utils/commit/a73bd1b16c6190d56935ce565b75b88797fba821
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M libdtrace/dt_probe.c
    M libdtrace/dt_probe.h
    M libdtrace/dt_program.c
    M libdtrace/dt_prov_dtrace.c
    M libdtrace/dt_prov_pid.c

  Log Message:
  -----------
  Put probe enabling into its own function

Probes were being added to the enablings list from multiple locations
in the source code.  This patch introduces dt_probe_enable()  to
perform this functionality.  This will make it easier to add any
functionality to the enabling process in the future.

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


  Commit: ceeb427f34c63a36e0663f8d5f62d0c180a0966f
      https://github.com/oracle/dtrace-utils/commit/ceeb427f34c63a36e0663f8d5f62d0c180a0966f
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M libdtrace/dt_probe.c

  Log Message:
  -----------
  Store probe description components in the global string table

Future implementation of probeprov, probemod, probefunc, and probename
built-in variables requires them to be present in the string table.
The component strings are added to the global string table as probes
are added to the list of enablings,

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


  Commit: 9e1846ba5e19d090403df866dd5d27b014e4bbaa
      https://github.com/oracle/dtrace-utils/commit/9e1846ba5e19d090403df866dd5d27b014e4bbaa
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

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

  Log Message:
  -----------
  Load the global string table data into the strtab BPF map

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


  Commit: a77a986f91c04f0bda290730e736972dc73ea5c5
      https://github.com/oracle/dtrace-utils/commit/a77a986f91c04f0bda290730e736972dc73ea5c5
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M libdtrace/dt_string.c

  Log Message:
  -----------
  Adjust str2hval() to match dt_strtab_hash()

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


  Commit: 99df74b2aa07e52120ee8237964a1d4ccafb38af
      https://github.com/oracle/dtrace-utils/commit/99df74b2aa07e52120ee8237964a1d4ccafb38af
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M libdtrace/dt_ident.c
    M libdtrace/dt_kernel_module.c
    M libdtrace/dt_module.c
    M libdtrace/dt_printf.c
    M libdtrace/dt_provider.c
    M libdtrace/dt_symtab.c

  Log Message:
  -----------
  Use str2hval() instead of dt_strtab_hash() in non-strtab code

An earlier patch ensured that str2hval() and dt_strtab_hash() provide
the same hash function implementation.  All code that used to call
dt_strtab_hash() to get a hash value for a string should and will now
use the generic str2hval() function.

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


  Commit: 4f8fa3406c78e0170c1aad864fb0f56640f2648c
      https://github.com/oracle/dtrace-utils/commit/4f8fa3406c78e0170c1aad864fb0f56640f2648c
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M libdtrace/dt_strtab.c

  Log Message:
  -----------
  Optimize dt_strtab_insert() for empty string

This patch also clarifies that the string table will always have the
empty string at offset 0.

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


  Commit: 0c33733e46fb56d465a6e21f18e00661fa89d26c
      https://github.com/oracle/dtrace-utils/commit/0c33733e46fb56d465a6e21f18e00661fa89d26c
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M libdtrace/dt_strtab.c
    M libdtrace/dt_strtab.h
    M libdtrace/dt_symbol_modops.h

  Log Message:
  -----------
  Replace dt_strtab_hash() with str2hval() in string table handling

We only need one single function that calculates a hash value for a
string.  Since we have a generic one (str2hval), the strtab code
should use that one instead of having its own custom function.

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


  Commit: 71f26e7a84679cfb07b63c68142770ef3dd4a7b2
      https://github.com/oracle/dtrace-utils/commit/71f26e7a84679cfb07b63c68142770ef3dd4a7b2
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M bpf/Build
    A bpf/varint.c
    M libdtrace/Build
    A libdtrace/dt_varint.c
    A libdtrace/dt_varint.h
    A test/internals/tst.varint.c

  Log Message:
  -----------
  Implement variable length integer support

This patch provides an implementation of variable-length integers,
both in libdtrace and as precompiled BPF code.  It is based on the
PrefixVarint algorithm.  Unsigned integers are encoded as follows:

  0x0 - 0x7f		1 byte:  0xxxxxxx
  0x80 - 0x407f		2 bytes: 10xxxxxx xxxxxxxx
  0x4080 - 0x20407f	3 bytes: 110xxxxx xxxxxxxx xxxxxxxx

and so on.  This algorithm ensures that there is exactly one
representation for a given unsigned integer.  It also ensures that
the number of bytes in the variable length representation can be
determined based on the first byte.  This makes decoding simpler.

The following functions are provided:

  int dt_int2vint(uint64_t val, char *str)
	Store a 64-bit unsigned integer in the provided string and
	return the number of bytes used.

  uint64_t dt_vint2int(const char *str)
	Retrieve a 64-bit unsigned integer from a variable length
	integer in the provided string.

  int dt_vint_size(uint64_t val)
	Return the number of bytes necessary to represent the given
	64-bit unsigned integer as a variable length integer.

  const char *dt_vint_skip(const char *str)
	Skip over the variable length integer at the start of the
	given string and return a pointer to the first byte beyond
	the variable length integer.

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


  Commit: aa9b7058ac1427f0d2d8162d00c1ac4d73ed8d3a
      https://github.com/oracle/dtrace-utils/commit/aa9b7058ac1427f0d2d8162d00c1ac4d73ed8d3a
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M libdtrace/dt_bpf.c
    M libdtrace/dt_cc.c
    M libdtrace/dt_dis.c
    M libdtrace/dt_impl.h
    M libdtrace/dt_link.c
    M libdtrace/dt_open.c
    M libdtrace/dt_strtab.c
    M libdtrace/dt_subr.c

  Log Message:
  -----------
  Store strings in the string table with varint length prefix

With the introduction of variable length integers, strings in D (and
then also BPF) can be stored with their length embedded in the byte
stream.  This makes it possible to perform operations on strings
without the need to recalculate the length of the string multiple
times.

The string constant table stored in DIFOs contains strings that will
be made available to the BPF program by loading the string constant
table into a BPF map.  It makes sense to already store strings using
the variable length prefix when the string constant table is
constructed, which then also requires code that uses it to know
about the variable length integer prefixing each string.

This patch introduces a dt_difo_getstr() function that returns a
regular C char * entity given a DIFO and a string offset into the
string constant table for that DIFO.  Any code that needs to access
a string constant from a DIFO is updated to make use of this new
function.

The string constant table creation code is updated to account for
the fact that the empty string will now occupy 2 bytes (one for the
length that is 0, and one for the terminating 0-byte.

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


  Commit: 34ce1df0f1a8ae5a60f0b3467d891cad826c1ac3
      https://github.com/oracle/dtrace-utils/commit/34ce1df0f1a8ae5a60f0b3467d891cad826c1ac3
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

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

  Log Message:
  -----------
  Add dt_list_length()

Implement a function dt_list_length() to determine the number of
elements in a list.

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


  Commit: 69f3300b0290b4a6344906d3d9f1de857ad7a920
      https://github.com/oracle/dtrace-utils/commit/69f3300b0290b4a6344906d3d9f1de857ad7a920
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M libdtrace/dt_bpf.c
    M test/unittest/actions/freopen/tst.badfreopen.sh
    M test/unittest/operators/tst.ternary.d
    M test/unittest/printf/tst.basics.d
    M test/unittest/printf/tst.precs.d
    M test/unittest/printf/tst.wp.d
    M test/unittest/regression/tst.sigaltstack.d
    M test/unittest/scripting/tst.arg0.d
    M test/unittest/scripting/tst.stringmacro.sh
    M test/unittest/struct/tst.clauselocal.d

  Log Message:
  -----------
  Allocate extra space in the strtab to help the BPF verifier

Although the internal consistency of the strtab data (generated by
the compiler) guarantees that access to string constants will never
read outside the strtab, the BPF verifier cannot verify that through
static code analysis.  By padding the strtab with enough space to
store the largest supported string we guarantee that any access up
to the maximum string size can succeed.

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


  Commit: 82d72ed71dd08d6bcc7976e918cf5650c7282f1b
      https://github.com/oracle/dtrace-utils/commit/82d72ed71dd08d6bcc7976e918cf5650c7282f1b
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M bpf/memcpy.c

  Log Message:
  -----------
  Optimize the memcpy implementation and make it more robust

The memcpy() implementation in BPF was more complicated than it needed
to be.  As a result, the BPF verifier was not able to always guarantee
that this function was being used in a safe way.  The simplification of
the implementation resolves this.

This patch also enforces a maximum copy length of 256 bytes,  In the
future, this limit surely needs to be increased.

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


  Commit: 728f775692d80b29d073165609f749f4ea0c7f9c
      https://github.com/oracle/dtrace-utils/commit/728f775692d80b29d073165609f749f4ea0c7f9c
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M include/dtrace/dif_defines.h
    M libdtrace/dt_cg.c
    M libdtrace/dt_dctx.h
    M libdtrace/dt_printf.c
    M test/unittest/codegen/tst.stack_layout.r
    M test/unittest/scalars/tst.self.d
    M test/unittest/sizeof/tst.SizeofString2.d
    M test/unittest/types/tst.stringconstants.d

  Log Message:
  -----------
  Add support for string constants in compiled D programs

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


  Commit: 895c2196b19df4a85438f8cfd80b052106b88ef5
      https://github.com/oracle/dtrace-utils/commit/895c2196b19df4a85438f8cfd80b052106b88ef5
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M libdtrace/dt_cg.c
    M test/stress/buffering/err.resize3.d
    M test/unittest/strlen/tst.strlen1.d

  Log Message:
  -----------
  Framework for D subroutines incl. strlen() and pseudo speculation()

This patch provides the skeleton for the implementation of subroutines
in D.  It is equivalent to the implementation of D actions in the code
generator.

The strlen() subroutine is provided as a first example of how to
imeplement subroutines.  The speculation() subroutine is provided as
an example of a dummy implementation.  It always simply returns 0, but
this allows various tests for the compiler to be exercised.

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


  Commit: 5f04cc7ee975ce9f93ee92ec1a4bb8d07c33be59
      https://github.com/oracle/dtrace-utils/commit/5f04cc7ee975ce9f93ee92ec1a4bb8d07c33be59
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M bpf/get_bvar.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_dlibs.c
    M test/demo/builtin/probefunc.d
    M test/demo/builtin/probemod.d
    M test/demo/intro/trussrw.d
    M test/unittest/actions/system/tst.system-str.d
    M test/unittest/dif/strlen.d
    M test/unittest/inline/tst.InlineKinds.d
    M test/unittest/providers/tst.beginprof.d
    M test/unittest/providers/tst.probattrs.d
    M test/unittest/providers/tst.probefunc.d
    M test/unittest/providers/tst.probemod.d
    M test/unittest/providers/tst.probename.d
    M test/unittest/providers/tst.probprov.d

  Log Message:
  -----------
  Support probeprov, probemod, probefunc, probename built-in variables

This patch adds support for the built-in variables that provide the
component names for the probe description of the current probe in a
D clause, i.e. the probe that triggered the execution of the clause.

Because clauses (compiled into BPF functions) can be linked into the
BPF programs for multiple probes, the value of these built-in variables
cannot be provided at compile time.  Their value is obtained from a
new BPF hashmap named 'probes' that associates a probe id with the
constant strings that provide the components of the probe description.

This patch also introduces a new BPF constant (STBSZ, resolved at link
time) to hold the size of the string constant table.  This value is
needed to satisfy BPF verifier expectations for map value access
boundary checking.

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


  Commit: 62de63fe66b0822c8cc9093aff46792be28cd5c1
      https://github.com/oracle/dtrace-utils/commit/62de63fe66b0822c8cc9093aff46792be28cd5c1
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M libdtrace/dt_cc.c

  Log Message:
  -----------
  Fix memory leak of dt_error DIFO

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


  Commit: 98b448bd6f44e11d0896d4045b7958b08e97bd0d
      https://github.com/oracle/dtrace-utils/commit/98b448bd6f44e11d0896d4045b7958b08e97bd0d
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M libdtrace/dt_consume.c
    M test/demo/intro/hello.d
    M test/demo/script/interp.d
    A test/unittest/actions/trace/tst.str-quiet.d
    A test/unittest/actions/trace/tst.str-quiet.r
    M test/unittest/actions/trace/tst.str.d
    M test/unittest/actions/trace/tst.str.r
    M test/unittest/scripting/tst.trace.d
    M test/unittest/trace/tst.misc.d
    M test/unittest/trace/tst.qstring.d
    M test/unittest/trace/tst.string.d

  Log Message:
  -----------
  Add support for string data to the trace() action

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


  Commit: f35847f94a0926674dc2203d017787f803b02190
      https://github.com/oracle/dtrace-utils/commit/f35847f94a0926674dc2203d017787f803b02190
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M test/unittest/actions/trace/err.D_TRACE_DYN.d
    M test/unittest/actions/trace/err.D_TRACE_DYN.r

  Log Message:
  -----------
  Mark dynamic data trace() test as PASS

This test was failing because of a wrong line number in the expected
output.

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


  Commit: 044e05fa14169799bd32ebabfc5d7d6967ebce0e
      https://github.com/oracle/dtrace-utils/commit/044e05fa14169799bd32ebabfc5d7d6967ebce0e
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    A test/unittest/actions/raise/tst.raise1.d
    A test/unittest/actions/raise/tst.raise1.r
    A test/unittest/actions/raise/tst.raise2.d
    A test/unittest/actions/raise/tst.raise2.r
    A test/unittest/actions/raise/tst.raise3.d
    A test/unittest/actions/raise/tst.raise3.r
    A test/unittest/actions/raise/tst.sigdefs.sh
    R test/unittest/raise/tst.raise1.d
    R test/unittest/raise/tst.raise1.r
    R test/unittest/raise/tst.raise2.d
    R test/unittest/raise/tst.raise2.r
    R test/unittest/raise/tst.raise3.d
    R test/unittest/raise/tst.raise3.r
    R test/unittest/raise/tst.sigdefs.sh

  Log Message:
  -----------
  Move raise() tests to unittest/actions/raise with updates

Tests have been updated to not depend on trace() with a string argument.

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


  Commit: 0472f4ec6a12da502132988a26daf4cb50d4f264
      https://github.com/oracle/dtrace-utils/commit/0472f4ec6a12da502132988a26daf4cb50d4f264
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M libdtrace/dt_cc.c

  Log Message:
  -----------
  Fix relocations of 64-bit values

The R_BPF_64_64 relocation in the final linking was truncating 64-bit
values to 32-bits.

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


  Commit: 0e55522a1186da3a8923029b0b870a8a7d1f4a17
      https://github.com/oracle/dtrace-utils/commit/0e55522a1186da3a8923029b0b870a8a7d1f4a17
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M libdtrace/dt_cg.c

  Log Message:
  -----------
  Unify NULL pointer checking in dt_cg_check_notnull()

We need to generate code in multiple places to validate that a pointer
value is not NULL.  This patch introduces the dt_cg_check_notnull()
function to do just that,  Existing checks are replaced by a call to
this function.

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


  Commit: 7c27af0524c23621b76ffe66410c3e8c50853605
      https://github.com/oracle/dtrace-utils/commit/7c27af0524c23621b76ffe66410c3e8c50853605
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M test/unittest/ustack/tst.jstack_unprintable-bug26045010.sh

  Log Message:
  -----------
  Check correctly for status of DTrace job

A test launched a DTrace job in the background and was incorrectly
checking its status.  Specifically, it was passing spuriously.  Fix,
and for now mark XFAIL.

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


  Commit: b1e2f8a21e06bb0ea2adf48627c3475cdc917790
      https://github.com/oracle/dtrace-utils/commit/b1e2f8a21e06bb0ea2adf48627c3475cdc917790
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M test/unittest/stackdepth/tst.value.d
    M test/unittest/stackdepth/tst.value.r.p

  Log Message:
  -----------
  Overhaul the stackdepth value test

This test checks the value of stackdepth by using stack() as a
consistency check.  Address the following shortcomings:

1) The test fires in BEGIN, which no longer has a kernel stack.

2) The test incorrectly counts stack frames.

3) The test passes because neither stack() nor stackdepth is implemented!
(Currently, stack() always reports nothing and stackdepth always 0.)

4) An ERROR in the D script would cause the test to hang.

The corrected test will XFAIL until stack() and stackdepth are implemented.

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


  Commit: 096ca4f130763e172a3cdfb59fdc1d4ca2af0605
      https://github.com/oracle/dtrace-utils/commit/096ca4f130763e172a3cdfb59fdc1d4ca2af0605
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

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

  Log Message:
  -----------
  Aggregations are not data-recording actions

A clause like { @ = count() } should not be data-recording.  The
whole point of aggregations is that we should not have to see output
for every probe firing, even if -q/quiet is turned off.  Nevertheless,
we still have to vet clauses to make sure that, e.g., a clause does
not combine aggregations and speculation.

The reason this problem was not caught earlier is that testing is
typically done in "quiet" mode.

Add a new DT_CLSFLAG_AGGREGATION and split this case off of
DT_CLSFLAG_DATAREC in clause-flag processing.  Add a test for
aggregations that does not use quiet mode.

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


  Commit: 81e99397d581136bbd1d3214e4c76815bac3b84d
      https://github.com/oracle/dtrace-utils/commit/81e99397d581136bbd1d3214e4c76815bac3b84d
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M include/dtrace/options_defines.h
    M libdtrace/dt_cg.c
    M libdtrace/dt_consume.c
    M libdtrace/dt_error.c
    M libdtrace/dt_impl.h
    M libdtrace/dt_open.c
    M libdtrace/dt_options.c
    R test/unittest/stack/tst.default.d
    R test/unittest/stack/tst.default.r
    R test/unittest/stack/tst.default.r.p
    A test/unittest/stack/tst.stack.d
    A test/unittest/stack/tst.stack.r
    A test/unittest/stack/tst.stack.r.p
    A test/unittest/stack/tst.stack3_fbt.aarch64.r
    A test/unittest/stack/tst.stack3_fbt.d
    A test/unittest/stack/tst.stack3_fbt.x
    A test/unittest/stack/tst.stack3_fbt.x86_64.r
    A test/unittest/stack/tst.stack_fbt.aarch64.r
    A test/unittest/stack/tst.stack_fbt.d
    A test/unittest/stack/tst.stack_fbt.x
    A test/unittest/stack/tst.stack_fbt.x86_64.r

  Log Message:
  -----------
  Add support for the stack() action

Implement the stack() action using the bpf_get_stack() helper
function.  This implementation most closely resembles the legacy
DTrace implementation.  Someday it may make sense to switch over
to the bpf_get_stackid() instead, which would allow consolidation
of like stacks.

The max stack size can be controlled by the kernel parameter
perf_event_max_stack, and we would like to allow users to increase
that limit.  We will eventually need to know this limit in various
places.  So, add a dtp->dt_options[DTRACEOPT_MAXFRAMES] value to
store that value.  Since the value is stored as an option, it can
further be reduced below the kernel value by the user.

Change the stack() testing.  Specifically, replace the default
test since BEGIN no longer has a kernel stack.

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


  Commit: 54581a2c209025eaf6ce1cbe1aaf2d466e2d4c0a
      https://github.com/oracle/dtrace-utils/commit/54581a2c209025eaf6ce1cbe1aaf2d466e2d4c0a
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M libdtrace/dt_cg.c
    M libdtrace/dt_consume.c
    A test/unittest/actions/symmod/tst.symmod.sh

  Log Message:
  -----------
  Add support for mod() and sym()

Also add a new test, since existing tests do not yet work.  (They depend
on indexed aggregations.)  Further, the sym() tests are very weak.

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


  Commit: 84606f801d7e1019c7bae94550946be155d69f85
      https://github.com/oracle/dtrace-utils/commit/84606f801d7e1019c7bae94550946be155d69f85
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M bpf/get_bvar.c
    M test/unittest/builtinvar/tst.caller.d
    M test/unittest/builtinvar/tst.caller1.d
    M test/unittest/variables/bvar/tst.caller.d
    A test/unittest/variables/bvar/tst.caller2.d
    A test/unittest/variables/bvar/tst.caller2.r
    A test/unittest/variables/bvar/tst.caller2.r.p

  Log Message:
  -----------
  Add support for built-in variable caller

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


  Commit: c26d66dac37025e36c336699e2c4d0054e4e7c36
      https://github.com/oracle/dtrace-utils/commit/c26d66dac37025e36c336699e2c4d0054e4e7c36
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M bpf/get_bvar.c
    M libdtrace/dt_bpf.c
    M libdtrace/dt_bpf.h
    M libdtrace/dt_cc.c
    M libdtrace/dt_dlibs.c
    R test/unittest/stackdepth/tst.default.d
    R test/unittest/stackdepth/tst.value.d
    R test/unittest/stackdepth/tst.value.r
    R test/unittest/stackdepth/tst.value.r.p
    A test/unittest/variables/bvar/tst.stackdepth2.d
    A test/unittest/variables/bvar/tst.stackdepth2.r
    A test/unittest/variables/bvar/tst.stackdepth2.r.p

  Log Message:
  -----------
  Add support for built-in variable stackdepth

Add space to the "mem" BPF map where we can write a stack of maximum
depth.  (This approach should be replaced eventually with a more general
mechanism for using scratch space.)

Since precompiled BPF code needs to verify the use of the new buffer, we
we make its offset and size available to get_bvar() via STKOFF and STKSIZ.

For DIF_VAR_STACKDEPTH, add code to write the stack and return its length.

Fix test/unittest/stackdepth/tst.value.d:

  *)  Use a probe that has a kernel stack.

  *)  Change the postprocessing to check properly whether a line is empty.

  *)  Remove xfail.

Consolidate stackdepth tests with other built-in-variable tests:

  *)  stackdepth/tst.default.d was already simply a subset of
      variables/bvar/tst.stackdepth.d and so can be deleted.

  *)  stackdepth/tst.value.* is moved to variables/bvar/tst.stackdepth2.*

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


  Commit: b86caa036e4328e8afc089ebd6d3f66b47090e19
      https://github.com/oracle/dtrace-utils/commit/b86caa036e4328e8afc089ebd6d3f66b47090e19
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M libdtrace/dt_cg.c
    M libdtrace/dt_consume.c
    M libdtrace/dt_impl.h
    M libdtrace/dt_open.c
    M test/triggers/Build
    A test/triggers/ustack-tst-basic.c
    R test/unittest/ustack/tst.frames.sh
    A test/unittest/ustack/tst.ustack25_max95_profile.d
    A test/unittest/ustack/tst.ustack25_max95_profile.r
    A test/unittest/ustack/tst.ustack25_pid.d
    A test/unittest/ustack/tst.ustack25_pid.r
    A test/unittest/ustack/tst.ustack25_profile.d
    A test/unittest/ustack/tst.ustack25_profile.r
    A test/unittest/ustack/tst.ustack95_max25_profile.d
    A test/unittest/ustack/tst.ustack95_max25_profile.r
    A test/unittest/ustack/tst.ustack95_profile.d
    A test/unittest/ustack/tst.ustack95_profile.r
    A test/unittest/ustack/tst.ustack95_profile.r.p
    A test/unittest/ustack/tst.ustack_max25_profile.d
    A test/unittest/ustack/tst.ustack_max25_profile.r
    A test/unittest/ustack/tst.ustack_profile.d
    A test/unittest/ustack/tst.ustack_profile.r
    A test/unittest/ustack/tst.ustack_profile.r.p

  Log Message:
  -----------
  Add support for the ustack() action

Stack unwind is very difficult.  Therefore, adapt testing to the safest of
conditions:  probe firing in a stack that we compiled with no optimization,
-fno-omit-frame-pointer, no tail call optimizations, and no leaf function
optimizations.  Further, adapt the test to take better advantage of test
suite infrastructure for triggers and results checking.

The "strsize" argument has no effect.  Its value is silently ignored, and
strsize==0 is assumed.

When a pid entry probe fires, the stack frame is not yet set up.  Therefore,
the immediate caller will be missing from the call stack.

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


  Commit: 865f5fc123d18f919625d4e63b0d9f1bac062c5a
      https://github.com/oracle/dtrace-utils/commit/865f5fc123d18f919625d4e63b0d9f1bac062c5a
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M bpf/get_bvar.c
    M test/unittest/variables/bvar/tst.ucaller.d

  Log Message:
  -----------
  Add support for built-in variable ucaller

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


  Commit: 996b1a6980192a7943d5e187b2ff13f2cfe4e4f0
      https://github.com/oracle/dtrace-utils/commit/996b1a6980192a7943d5e187b2ff13f2cfe4e4f0
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M libdtrace/dt_cg.c
    M libdtrace/dt_consume.c
    A test/unittest/ustack/tst.uaddr.d
    A test/unittest/ustack/tst.uaddr.r
    A test/unittest/ustack/tst.ufunc.d
    A test/unittest/ustack/tst.ufunc.r
    A test/unittest/ustack/tst.umod.d
    A test/unittest/ustack/tst.umod.r
    A test/unittest/ustack/tst.usym.d
    A test/unittest/ustack/tst.usym.r

  Log Message:
  -----------
  Add support for umod(), usym(), and uaddr()

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


  Commit: e48bf6a23522fa93430f51924a6b931c46be2f8a
      https://github.com/oracle/dtrace-utils/commit/e48bf6a23522fa93430f51924a6b931c46be2f8a
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M bpf/get_bvar.c
    M test/triggers/Build
    A test/triggers/ustack-tst-bigstack-spin.c
    M test/unittest/variables/bvar/tst.ustackdepth.d
    A test/unittest/variables/bvar/tst.ustackdepth2.d
    A test/unittest/variables/bvar/tst.ustackdepth2.r
    A test/unittest/variables/bvar/tst.ustackdepth2.r.p
    A test/unittest/variables/bvar/tst.ustackdepth_big.r
    A test/unittest/variables/bvar/tst.ustackdepth_big.r.p
    A test/unittest/variables/bvar/tst.ustackdepth_big.sh
    A test/unittest/variables/bvar/tst.ustackdepth_small.d
    A test/unittest/variables/bvar/tst.ustackdepth_small.r

  Log Message:
  -----------
  Add support for built-in variable ustackdepth

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


  Commit: 26724bc55c194d55d9402ffbb5fef1b8c92bb13a
      https://github.com/oracle/dtrace-utils/commit/26724bc55c194d55d9402ffbb5fef1b8c92bb13a
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M bpf/get_bvar.c
    M libdtrace/dt_cg.c
    M libdtrace/dt_dctx.h
    M libdtrace/dt_prov_syscall.c
    M test/unittest/builtinvar/tst.errno.d
    M test/unittest/builtinvar/tst.errno1.d
    A test/unittest/builtinvar/tst.errno3.r
    A test/unittest/builtinvar/tst.errno3.sh
    M test/unittest/variables/bvar/tst.errno.d

  Log Message:
  -----------
  Add support for built-in variable errno

The built-in variable errno should be:

  *)  the errno for failed system calls for syscall:::return probes

  *)  0 otherwise

The D errno variable is different from the C library errno variable.
Also, the behavior differs from that described in the DTrace Guide,
which allows errno to be non-0 for non-syscall probes.

Introduce an mst->syscall_errno, and have the provider trampolines set
it to 0.  Then have syscall:::return probes check arg0, setting
mst->syscall_errno=-arg0 if the value would be within bounds.  Finally,
have dt_get_bvar() retrieve errno from mst->syscall_errno.

Update tests.  The only particularly meaningful test for errno is
tst.errno2.d, which will not yet work since it still needs other as yet
unsupported features.  Add a tst.errno3.sh test for the new errno support.

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


  Commit: dfae1d2bd145d93688b87f1368f1b951119f9af1
      https://github.com/oracle/dtrace-utils/commit/dfae1d2bd145d93688b87f1368f1b951119f9af1
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M bpf/get_bvar.c
    M libdtrace/dt_bpf.h
    M libdtrace/dt_cc.c
    M libdtrace/dt_dlibs.c
    M test/demo/act/time.d
    M test/unittest/printa/tst.walltimestamp.sh
    M test/unittest/variables/bvar/tst.walltimestamp.d
    A test/unittest/variables/bvar/tst.walltimestamp2.d
    A test/unittest/variables/bvar/tst.walltimestamp2.r
    A test/unittest/variables/bvar/tst.walltimestamp2.r.p

  Log Message:
  -----------
  Add support for built-in variable walltimestamp

In the pre-compiled function get_bvar(), use bpf_ktime_get_ns() to
get the time (in nsec) since boot.  This value is adjusted by adding
the POSIX time when the system was booted.

A few more walltimestamp tests pass now, but existing walltimestamp
tests are rather lenient.  Add a new, more stringent test.  In particular,
timestamp is supposed to be fixed for an entire clause while walltimestamp
is fresh with every call.

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


  Commit: d1d1fc483c5c97080e9639cb407148def08b7474
      https://github.com/oracle/dtrace-utils/commit/d1d1fc483c5c97080e9639cb407148def08b7474
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M libdtrace/dt_program.c
    M test/unittest/dtrace-util/tst.CoalesceTrace.d
    M test/unittest/dtrace-util/tst.ZeroFunctionProbes.sh
    M test/unittest/dtrace-util/tst.ZeroNameProbes.sh
    M test/unittest/dtrace-util/tst.ZeroProviderProbes.sh
    M test/unittest/fbtprovider/tst.functionentry.d
    M test/unittest/fbtprovider/tst.functionreturnvalue.d
    M test/unittest/fbtprovider/tst.ioctlargs.d
    M test/unittest/fbtprovider/tst.offset.d
    M test/unittest/fbtprovider/tst.offsetzero.d
    M test/unittest/fbtprovider/tst.return.d
    M test/unittest/fbtprovider/tst.tls.d
    M test/unittest/fbtprovider/tst.tls2.d

  Log Message:
  -----------
  Fix execution with -Z

This fix addresses the case where a probe definition does not match any
probes.  Another challenging problem is where the matching probes do
not exist yet.  Ultimately, a solution for that greater problem will
also be needed.

With such -Z support, a number of XFAIL tests now can pass.  A few,
however, were relying on architecture-specific probes (e.g., for x64)
and/or certain background activity.  For test completion, add
triggering activities explicitly and, on ARM64, appropriate
architecture-specific probes.

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


  Commit: 3a18407bbad4f040db4ffbd21775ecc91ad0a08e
      https://github.com/oracle/dtrace-utils/commit/3a18407bbad4f040db4ffbd21775ecc91ad0a08e
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M NEWS
    M dtrace.spec

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

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


Compare: https://github.com/oracle/dtrace-utils/compare/14a19501cdee...3a18407bbad4



More information about the DTrace-devel mailing list