[DTrace-devel] [PATCH 0/2] Add print() action support

Kris Van Hees kris.van.hees at oracle.com
Fri Nov 17 19:53:37 UTC 2023


Catching up from LPC... comments soon (hopefully later today)

On Fri, Nov 17, 2023 at 11:48:02AM +0000, Alan Maguire via DTrace-devel wrote:
> The print() action supports CTF-powered dumping of data pointed
> to by the argument passed in [1].  This is a useful feature for
> kernel debugging.
> 
> Changes since RFC [2]:
> 
> - Removed unneeded dtrace: from subject, removed passing test resuts,
>   added doc link to [1] in patch 1 (Eugene, patches 1, 2)
> - Fixed output to use the address passed in; this provides a more
>   informative view saying "address 0xfeedfacefeedface is a pointer to
>   struct sk_buff, here's the data".  This also resolves the issue that
>   we were saving the address but not using it.  See patch 1 for output
>   format (Eugene, patch 1).
> - Revamped the register handling in dt_cg.c to be safer as per Eugene's
>   suggestions (Eugene, patch 1)
> - Fixed order of data/size and removed local vars that were unneeded
>   (Eugene, patch 1)
> - Fixed tests to use .d, .r for DTrace script and expected results 
>   instead of stuffing it all in a .sh script (Eugene, patch 2).
> 
> [1] https://docs.oracle.com/en/operating-systems/solaris/oracle-solaris/11.4/dtrace-guide/print-action.html#GUID-533E6BD9-8DE8-474E-9770-96F84244911C
> [2] https://oss.oracle.com/pipermail/dtrace-devel/2023-November/004013.html
> 
> Alan Maguire (1):
>   Add support for the print() action
> 
> Eugene Loh (1):
>   test: Add print() tests
> 
>  include/dtrace/actions_defines.h             |   1 +
>  include/dtrace/options_defines.h             |   3 +-
>  libdtrace/dt_cg.c                            |  58 ++++
>  libdtrace/dt_consume.c                       | 316 +++++++++++++++++++
>  libdtrace/dt_errtags.h                       |   4 +-
>  libdtrace/dt_impl.h                          |   6 +-
>  libdtrace/dt_open.c                          |   2 +
>  libdtrace/dt_options.c                       |  25 ++
>  test/unittest/print/tst.print.local.d        |  45 +++
>  test/unittest/print/tst.print.local.r        |  21 ++
>  test/unittest/print/tst.print.local.trunc.d  |  46 +++
>  test/unittest/print/tst.print.local.trunc.r  |  12 +
>  test/unittest/print/tst.print.local.zeroed.d |  46 +++
>  test/unittest/print/tst.print.local.zeroed.r |   8 +
>  test/unittest/print/tst.print.skb.d          |  19 ++
>  test/unittest/print/tst.print.skb.r          |  14 +
>  16 files changed, 622 insertions(+), 4 deletions(-)
>  create mode 100644 test/unittest/print/tst.print.local.d
>  create mode 100644 test/unittest/print/tst.print.local.r
>  create mode 100644 test/unittest/print/tst.print.local.trunc.d
>  create mode 100644 test/unittest/print/tst.print.local.trunc.r
>  create mode 100644 test/unittest/print/tst.print.local.zeroed.d
>  create mode 100644 test/unittest/print/tst.print.local.zeroed.r
>  create mode 100644 test/unittest/print/tst.print.skb.d
>  create mode 100644 test/unittest/print/tst.print.skb.r
> 
> -- 
> 2.39.3
> 
> 
> _______________________________________________
> DTrace-devel mailing list
> DTrace-devel at oss.oracle.com
> https://oss.oracle.com/mailman/listinfo/dtrace-devel



More information about the DTrace-devel mailing list