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.
- 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.hintlist.hbuild-id.hprobe-event.hlinux/ctype.hdwarf-aux.hdebuginfo.h
Detected Declarations
struct probe_finderstruct trace_event_finderstruct available_var_finderstruct line_finderfunction is_c_varname
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
- Immediate include surface: `stdbool.h`, `intlist.h`, `build-id.h`, `probe-event.h`, `linux/ctype.h`, `dwarf-aux.h`, `debuginfo.h`.
- Detected declarations: `struct probe_finder`, `struct trace_event_finder`, `struct available_var_finder`, `struct line_finder`, `function is_c_varname`.
- 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.