~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/perf/util/disasm.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /tools/perf/util/disasm.h (Architecture sparc64) and /tools/perf/util/disasm.h (Architecture alpha)


  1 // SPDX-License-Identifier: GPL-2.0                 1 // SPDX-License-Identifier: GPL-2.0
  2 #ifndef __PERF_UTIL_DISASM_H                        2 #ifndef __PERF_UTIL_DISASM_H
  3 #define __PERF_UTIL_DISASM_H                        3 #define __PERF_UTIL_DISASM_H
  4                                                     4 
  5 #include "map_symbol.h"                             5 #include "map_symbol.h"
  6                                                     6 
  7 #ifdef HAVE_DWARF_SUPPORT                           7 #ifdef HAVE_DWARF_SUPPORT
  8 #include "dwarf-aux.h"                              8 #include "dwarf-aux.h"
  9 #endif                                              9 #endif
 10                                                    10 
 11 struct annotation_options;                         11 struct annotation_options;
 12 struct disasm_line;                                12 struct disasm_line;
 13 struct ins;                                        13 struct ins;
 14 struct evsel;                                      14 struct evsel;
 15 struct symbol;                                     15 struct symbol;
 16 struct data_loc_info;                              16 struct data_loc_info;
 17 struct type_state;                                 17 struct type_state;
 18 struct disasm_line;                                18 struct disasm_line;
 19                                                    19 
 20 struct arch {                                      20 struct arch {
 21         const char      *name;                     21         const char      *name;
 22         struct ins      *instructions;             22         struct ins      *instructions;
 23         size_t          nr_instructions;           23         size_t          nr_instructions;
 24         size_t          nr_instructions_alloca     24         size_t          nr_instructions_allocated;
 25         struct ins_ops  *(*associate_instructi     25         struct ins_ops  *(*associate_instruction_ops)(struct arch *arch, const char *name);
 26         bool            sorted_instructions;       26         bool            sorted_instructions;
 27         bool            initialized;               27         bool            initialized;
 28         const char      *insn_suffix;              28         const char      *insn_suffix;
 29         void            *priv;                     29         void            *priv;
 30         unsigned int    model;                     30         unsigned int    model;
 31         unsigned int    family;                    31         unsigned int    family;
 32         int             (*init)(struct arch *a     32         int             (*init)(struct arch *arch, char *cpuid);
 33         bool            (*ins_is_fused)(struct     33         bool            (*ins_is_fused)(struct arch *arch, const char *ins1,
 34                                         const      34                                         const char *ins2);
 35         struct          {                          35         struct          {
 36                 char comment_char;                 36                 char comment_char;
 37                 char skip_functions_char;          37                 char skip_functions_char;
 38                 char register_char;                38                 char register_char;
 39                 char memory_ref_char;              39                 char memory_ref_char;
 40                 char imm_char;                     40                 char imm_char;
 41         } objdump;                                 41         } objdump;
 42 #ifdef HAVE_DWARF_SUPPORT                          42 #ifdef HAVE_DWARF_SUPPORT
 43         void            (*update_insn_state)(s     43         void            (*update_insn_state)(struct type_state *state,
 44                                 struct data_lo     44                                 struct data_loc_info *dloc, Dwarf_Die *cu_die,
 45                                 struct disasm_     45                                 struct disasm_line *dl);
 46 #endif                                             46 #endif
 47 };                                                 47 };
 48                                                    48 
 49 struct ins {                                       49 struct ins {
 50         const char     *name;                      50         const char     *name;
 51         struct ins_ops *ops;                       51         struct ins_ops *ops;
 52 };                                                 52 };
 53                                                    53 
 54 struct ins_operands {                              54 struct ins_operands {
 55         char    *raw;                              55         char    *raw;
 56         struct {                                   56         struct {
 57                 char    *raw;                      57                 char    *raw;
 58                 char    *name;                     58                 char    *name;
 59                 struct symbol *sym;                59                 struct symbol *sym;
 60                 u64     addr;                      60                 u64     addr;
 61                 s64     offset;                    61                 s64     offset;
 62                 bool    offset_avail;              62                 bool    offset_avail;
 63                 bool    outside;                   63                 bool    outside;
 64                 bool    multi_regs;                64                 bool    multi_regs;
 65                 bool    mem_ref;                   65                 bool    mem_ref;
 66         } target;                                  66         } target;
 67         union {                                    67         union {
 68                 struct {                           68                 struct {
 69                         char    *raw;              69                         char    *raw;
 70                         char    *name;             70                         char    *name;
 71                         u64     addr;              71                         u64     addr;
 72                         bool    multi_regs;        72                         bool    multi_regs;
 73                         bool    mem_ref;           73                         bool    mem_ref;
 74                 } source;                          74                 } source;
 75                 struct {                           75                 struct {
 76                         struct ins          in     76                         struct ins          ins;
 77                         struct ins_operands *o     77                         struct ins_operands *ops;
 78                 } locked;                          78                 } locked;
 79                 struct {                           79                 struct {
 80                         char    *raw_comment;      80                         char    *raw_comment;
 81                         char    *raw_func_star     81                         char    *raw_func_start;
 82                 } jump;                            82                 } jump;
 83         };                                         83         };
 84 };                                                 84 };
 85                                                    85 
 86 struct ins_ops {                                   86 struct ins_ops {
 87         void (*free)(struct ins_operands *ops)     87         void (*free)(struct ins_operands *ops);
 88         int (*parse)(struct arch *arch, struct     88         int (*parse)(struct arch *arch, struct ins_operands *ops, struct map_symbol *ms,
 89                         struct disasm_line *dl     89                         struct disasm_line *dl);
 90         int (*scnprintf)(struct ins *ins, char     90         int (*scnprintf)(struct ins *ins, char *bf, size_t size,
 91                          struct ins_operands *     91                          struct ins_operands *ops, int max_ins_name);
 92 };                                                 92 };
 93                                                    93 
 94 struct annotate_args {                             94 struct annotate_args {
 95         struct arch               *arch;           95         struct arch               *arch;
 96         struct map_symbol         ms;              96         struct map_symbol         ms;
 97         struct evsel              *evsel;          97         struct evsel              *evsel;
 98         struct annotation_options *options;        98         struct annotation_options *options;
 99         s64                       offset;          99         s64                       offset;
100         char                      *line;          100         char                      *line;
101         int                       line_nr;        101         int                       line_nr;
102         char                      *fileloc;       102         char                      *fileloc;
103 };                                                103 };
104                                                   104 
105 struct arch *arch__find(const char *name);        105 struct arch *arch__find(const char *name);
106 bool arch__is(struct arch *arch, const char *n    106 bool arch__is(struct arch *arch, const char *name);
107                                                   107 
108 struct ins_ops *ins__find(struct arch *arch, c    108 struct ins_ops *ins__find(struct arch *arch, const char *name, struct disasm_line *dl);
109 int ins__scnprintf(struct ins *ins, char *bf,     109 int ins__scnprintf(struct ins *ins, char *bf, size_t size,
110                    struct ins_operands *ops, i    110                    struct ins_operands *ops, int max_ins_name);
111                                                   111 
112 bool ins__is_call(const struct ins *ins);         112 bool ins__is_call(const struct ins *ins);
113 bool ins__is_jump(const struct ins *ins);         113 bool ins__is_jump(const struct ins *ins);
114 bool ins__is_fused(struct arch *arch, const ch    114 bool ins__is_fused(struct arch *arch, const char *ins1, const char *ins2);
115 bool ins__is_nop(const struct ins *ins);          115 bool ins__is_nop(const struct ins *ins);
116 bool ins__is_ret(const struct ins *ins);          116 bool ins__is_ret(const struct ins *ins);
117 bool ins__is_lock(const struct ins *ins);         117 bool ins__is_lock(const struct ins *ins);
118                                                   118 
119 struct disasm_line *disasm_line__new(struct an    119 struct disasm_line *disasm_line__new(struct annotate_args *args);
120 void disasm_line__free(struct disasm_line *dl)    120 void disasm_line__free(struct disasm_line *dl);
121                                                   121 
122 int disasm_line__scnprintf(struct disasm_line     122 int disasm_line__scnprintf(struct disasm_line *dl, char *bf, size_t size,
123                            bool raw, int max_i    123                            bool raw, int max_ins_name);
124                                                   124 
125 int symbol__disassemble(struct symbol *sym, st    125 int symbol__disassemble(struct symbol *sym, struct annotate_args *args);
126                                                   126 
127 #endif /* __PERF_UTIL_DISASM_H */                 127 #endif /* __PERF_UTIL_DISASM_H */
128                                                   128 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php