include/trace/events/readahead.h
Source file repositories/reference/linux-study-clean/include/trace/events/readahead.h
File Facts
- System
- Linux kernel
- Corpus path
include/trace/events/readahead.h- Extension
.h- Size
- 3680 bytes
- Lines
- 133
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: implementation source
- Status
- source implementation candidate
Why This File Exists
Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/tracepoint.hlinux/mm.hlinux/fs.hlinux/pagemap.htrace/define_trace.h
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#undef TRACE_SYSTEM
#define TRACE_SYSTEM readahead
#if !defined(_TRACE_FILEMAP_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_READAHEAD_H
#include <linux/types.h>
#include <linux/tracepoint.h>
#include <linux/mm.h>
#include <linux/fs.h>
#include <linux/pagemap.h>
TRACE_EVENT(page_cache_ra_unbounded,
TP_PROTO(struct inode *inode, pgoff_t index, unsigned long nr_to_read,
unsigned long lookahead_size),
TP_ARGS(inode, index, nr_to_read, lookahead_size),
TP_STRUCT__entry(
__field(u64, i_ino)
__field(dev_t, s_dev)
__field(pgoff_t, index)
__field(unsigned long, nr_to_read)
__field(unsigned long, lookahead_size)
),
TP_fast_assign(
__entry->i_ino = inode->i_ino;
__entry->s_dev = inode->i_sb->s_dev;
__entry->index = index;
__entry->nr_to_read = nr_to_read;
__entry->lookahead_size = lookahead_size;
),
TP_printk(
"dev=%d:%d ino=%llx index=%lu nr_to_read=%lu lookahead_size=%lu",
MAJOR(__entry->s_dev), MINOR(__entry->s_dev), __entry->i_ino,
__entry->index, __entry->nr_to_read, __entry->lookahead_size
)
);
TRACE_EVENT(page_cache_ra_order,
TP_PROTO(struct inode *inode, pgoff_t index, struct file_ra_state *ra),
TP_ARGS(inode, index, ra),
TP_STRUCT__entry(
__field(u64, i_ino)
__field(dev_t, s_dev)
__field(pgoff_t, index)
__field(unsigned int, order)
__field(unsigned int, size)
__field(unsigned int, async_size)
__field(unsigned int, ra_pages)
),
TP_fast_assign(
__entry->i_ino = inode->i_ino;
__entry->s_dev = inode->i_sb->s_dev;
__entry->index = index;
__entry->order = ra->order;
__entry->size = ra->size;
__entry->async_size = ra->async_size;
__entry->ra_pages = ra->ra_pages;
),
TP_printk(
"dev=%d:%d ino=%llx index=%lu order=%u size=%u async_size=%u ra_pages=%u",
MAJOR(__entry->s_dev), MINOR(__entry->s_dev), __entry->i_ino,
__entry->index, __entry->order, __entry->size,
__entry->async_size, __entry->ra_pages
)
);
DECLARE_EVENT_CLASS(page_cache_ra_op,
TP_PROTO(struct inode *inode, pgoff_t index, struct file_ra_state *ra,
unsigned long req_count),
TP_ARGS(inode, index, ra, req_count),
TP_STRUCT__entry(
__field(u64, i_ino)
__field(loff_t, prev_pos)
__field(pgoff_t, index)
__field(unsigned long, req_count)
__field(dev_t, s_dev)
__field(unsigned int, order)
__field(unsigned int, size)
__field(unsigned int, async_size)
__field(unsigned int, ra_pages)
Annotation
- Immediate include surface: `linux/types.h`, `linux/tracepoint.h`, `linux/mm.h`, `linux/fs.h`, `linux/pagemap.h`, `trace/define_trace.h`.
- Atlas domain: Repository Root And Misc / include.
- 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.