tools/perf/util/probe-finder.h

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

File Facts

System
Linux kernel
Corpus path
tools/perf/util/probe-finder.h
Extension
.h
Size
3353 bytes
Lines
115
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_finder {
	struct perf_probe_event	*pev;		/* Target probe event */
	struct debuginfo	*dbg;

	/* Callback when a probe point is found */
	int (*callback)(Dwarf_Die *sc_die, struct probe_finder *pf);

	/* For function searching */
	int			lno;		/* Line number */
	Dwarf_Addr		addr;		/* Address */
	const char		*fname;		/* Real file name */
	Dwarf_Die		cu_die;		/* Current CU */
	Dwarf_Die		sp_die;
	Dwarf_Off		abstrace_dieoffset;
	struct intlist		*lcache;	/* Line cache for lazy match */

	/* For variable searching */
	/* Call Frame Information from .eh_frame. Owned by this struct. */
	Dwarf_CFI		*cfi_eh;
	/* Call Frame Information from .debug_frame. Not owned. */
	Dwarf_CFI		*cfi_dbg;
	Dwarf_Op		*fb_ops;	/* Frame base attribute */
	unsigned int		e_machine;	/* ELF target machine arch */
	unsigned int		e_flags;	/* ELF target machine flags */
	struct perf_probe_arg	*pvar;		/* Current target variable */
	struct probe_trace_arg	*tvar;		/* Current result variable */
	bool			skip_empty_arg;	/* Skip non-exist args */
};

struct trace_event_finder {
	struct probe_finder	pf;
	Dwfl_Module		*mod;		/* For solving symbols */
	struct probe_trace_event *tevs;		/* Found trace events */
	int			ntevs;		/* Number of trace events */
	int			max_tevs;	/* Max number of trace events */
};

struct available_var_finder {
	struct probe_finder	pf;
	Dwfl_Module		*mod;		/* For solving symbols */
	struct variable_list	*vls;		/* Found variable lists */
	int			nvls;		/* Number of variable lists */
	int			max_vls;	/* Max no. of variable lists */
	bool			child;		/* Search child scopes */
};

struct line_finder {
	struct line_range	*lr;		/* Target line range */

	const char		*fname;		/* File name */
	int			lno_s;		/* Start line number */
	int			lno_e;		/* End line number */
	Dwarf_Die		cu_die;		/* Current CU */
	Dwarf_Die		sp_die;
	int			found;
};

#else
#define is_known_C_lang(lang) (false)
#endif /* HAVE_LIBDW_SUPPORT */

#endif /*_PROBE_FINDER_H */

Annotation

Implementation Notes