diff options
| author | Alexandre Chartre <alexandre.chartre@oracle.com> | 2025-11-21 10:53:24 +0100 |
|---|---|---|
| committer | Peter Zijlstra <peterz@infradead.org> | 2025-11-21 15:30:11 +0100 |
| commit | 9b580accac003767a461bf52d738ad1ab4e8ccfa (patch) | |
| tree | ede7270a0a23e71e5291886cb659438949607268 /tools/objtool/include | |
| parent | d490aa21973fe66ec35ad825c19f88ac7f7abb27 (diff) | |
objtool: Add functions to better name alternatives
Add the disas_alt_name() and disas_alt_type_name() to provide a
name and a type name for an alternative. This will be used to
better name alternatives when tracing their execution.
Signed-off-by: Alexandre Chartre <alexandre.chartre@oracle.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Josh Poimboeuf <jpoimboe@kernel.org>
Link: https://patch.msgid.link/20251121095340.464045-15-alexandre.chartre@oracle.com
Diffstat (limited to 'tools/objtool/include')
| -rw-r--r-- | tools/objtool/include/objtool/disas.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/objtool/include/objtool/disas.h b/tools/objtool/include/objtool/disas.h index 5db75d06f219..8959d4c45562 100644 --- a/tools/objtool/include/objtool/disas.h +++ b/tools/objtool/include/objtool/disas.h @@ -6,6 +6,7 @@ #ifndef _DISAS_H #define _DISAS_H +struct alternative; struct disas_context; struct disassemble_info; @@ -24,6 +25,8 @@ void disas_print_info(FILE *stream, struct instruction *insn, int depth, void disas_print_insn(FILE *stream, struct disas_context *dctx, struct instruction *insn, int depth, const char *format, ...); +char *disas_alt_name(struct alternative *alt); +const char *disas_alt_type_name(struct instruction *insn); #else /* DISAS */ @@ -61,6 +64,15 @@ static inline void disas_print_info(FILE *stream, struct instruction *insn, static inline void disas_print_insn(FILE *stream, struct disas_context *dctx, struct instruction *insn, int depth, const char *format, ...) {} +static inline char *disas_alt_name(struct alternative *alt) +{ + return NULL; +} + +static inline const char *disas_alt_type_name(struct instruction *insn) +{ + return NULL; +} #endif /* DISAS */ |
