From b1d8d968a7983e9756de34b8bcaa24cc339828ed Mon Sep 17 00:00:00 2001 From: Athira Rajeev Date: Thu, 18 Jul 2024 14:13:46 +0530 Subject: [PATCH] perf annotate: Update TYPE_STATE_MAX_REGS to include max of regs in powerpc TYPE_STATE_MAX_REGS is arch-dependent. Currently this is defined to be 16. While checking if reg is valid using has_reg_type, max value is checked using TYPE_STATE_MAX_REGS value. Define this conditionally for powerpc. Reviewed-by: Kajol Jain Reviewed-by: Namhyung Kim Signed-off-by: Athira Rajeev Tested-by: Kajol Jain Cc: Adrian Hunter Cc: Akanksha J N Cc: Christophe Leroy Cc: Disha Goel Cc: Hari Bathini Cc: Ian Rogers Cc: Jiri Olsa Cc: Madhavan Srinivasan Cc: Segher Boessenkool Link: https://lore.kernel.org/lkml/20240718084358.72242-4-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/annotate-data.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/perf/util/annotate-data.h b/tools/perf/util/annotate-data.h index 6fe8ee8b8410..992b7ce4bd11 100644 --- a/tools/perf/util/annotate-data.h +++ b/tools/perf/util/annotate-data.h @@ -189,7 +189,11 @@ struct type_state_stack { }; /* FIXME: This should be arch-dependent */ +#ifdef __powerpc__ +#define TYPE_STATE_MAX_REGS 32 +#else #define TYPE_STATE_MAX_REGS 16 +#endif /* * State table to maintain type info in each register and stack location. -- 2.25.1