[DTrace-devel] [oracle/dtrace-utils] 46931c: Remove dangling char in parse-tree dump

euloh noreply at github.com
Fri Jan 26 05:13:06 UTC 2024


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

  Changed paths:
    M libdtrace/dt_parser.c
    A test/unittest/misc/tst.parser1.sh
    A test/unittest/misc/tst.parser2.sh
    A test/unittest/misc/tst.parser4.sh

  Log Message:
  -----------
  Remove dangling char in parse-tree dump

The dangling ']' had no matching '['.  While we are at it,
introduce a line break in the output to neaten things up and
add some tests for -xtree output.

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


  Commit: 9eee72e48212e929ed6baac659844b71b7b8cf85
      https://github.com/oracle/dtrace-utils/commit/9eee72e48212e929ed6baac659844b71b7b8cf85
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-01-25 (Thu, 25 Jan 2024)

  Changed paths:
    M test/demo/fbt/delay.d
    M test/demo/fbt/putnext.d
    M test/demo/fbt/ssd.d
    M test/demo/fbt/xioctl.d

  Log Message:
  -----------
  test: Add "none" trigger so that D scripts will be executed

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


  Commit: 789d0bc2ed5028a3e7e0f0d35c373138f5b050fd
      https://github.com/oracle/dtrace-utils/commit/789d0bc2ed5028a3e7e0f0d35c373138f5b050fd
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2024-01-25 (Thu, 25 Jan 2024)

  Changed paths:
    M bpf/Build
    A bpf/cleanpath.S
    M libdtrace/dt_cg.c
    M libdtrace/dt_impl.h
    M test/stress/fbtsafety/tst.cleanpath.d
    M test/unittest/dif/cleanpath.d
    M test/unittest/funcs/tst.cleanpath.d
    M test/unittest/funcs/tst.cleanpath.r

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

Common simplifications include:
- replace all "//" with "/"
- replace all "/./" with "/"
- replace all "/foo/.." with "/"
but precise semantics can get tricky in certain cases.

Notice that the results differ in some cases from what was
done in legacy DTrace:

    input string         current patch     legacy DTrace

    "/."                 "/"               "/."
    "a/."                "a"               "a/."
    "./a"                "a"               "./a"

    "../.."              "../.."           "."
    "a/.."               "."               "a"
    "a/../.."            ".."              "a"

    "a/../b"             "b"               "/b"

In the first set, legacy DTrace has unnecessary trailing "." or "/."
or unnecessary leading "./".  They would seem to be wrong.

In the next cases, the legacy results are clearly wrong, not
handling ".." correctly.

In the final case, a relative path is converted into an absolute
path, which is also clearly incorrect.

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


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

  Changed paths:
    M bpf/inet_ntoa6.S
    M libdtrace/dt_bpf.h
    M libdtrace/dt_cc.c
    M libdtrace/dt_dlibs.c

  Log Message:
  -----------
  Make DCTX_RODATA available to BPF functions

Use DCTX_RODATA in inet_ntoa.S.

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


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

  Changed paths:
    M libdtrace/dt_provider_tp.c

  Log Message:
  -----------
  Fix dt_tp_event_info() not to overrun buffer

The parsing code is not resetting p to the beginning of the buffer
and can therefore cause buffer overruns.

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


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

  Changed paths:
    M libdtrace/dt_aggregate.c
    M libdtrace/dt_consume.c
    A test/unittest/aggs/tst.aggpercpu.sh

  Log Message:
  -----------
  Add support for aggpercpu option

The aggpercpu option appears in the documentation.  Further, the
current implementation has vestigial code that suggests the option
was once supported.

On the other hand, its behavior is not particularly described in
the documentation.  Further, it seems the option has no effect on
Solaris or with the legacy Linux implementation.  An easy workaround
is to add cpu as a key to an aggregation;  this workaround makes the
feature superfluous.

Another challenge is that it's hard to know what behavior makes most
sense if aggpercpu is combined with other features.  For quantize()
output, should the same row values be used for all CPUs as for the
overall aggregation?  What should the output format look like if
aggpercpu is combined with a printa() that has multiple aggregations?

Just implement some reasonable version of aggpercpu support and leave
intricate scenarios for the user to handle.

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/65c7605914ea...b1897656147b



More information about the DTrace-devel mailing list