[DTrace-devel] [oracle/dtrace-utils] 8b6ebc: cg: rework data size to BPF size conversion and im...

Kris Van Hees noreply at github.com
Fri Sep 1 18:15:41 UTC 2023


  Branch: refs/heads/kvh/2.0-branch-dev
  Home:   https://github.com/oracle/dtrace-utils
  Commit: 8b6ebc45536ade0157a76815a5d28543ddd036aa
      https://github.com/oracle/dtrace-utils/commit/8b6ebc45536ade0157a76815a5d28543ddd036aa
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2023-09-01 (Fri, 01 Sep 2023)

  Changed paths:
    M libdtrace/dt_cg.c

  Log Message:
  -----------
  cg: rework data size to BPF size conversion and improve error reporting

The code generator contains multiple places with an assertion to ensure
that the size of scalar loads and stores is 1, 2, 4, or 8 bytes.  Two
places issued an internal compiler error instead of using an assertion.

All instances of verifying scalar size are now consolidated into a
function that returns the BPF size for the given size if it is valid,
and reports an internal error if not.  New macros (BPF_STOREX, BPF_LOADX,
and BPF_STOREX_IMM) are introduced to allow the passing of a data size
rather than a BPF size.

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





More information about the DTrace-devel mailing list