tools/perf/util/probe-event.h

Source file repositories/reference/linux-study-clean/tools/perf/util/probe-event.h

File Facts

System
Linux kernel
Corpus path
tools/perf/util/probe-event.h
Extension
.h
Size
6421 bytes
Lines
200
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 probe_conf {
	bool	show_ext_vars;
	bool	show_location_range;
	bool	force_add;
	bool	no_inlines;
	bool	cache;
	bool	bootconfig;
	int	max_probes;
	unsigned long	magic_num;
};
extern struct probe_conf probe_conf;
extern bool probe_event_dry_run;

#define DEFAULT_PROBE_MAGIC_NUM	0xdeade12d	/* u32: 3735937325 */

struct symbol;

/* kprobe-tracer and uprobe-tracer tracing point */
struct probe_trace_point {
	char		*realname;	/* function real name (if needed) */
	char		*symbol;	/* Base symbol */
	char		*module;	/* Module name */
	unsigned long	offset;		/* Offset from symbol */
	unsigned long	ref_ctr_offset;	/* SDT reference counter offset */
	u64		address;	/* Actual address of the trace point */
	bool		retprobe;	/* Return probe flag */
};

/* probe-tracer tracing argument referencing offset */
struct probe_trace_arg_ref {
	struct probe_trace_arg_ref	*next;	/* Next reference */
	long				offset;	/* Offset value */
	bool				user_access;	/* User-memory access */
};

/* kprobe-tracer and uprobe-tracer tracing argument */
struct probe_trace_arg {
	char				*name;	/* Argument name */
	char				*value;	/* Base value */
	char				*type;	/* Type name */
	struct probe_trace_arg_ref	*ref;	/* Referencing offset */
};

/* kprobe-tracer and uprobe-tracer tracing event (point + arg) */
struct probe_trace_event {
	char				*event;	/* Event name */
	char				*group;	/* Group name */
	struct probe_trace_point	point;	/* Trace point */
	int				nargs;	/* Number of args */
	int				lang;	/* Dwarf language code */
	bool				uprobes;	/* uprobes only */
	struct probe_trace_arg		*args;	/* Arguments */
};

/* Perf probe probing point */
struct perf_probe_point {
	char		*file;		/* File path */
	char		*function;	/* Function name */
	int		line;		/* Line number */
	bool		retprobe;	/* Return probe flag */
	char		*lazy_line;	/* Lazy matching pattern */
	unsigned long	offset;		/* Offset from function entry */
	u64		abs_address;	/* Absolute address of the point */
};

/* Perf probe probing argument field chain */
struct perf_probe_arg_field {
	struct perf_probe_arg_field	*next;	/* Next field */
	char				*name;	/* Name of the field */
	long				index;	/* Array index number */
	bool				ref;	/* Referencing flag */
};

/* Perf probe probing argument */
struct perf_probe_arg {
	char				*name;	/* Argument name */
	char				*var;	/* Variable name */
	char				*type;	/* Type name */
	struct perf_probe_arg_field	*field;	/* Structure fields */
	bool				user_access;	/* User-memory access */
};

/* Perf probe probing event (point + arg) */
struct perf_probe_event {
	char			*event;	/* Event name */
	char			*group;	/* Group name */
	struct perf_probe_point	point;	/* Probe point */
	int			nargs;	/* Number of arguments */
	bool			sdt;	/* SDT/cached event flag */
	bool			uprobes;	/* Uprobe event flag */

Annotation

Implementation Notes