[DTrace-devel] [PATCH 2/9] Remove dangling char in parse-tree dump

Kris Van Hees kris.van.hees at oracle.com
Thu Dec 21 06:09:24 UTC 2023


On Thu, Oct 05, 2023 at 05:14:00PM -0400, eugene.loh at oracle.com wrote:
> 
> Signed-off-by: Eugene Loh <eugene.loh at oracle.com>

Two things:
- Can you add a test for this?  It is a long standing bug but it is possible to
  test for this by generating -xtree output and looking for the offending
  pattern.
- Perhaps you can include further cleanup of the aggregation output in the
  parse tree?  I.e. after the '%*s] =' a newline should probably be added so
  that the aggregation function gets printed with proper indentation starting
  on its own line rather than after the ] = with a bunch of spaces in between.
  You may also want to just check to see if the overall output look decent with
  such changes (and tweak whatever else might need tweaking - hopefully none
  are needed).
  
> ---
>  libdtrace/dt_parser.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/libdtrace/dt_parser.c b/libdtrace/dt_parser.c
> index beb94676..5b2b552b 100644
> --- a/libdtrace/dt_parser.c
> +++ b/libdtrace/dt_parser.c
> @@ -5055,9 +5055,6 @@ dt_node_printr(dt_node_t *dnp, FILE *fp, int depth)
>  			dt_node_printr(dnp->dn_aggfun, fp, depth + 1);
>  		} else
>  			fprintf(fp, "%*s]\n", depth * 2, "");
> -
> -		if (dnp->dn_aggfun)
> -			fprintf(fp, "%*s)\n", depth * 2, "");
>  		break;
>  
>  	case DT_NODE_PDESC:
> -- 
> 2.18.4
> 
> 



More information about the DTrace-devel mailing list