[DTrace-devel] [PATCH 2/2] pid: ignore compiler-generated internal function names

Eugene Loh eugene.loh at oracle.com
Mon Sep 12 18:08:20 UTC 2022


Reviewed-by: Eugene Loh <eugene.loh at oracle.com>

Does a test show the underlying problem?  Would a test be helpful to 
include in this patch?

While two spaces in ".  */" (twice in this patch) sometimes appears in 
our code base, it is much more common to have only one space before the 
"*/".

On 9/12/22 13:04, Kris Van Hees via DTrace-devel wrote:
> Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
> ---
>   libdtrace/dt_pid.c | 8 +++++---
>   1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/libdtrace/dt_pid.c b/libdtrace/dt_pid.c
> index fc338e0f..d6215dcc 100644
> --- a/libdtrace/dt_pid.c
> +++ b/libdtrace/dt_pid.c
> @@ -277,12 +277,14 @@ dt_pid_sym_filt(void *arg, const GElf_Sym *symp, const char *func)
>   		if (strcmp(func, "_init") == 0 || strcmp(func, "_fini") == 0)
>   			return 0;
>   
> -		/*
> -		 * Versioned identifiers are a problem.
> -		 */
> +		/* Versioned identifiers are a problem.  */
>   		if (strchr(func, '@') != NULL)
>   			return 0;
>   
> +		/* Compiler-generated internal identifiers are a problem.  */
> +		if (strchr(func, '.') != NULL)
> +			return 0;
> +
>   		if ((pp->dpp_last_taken = gmatch(func, pp->dpp_func)) != 0) {
>   			pp->dpp_last = *symp;
>   			return dt_pid_per_sym(pp, symp, func);



More information about the DTrace-devel mailing list