[DTrace-devel] [oracle/dtrace-utils] fa06cd: Implement normalize() and denormalize()

Kris Van Hees noreply at github.com
Thu Feb 11 12:31:55 PST 2021


  Branch: refs/heads/dev
  Home:   https://github.com/oracle/dtrace-utils
  Commit: fa06cdf01a8e983d71d38ff078366c1e85367e94
      https://github.com/oracle/dtrace-utils/commit/fa06cdf01a8e983d71d38ff078366c1e85367e94
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-02-08 (Mon, 08 Feb 2021)

  Changed paths:
    M libdtrace/dt_aggregate.c
    M libdtrace/dt_cg.c
    M libdtrace/dt_consume.c
    M libdtrace/dt_open.c
    M libdtrace/dtrace.h
    R test/unittest/aggs/err.D_NORMALIZE_AGGARG.bad.d
    A test/unittest/aggs/err.D_NORMALIZE_AGGARG.denorm_no_agg.d
    A test/unittest/aggs/err.D_NORMALIZE_AGGARG.norm_no_agg.d
    R test/unittest/aggs/err.D_NORMALIZE_PROTO.bad.d
    R test/unittest/aggs/err.D_NORMALIZE_SCALAR.bad.d
    A test/unittest/aggs/err.D_PROTO_ARG.norm_non_scalar_normal.d
    A test/unittest/aggs/err.D_PROTO_LEN.denorm_too_few_args.d
    A test/unittest/aggs/err.D_PROTO_LEN.denorm_too_many_args.d
    A test/unittest/aggs/err.D_PROTO_LEN.norm_too_few_args.d
    A test/unittest/aggs/err.D_PROTO_LEN.norm_too_many_args.d
    M test/unittest/aggs/tst.denormalize.d
    M test/unittest/aggs/tst.denormalize.r
    M test/unittest/aggs/tst.normalize.d
    M test/unittest/aggs/tst.normalize.r
    A test/unittest/aggs/tst.normalize_multiple_times.d
    A test/unittest/aggs/tst.normalize_multiple_times.r

  Log Message:
  -----------
  Implement normalize() and denormalize()

The implementation follows the legacy implementation.  One adjustment
that was needed is to retrieve the aggregation data snapshot from
dt_normalize() to ensure that we have the latest data to work on.  This
is needed due to the on-demand data retrieval that the new aggregation
implementation uses.

Tests are simplified to specifically test the functionality they are
intended for, and some tests are added to cover gaps in the testing of
normalize() and denormalize().

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


  Commit: d6032e59f3292a2f4220e3d23cf85d30b2585135
      https://github.com/oracle/dtrace-utils/commit/d6032e59f3292a2f4220e3d23cf85d30b2585135
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-02-08 (Mon, 08 Feb 2021)

  Changed paths:
    M libdtrace/dt_cg.c
    M libdtrace/dt_cg.h
    M libdtrace/dt_prov_dtrace.c
    M libdtrace/dt_prov_fbt.c
    M libdtrace/dt_prov_profile.c
    M libdtrace/dt_prov_sdt.c
    M libdtrace/dt_prov_syscall.c

  Log Message:
  -----------
  Use pcb_exitlbl in trampoline instead of allocating a label

Clauses used to be compiled into their own program, with a trampoline
prologue and epilogue surrounding the actual clause implementation.
This required a specific exit label to be allocated for use in the
trampoline because the compiler-generated label (pcb_exitlbl) was
specific to the clause implementation.

Now that clauses are compiled into proper functions, and the trampoline
is its own function (the main program function), the trampoline specific
exit label is no longer needed.  We can use the compiler-generated label
(pcb_exitlbl) instead.

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


  Commit: 54f9e7eb87311d4421ba10da0ff8e1ce14862f73
      https://github.com/oracle/dtrace-utils/commit/54f9e7eb87311d4421ba10da0ff8e1ce14862f73
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-02-08 (Mon, 08 Feb 2021)

  Changed paths:
    M include/dtrace/difo.h
    M include/dtrace/difo_defines.h
    M libdtrace/dt_as.c
    M libdtrace/dt_cc.c

  Log Message:
  -----------
  Allow DIFOs to have a variety of flags

DIFOs could be flagged as containing destructive operations using the
specific dtdo_destructive field in dtrace_difo_t.  There is a need for
other flags to be associated with DIFOs, so the dtdo_destructive field
is being changed into a dtdo_flags field.  DTDOFLG_* constants in
difo_defines.h provide the flags that can be set and checked for.

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


  Commit: 1c789f4d8123b8b169a9f909a397c37b428367c5
      https://github.com/oracle/dtrace-utils/commit/1c789f4d8123b8b169a9f909a397c37b428367c5
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-02-08 (Mon, 08 Feb 2021)

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

  Log Message:
  -----------
  Add workstatus error conditions

The processing of perf event output buffer data can fail in a few
different ways, all leading to returning DTRACE_WORKSTATUS_ERROR.
In order to better troubleshoot such issues we add two new DTrace
error codes:

- EDT_DSIZE: Data record has an incorrect size
- EDT_BADEPID: Data record contains an invalid EPID

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


  Commit: 4351e01cc207b0259bc9711fb0881f8516ccad85
      https://github.com/oracle/dtrace-utils/commit/4351e01cc207b0259bc9711fb0881f8516ccad85
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-02-08 (Mon, 08 Feb 2021)

  Changed paths:
    M libdtrace/dt_bpf.h
    M libdtrace/dt_cc.c
    M libdtrace/dt_cg.c
    M libdtrace/dt_dctx.h
    M libdtrace/dt_dlibs.c

  Log Message:
  -----------
  Record clause id in mstate

Support for the ERROR probe requires a per-probe unique id to identify
the clause the ERROR probe was triggered from.  Add a clid member to
the machine state, and initialize it in the prologue.

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


  Commit: e3b9157fc702331d3b2d10ead5db646b16b7e2c6
      https://github.com/oracle/dtrace-utils/commit/e3b9157fc702331d3b2d10ead5db646b16b7e2c6
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-02-08 (Mon, 08 Feb 2021)

  Changed paths:
    M libdtrace/dt_dis.c

  Log Message:
  -----------
  Add support for R_BPF_NONE in the disassembler

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


  Commit: c2300735046dff9ea9c62e2fb2ddd049848fae47
      https://github.com/oracle/dtrace-utils/commit/c2300735046dff9ea9c62e2fb2ddd049848fae47
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2021-02-08 (Mon, 08 Feb 2021)

  Changed paths:
    M libdtrace/dt_cc.c
    M libdtrace/dt_dis.c
    M libdtrace/dt_impl.h

  Log Message:
  -----------
  Report clause function name in disassembly listing if known

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/43119887e9ff...c2300735046d



More information about the DTrace-devel mailing list