Re: [PATCH 4/5] test: Fix antiquated reference to dtrace_ustackdepth_max

Kris Van Hees
2025-10-03T03:56:32Z

On Wed, Oct 01, 2025 at 02:24:17AM -0400, eugene.loh@oracle.com wrote:
> From: Eugene Loh <eugene.loh@oracle.com>
>
> Signed-off-by: Eugene Loh <eugene.loh@oracle.com>

Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>

> ---
> test/triggers/ustack-tst-bigstack.c | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/test/triggers/ustack-tst-bigstack.c b/test/triggers/ustack-tst-bigstack.c
> index e694a518c..267b07e74 100644
> --- a/test/triggers/ustack-tst-bigstack.c
> +++ b/test/triggers/ustack-tst-bigstack.c
> @@ -10,6 +10,10 @@
> #include <unistd.h>
> #include <sys/ioctl.h>
>
> +/*
> + * Create a ridiculously large stack - enough to push us over
> + * the default setting of 'kernel.perf_event_max_stack' (127).
> + */
> int limit = 4096;
>
> int grow1(int);
> @@ -23,14 +27,6 @@ shouldGrow(int frame)
> int
> grow(int frame)
> {
> - /*
> - * Create a ridiculously large stack - enough to push us over
> - * the default setting of 'dtrace_ustackdepth_max' (2048).
> - *
> - * This loop used to repeatedly call getpid(), but on Linux the result
> - * of that call gets cached, so that repeated calls actually do not
> - * trigger a system call anymore. We use ioctl() instead.
> - */
> if (shouldGrow(frame))
> frame = grow1(frame++);
>
> --
> 2.47.3
>