tools/perf/util/block-range.h
Source file repositories/reference/linux-study-clean/tools/perf/util/block-range.h
File Facts
- System
- Linux kernel
- Corpus path
tools/perf/util/block-range.h- Extension
.h- Size
- 1714 bytes
- Lines
- 77
- 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.hlinux/rbtree.hlinux/types.h
Detected Declarations
struct symbolstruct block_rangestruct block_range_iterfunction block_range_iter__nextfunction block_range_iter__valid
Annotated Snippet
struct block_range {
struct rb_node node;
struct symbol *sym;
u64 start;
u64 end;
int is_target, is_branch;
u64 coverage;
u64 entry;
u64 taken;
u64 pred;
};
static inline struct block_range *block_range__next(struct block_range *br)
{
struct rb_node *n = rb_next(&br->node);
if (!n)
return NULL;
return rb_entry(n, struct block_range, node);
}
struct block_range_iter {
struct block_range *start;
struct block_range *end;
};
static inline struct block_range *block_range_iter(struct block_range_iter *iter)
{
return iter->start;
}
static inline bool block_range_iter__next(struct block_range_iter *iter)
{
if (iter->start == iter->end)
return false;
iter->start = block_range__next(iter->start);
return true;
}
static inline bool block_range_iter__valid(struct block_range_iter *iter)
{
if (!iter->start || !iter->end)
return false;
return true;
}
extern struct block_range *block_range__find(u64 addr);
extern struct block_range_iter block_range__create(u64 start, u64 end);
extern double block_range__coverage(struct block_range *br);
#endif /* __PERF_BLOCK_RANGE_H */
Annotation
- Immediate include surface: `stdbool.h`, `linux/rbtree.h`, `linux/types.h`.
- Detected declarations: `struct symbol`, `struct block_range`, `struct block_range_iter`, `function block_range_iter__next`, `function block_range_iter__valid`.
- 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.