tools/perf/util/dlfilter.h
Source file repositories/reference/linux-study-clean/tools/perf/util/dlfilter.h
File Facts
- System
- Linux kernel
- Corpus path
tools/perf/util/dlfilter.h- Extension
.h- Size
- 2696 bytes
- Lines
- 100
- 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
- No C-style include directives detected by the generator.
Detected Declarations
struct perf_sessionstruct perf_samplestruct evselstruct machinestruct addr_locationstruct perf_dlfilter_fnsstruct perf_dlfilter_samplestruct perf_dlfilter_alstruct dlfilterfunction dlfilter__filter_eventfunction dlfilter__filter_event_early
Annotated Snippet
struct dlfilter {
char *file;
void *handle;
void *data;
struct perf_session *session;
bool ctx_valid;
bool in_start;
bool in_stop;
int dlargc;
char **dlargv;
union perf_event *event;
struct perf_sample *sample;
struct evsel *evsel;
struct machine *machine;
struct addr_location *al;
struct addr_location *addr_al;
struct perf_dlfilter_sample *d_sample;
struct perf_dlfilter_al *d_ip_al;
struct perf_dlfilter_al *d_addr_al;
int (*start)(void **data, void *ctx);
int (*stop)(void *data, void *ctx);
int (*filter_event)(void *data,
const struct perf_dlfilter_sample *sample,
void *ctx);
int (*filter_event_early)(void *data,
const struct perf_dlfilter_sample *sample,
void *ctx);
struct perf_dlfilter_fns *fns;
};
struct dlfilter *dlfilter__new(const char *file, int dlargc, char **dlargv);
int dlfilter__start(struct dlfilter *d, struct perf_session *session);
int dlfilter__do_filter_event(struct dlfilter *d,
union perf_event *event,
struct perf_sample *sample,
struct evsel *evsel,
struct machine *machine,
struct addr_location *al,
struct addr_location *addr_al,
bool early);
void dlfilter__cleanup(struct dlfilter *d);
static inline int dlfilter__filter_event(struct dlfilter *d,
union perf_event *event,
struct perf_sample *sample,
struct evsel *evsel,
struct machine *machine,
struct addr_location *al,
struct addr_location *addr_al)
{
if (!d || !d->filter_event)
return 0;
return dlfilter__do_filter_event(d, event, sample, evsel, machine, al, addr_al, false);
}
static inline int dlfilter__filter_event_early(struct dlfilter *d,
union perf_event *event,
struct perf_sample *sample,
struct evsel *evsel,
struct machine *machine,
struct addr_location *al,
struct addr_location *addr_al)
{
if (!d || !d->filter_event_early)
return 0;
return dlfilter__do_filter_event(d, event, sample, evsel, machine, al, addr_al, true);
}
int list_available_dlfilters(const struct option *opt, const char *s, int unset);
bool get_filter_desc(const char *dirname, const char *name, char **desc,
char **long_desc);
#endif
Annotation
- Detected declarations: `struct perf_session`, `struct perf_sample`, `struct evsel`, `struct machine`, `struct addr_location`, `struct perf_dlfilter_fns`, `struct perf_dlfilter_sample`, `struct perf_dlfilter_al`, `struct dlfilter`, `function dlfilter__filter_event`.
- 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.