Re: [DTrace-devel] [PATCH] uprobe: do not call populate_args() for pid probes

Eugene Loh <[email protected]>
Newsgroups dev.linux.lists.dtrace
Message-ID <[email protected]>
Reviewed-by: Eugene Loh <[email protected]>

FWIW, with every patch I wonder:  "Are there any test issues?" (Like, 
should we test something here?  Were we?  Etc.)  I assume in this 
particular case, problems were revealed by patch "Fix various memory 
leaks related to stapsdt and usdt probes" on tests
     test/unittest/usdt/tst.pidargmap.sh
     test/unittest/usdt/tst.pidargs.sh
     test/unittest/usdt/tst.pidprobes.sh
The present patch is simply to remediate those revealed problems. To me, 
that sort of information is useful in a commit message.

On 8/13/25 23:58, Kris Van Hees via DTrace-devel wrote:
> Only USDT (regular and is-enabled) probes need populate_args().
>
> Signed-off-by: Kris Van Hees <[email protected]>
> ---
>   libdtrace/dt_prov_uprobe.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/libdtrace/dt_prov_uprobe.c b/libdtrace/dt_prov_uprobe.c
> index c63d58383..605ae8397 100644
> --- a/libdtrace/dt_prov_uprobe.c
> +++ b/libdtrace/dt_prov_uprobe.c
> @@ -994,8 +994,10 @@ static dt_probe_t *create_underlying(dtrace_hdl_t *dtp,
>   		 */
>   	}
>   
> -	if (populate_args(dtp, psp, upp) < 0)
> -		goto fail;
> +	if (upp->flags & (PP_IS_ENABLED | PP_IS_USDT)) {
> +		if (populate_args(dtp, psp, upp) < 0)
> +			goto fail;
> +	}
>   
>   	return uprp;
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.