oracle / dtrace-utils

DTrace-utils contains the DTrace port to Linux
Other
153 stars 20 forks source link

Do not report unused aggregations #3

Closed euloh closed 1 year ago

euloh commented 3 years ago

Aggregations may be described in a D script but never used (e.g., probes using them never fire). In this case, the aggregations should not be reported.

Consider

        BEGIN {
            x = 1234;
            @a = sum(x);
            exit(0)
        }
        tick-7s {
            @b = min(x);
            @c = max(x)
        }

Aggregation @a will have data, but @b and @c will not. Here is the behavior with DTv1:

                    1234

That is, the sum() aggregation is reported while the min() and max() aggregations, having no data, are not. In contrast, here is DTv2:

        DTrace 2.0.0 [Pre-Release with limited functionality]
                        1234
         9223372036854775807
         -9223372036854775808

Here, the min() and max() aggregations are reported as well.

kvanhees commented 1 year ago

This has been resolved in an earlier release.