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.

Dependency Surface

Detected Declarations

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

Implementation Notes