tools/perf/util/ftrace.h
Source file repositories/reference/linux-study-clean/tools/perf/util/ftrace.h
File Facts
- System
- Linux kernel
- Corpus path
tools/perf/util/ftrace.h- Extension
.h- Size
- 2133 bytes
- Lines
- 97
- 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
linux/list.htarget.h
Detected Declarations
struct evliststruct hashampstruct statsstruct perf_ftracestruct filter_entryfunction perf_ftrace__latency_prepare_bpffunction perf_ftrace__latency_start_bpffunction perf_ftrace__latency_stop_bpffunction perf_ftrace__latency_read_bpffunction perf_ftrace__latency_cleanup_bpf
Annotated Snippet
struct perf_ftrace {
struct evlist *evlist;
struct target target;
const char *tracer;
struct list_head filters;
struct list_head notrace;
struct list_head graph_funcs;
struct list_head nograph_funcs;
struct list_head event_pair;
struct hashmap *profile_hash;
unsigned long percpu_buffer_size;
bool inherit;
bool use_nsec;
unsigned int bucket_range;
unsigned int min_latency;
unsigned int max_latency;
unsigned int bucket_num;
bool hide_empty;
int graph_depth;
int func_stack_trace;
int func_irq_info;
int graph_args;
int graph_retval;
int graph_retval_hex;
int graph_retaddr;
int graph_nosleep_time;
int graph_noirqs;
int graph_verbose;
int graph_thresh;
int graph_tail;
};
struct filter_entry {
struct list_head list;
char name[];
};
#define NUM_BUCKET 22 /* 20 + 2 (for outliers in both direction) */
#ifdef HAVE_BPF_SKEL
int perf_ftrace__latency_prepare_bpf(struct perf_ftrace *ftrace);
int perf_ftrace__latency_start_bpf(struct perf_ftrace *ftrace);
int perf_ftrace__latency_stop_bpf(struct perf_ftrace *ftrace);
int perf_ftrace__latency_read_bpf(struct perf_ftrace *ftrace,
int buckets[], struct stats *stats);
int perf_ftrace__latency_cleanup_bpf(struct perf_ftrace *ftrace);
#else /* !HAVE_BPF_SKEL */
static inline int
perf_ftrace__latency_prepare_bpf(struct perf_ftrace *ftrace __maybe_unused)
{
return -1;
}
static inline int
perf_ftrace__latency_start_bpf(struct perf_ftrace *ftrace __maybe_unused)
{
return -1;
}
static inline int
perf_ftrace__latency_stop_bpf(struct perf_ftrace *ftrace __maybe_unused)
{
return -1;
}
static inline int
perf_ftrace__latency_read_bpf(struct perf_ftrace *ftrace __maybe_unused,
int buckets[] __maybe_unused,
struct stats *stats __maybe_unused)
{
return -1;
}
static inline int
perf_ftrace__latency_cleanup_bpf(struct perf_ftrace *ftrace __maybe_unused)
{
return -1;
}
#endif /* HAVE_BPF_SKEL */
#endif /* __PERF_FTRACE_H__ */
Annotation
- Immediate include surface: `linux/list.h`, `target.h`.
- Detected declarations: `struct evlist`, `struct hashamp`, `struct stats`, `struct perf_ftrace`, `struct filter_entry`, `function perf_ftrace__latency_prepare_bpf`, `function perf_ftrace__latency_start_bpf`, `function perf_ftrace__latency_stop_bpf`, `function perf_ftrace__latency_read_bpf`, `function perf_ftrace__latency_cleanup_bpf`.
- 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.