[DTrace-devel] [oracle/dtrace-utils] 5c89b6: Add kind and arg arguments to dt_aggid_rec_add()

euloh noreply at github.com
Wed Jan 31 20:56:25 UTC 2024


  Branch: refs/heads/devel
  Home:   https://github.com/oracle/dtrace-utils
  Commit: 5c89b640cd120d03c01111540cb9090953c18ea3
      https://github.com/oracle/dtrace-utils/commit/5c89b640cd120d03c01111540cb9090953c18ea3
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-01-31 (Wed, 31 Jan 2024)

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

  Log Message:
  -----------
  Add kind and arg arguments to dt_aggid_rec_add()

To support non-void actions -- such as stack() and func() -- as
keys to aggregations, we will want to be able to specify kind and
arg values to dt_aggid_rec_add().

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


  Commit: bb735727b97420018fc0f2a2d3c06335b903a953
      https://github.com/oracle/dtrace-utils/commit/bb735727b97420018fc0f2a2d3c06335b903a953
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-01-31 (Wed, 31 Jan 2024)

  Changed paths:
    M libdtrace/dt_cg.c

  Log Message:
  -----------
  Handle stack() and ustack() args in a separate function

Currently, dt_cg_act_stack() and dt_cg_act_ustack() generate BPF code
to implement the stack() and ustack() actions.  However, it should also
be possible to use stack() and ustack() as aggregation keys.  So, it
would be nice to move the main work of the code-generation functions
to separate functions that can be used by different callers.

Therefore, start refactoring these cg functions so that what they do
can be invoked by multiple callers.  Here, simply move the handling of
the stack() and ustack() args out into a separate function.  (Actually,
that handling does not even involve any code generation.)

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


  Commit: b0810a4f13a6e36c21751ee32d7a49af37812fe6
      https://github.com/oracle/dtrace-utils/commit/b0810a4f13a6e36c21751ee32d7a49af37812fe6
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-01-31 (Wed, 31 Jan 2024)

  Changed paths:
    M libdtrace/dt_cg.c

  Log Message:
  -----------
  Consolidate bpf_get_stack()-call code generation for stack and ustack()

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


  Commit: 6c9b044762738a40b60ec7d28de163e4ce1c110d
      https://github.com/oracle/dtrace-utils/commit/6c9b044762738a40b60ec7d28de163e4ce1c110d
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-01-31 (Wed, 31 Jan 2024)

  Changed paths:
    M libdtrace/dt_cg.c
    M test/demo/fbt/delay.d
    M test/unittest/aggs/tst.signature.d
    A test/unittest/aggs/tst.stack.d
    A test/unittest/aggs/tst.stack.r
    A test/unittest/aggs/tst.stack.r.p
    A test/unittest/aggs/tst.ustack.d
    A test/unittest/aggs/tst.ustack.r
    M test/unittest/noresolve/tst.uaddr.sh
    M test/unittest/noresolve/tst.usym.sh
    M test/unittest/printa/err.D_PRINTF_ARG_TYPE.stack.d
    M test/unittest/printa/err.D_PRINTF_ARG_TYPE.ustack.d
    A test/unittest/printa/tst.jstack.d
    M test/unittest/printa/tst.stack.d
    A test/unittest/printa/tst.stack.r
    A test/unittest/printa/tst.ustack.d
    M test/unittest/profile-n/tst.func.sh
    M test/unittest/profile-n/tst.mod.sh
    M test/unittest/profile-n/tst.sym.sh
    M test/unittest/profile-n/tst.ufunc.sh
    M test/unittest/profile-n/tst.umod.sh
    M test/unittest/profile-n/tst.usym.sh
    M test/unittest/ustack/tst.mtspin.sh
    M test/unittest/ustack/tst.spin.sh

  Log Message:
  -----------
  Support aggregations of non-void actions

Some actions -- such as stack() and func() -- have non-void actions.
D allows one to use such actions as aggregation keys.  Add such support.

We allow these actions to be keys to aggregations, but not
to associative arrays in order to conform to legacy behavior.
However, lifting this limitation should be easy.

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


Compare: https://github.com/oracle/dtrace-utils/compare/744249d700fc...6c9b04476273



More information about the DTrace-devel mailing list