On Mon, Jan 19, 2026 at 8:53 AM Tomas Glozar <[email protected]> wrote:
>
> In the current implementation, the auto-analysis code for printing the
> stack captured in the tracefs buffer of the aa instance stops at the
> first encountered address that cannot be resolved into a function
> symbol.
>
> This is not always the desired behavior on all platforms; sometimes,
> there might be resolvable entries after unresolvable ones, and
> sometimes, the user might want to inspect the raw pointers for the
> unresolvable entries.
>
> Add a new option, --stack-format, with three values:
>
> - truncate: stop at first unresolvable entry. This is the current
> behavior, and is kept as the default.
> - skip: skip unresolvable entries, but do not stop on them.
> - full: print all entries, including unresolvable ones.
>
> To make this work, the "size" field of the stack entry is now also read
> and used as the maximum number of entries to print, capped at 64, since
> that is the fixed length of the "caller" field.
>
[...]
> +int parse_stack_format(char *arg)
> +{
For the sake of function interface, it would be better to
parse_stack_format() return enum stack_format...
> + if (!strcmp(arg, "truncate"))
> + return STACK_FORMAT_TRUNCATE;
> + if (!strcmp(arg, "skip"))
> + return STACK_FORMAT_SKIP;
> + if (!strcmp(arg, "full"))
> + return STACK_FORMAT_FULL;
> +
> + debug_msg("Error parsing the stack format %s\n", arg);
> + return -1;
... and add a new entry to the enum STACK_FORMAT_INVALID = -1...
> +}
> +
> /*
> * parse_duration - parse duration with s/m/h/d suffix converting it to
> seconds
> */
> diff --git a/tools/tracing/rtla/src/utils.h b/tools/tracing/rtla/src/utils.h
> index f7c2a52a0ab5..80d5ec0cf934 100644
> --- a/tools/tracing/rtla/src/utils.h
> +++ b/tools/tracing/rtla/src/utils.h
> @@ -62,8 +62,15 @@ struct sched_attr {
> };
> #endif /* SCHED_ATTR_SIZE_VER0 */
>
> +enum stack_format {
> + STACK_FORMAT_TRUNCATE,
> + STACK_FORMAT_SKIP,
> + STACK_FORMAT_FULL
... here
[...]