tools/perf/util/disasm.h
Source file repositories/reference/linux-study-clean/tools/perf/util/disasm.h
File Facts
- System
- Linux kernel
- Corpus path
tools/perf/util/disasm.h- Extension
.h- Size
- 5332 bytes
- Lines
- 171
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: implementation source
- Status
- source implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
map_symbol.hdwarf-aux.h
Detected Declarations
struct annotation_optionsstruct disasm_linestruct insstruct evselstruct symbolstruct data_loc_infostruct type_statestruct disasm_linestruct e_machine_and_e_flagsstruct archstruct insstruct ins_operandsstruct ins_opsstruct annotate_args
Annotated Snippet
struct e_machine_and_e_flags {
uint32_t e_flags;
uint16_t e_machine;
};
struct arch {
/** @name: name such as "x86" or "powerpc". */
const char *name;
const struct ins *instructions;
size_t nr_instructions;
size_t nr_instructions_allocated;
const char *insn_suffix;
unsigned int model;
unsigned int family;
/** @id: ELF machine and flags associated with arch. */
struct e_machine_and_e_flags id;
bool sorted_instructions;
struct {
char comment_char;
char skip_functions_char;
char register_char;
char memory_ref_char;
char imm_char;
} objdump;
bool (*ins_is_fused)(const struct arch *arch, const char *ins1,
const char *ins2);
const struct ins_ops *(*associate_instruction_ops)(struct arch *arch, const char *name);
#ifdef HAVE_LIBDW_SUPPORT
void (*update_insn_state)(struct type_state *state,
struct data_loc_info *dloc, Dwarf_Die *cu_die,
struct disasm_line *dl);
#endif
};
struct ins {
const char *name;
const struct ins_ops *ops;
};
struct ins_operands {
char *raw;
struct {
char *raw;
char *name;
struct symbol *sym;
u64 addr;
s64 offset;
bool offset_avail;
bool outside;
bool multi_regs;
bool mem_ref;
} target;
union {
struct {
char *raw;
char *name;
u64 addr;
bool multi_regs;
bool mem_ref;
} source;
struct {
struct ins ins;
struct ins_operands *ops;
} locked;
struct {
char *raw_comment;
char *raw_func_start;
} jump;
};
};
struct ins_ops {
void (*free)(struct ins_operands *ops);
int (*parse)(const struct arch *arch, struct ins_operands *ops, struct map_symbol *ms,
struct disasm_line *dl);
int (*scnprintf)(const struct ins *ins, char *bf, size_t size,
struct ins_operands *ops, int max_ins_name);
bool is_jump;
bool is_call;
};
struct annotate_args {
const struct arch *arch;
struct map_symbol *ms;
struct annotation_options *options;
s64 offset;
char *line;
int line_nr;
char *fileloc;
};
Annotation
- Immediate include surface: `map_symbol.h`, `dwarf-aux.h`.
- Detected declarations: `struct annotation_options`, `struct disasm_line`, `struct ins`, `struct evsel`, `struct symbol`, `struct data_loc_info`, `struct type_state`, `struct disasm_line`, `struct e_machine_and_e_flags`, `struct arch`.
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.