tools/perf/util/annotate.h
Source file repositories/reference/linux-study-clean/tools/perf/util/annotate.h
File Facts
- System
- Linux kernel
- Corpus path
tools/perf/util/annotate.h- Extension
.h- Size
- 16906 bytes
- Lines
- 591
- 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
stdbool.hstdint.hstdio.hlinux/types.hlinux/list.hlinux/rbtree.hasm/bug.hsymbol_conf.hmutex.hspark.hhashmap.hdisasm.hbranch.hevsel.h
Detected Declarations
struct hist_browser_timerstruct hist_entrystruct mapstruct map_symbolstruct addr_map_symbolstruct optionstruct perf_samplestruct symbolstruct annotated_data_typestruct annotation_optionsstruct annotationstruct sym_hist_entrystruct annotation_datastruct cycles_infostruct annotation_linestruct disasm_linestruct annotation_write_opsstruct annotation_print_datastruct sym_histstruct cyc_histstruct annotated_sourcestruct annotated_branchstruct annotated_op_locstruct annotated_insn_locstruct annotated_item_statstruct annotated_basic_blockenum perf_disassemblerenum symbol_disassemble_errnoenum annotated_insn_opsenum annotated_x86_segmentfunction annotation_data__percentfunction disasm_line__has_local_offsetfunction annotation__initfunction annotation__cycles_widthfunction annotation__pcnt_widthfunction annotation_line__filterfunction annotation__br_cntr_widthfunction annotated_source__hist_entry
Annotated Snippet
struct annotation_options {
bool hide_src_code,
hide_src_code_on_title,
use_offset,
jump_arrows,
print_lines,
full_path,
show_linenr,
show_fileloc,
show_nr_jumps,
show_minmax_cycle,
show_asm_raw,
show_br_cntr,
annotate_src,
code_with_type,
full_addr;
u8 offset_level;
u8 disassemblers[MAX_DISASSEMBLERS];
u8 disassembler_used;
int min_pcnt;
int max_lines;
int context;
char *objdump_path;
char *disassembler_style;
const char *prefix;
const char *prefix_strip;
unsigned int percent_type;
};
extern struct annotation_options annotate_opts;
enum {
ANNOTATION__OFFSET_JUMP_TARGETS = 1,
ANNOTATION__OFFSET_CALL,
ANNOTATION__MAX_OFFSET_LEVEL,
};
#define ANNOTATION__MIN_OFFSET_LEVEL ANNOTATION__OFFSET_JUMP_TARGETS
struct annotation;
struct sym_hist_entry {
u64 nr_samples;
u64 period;
};
enum {
PERCENT_HITS_LOCAL,
PERCENT_HITS_GLOBAL,
PERCENT_PERIOD_LOCAL,
PERCENT_PERIOD_GLOBAL,
PERCENT_MAX,
};
struct annotation_data {
double percent[PERCENT_MAX];
double percent_sum;
struct sym_hist_entry he;
};
struct cycles_info {
float ipc;
u64 avg;
u64 max;
u64 min;
};
struct annotation_line {
struct list_head node;
struct rb_node rb_node;
s64 offset;
char *line;
int line_nr;
char *fileloc;
char *path;
struct cycles_info *cycles;
int num_aggr;
int br_cntr_nr;
u64 *br_cntr;
struct evsel *evsel;
int jump_sources;
u32 idx;
int idx_asm;
int data_nr;
struct annotation_data data[];
};
struct disasm_line {
struct ins ins;
struct ins_operands ops;
Annotation
- Immediate include surface: `stdbool.h`, `stdint.h`, `stdio.h`, `linux/types.h`, `linux/list.h`, `linux/rbtree.h`, `asm/bug.h`, `symbol_conf.h`.
- Detected declarations: `struct hist_browser_timer`, `struct hist_entry`, `struct map`, `struct map_symbol`, `struct addr_map_symbol`, `struct option`, `struct perf_sample`, `struct symbol`, `struct annotated_data_type`, `struct annotation_options`.
- 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.