include/trace/events/filemap.h
Source file repositories/reference/linux-study-clean/include/trace/events/filemap.h
File Facts
- System
- Linux kernel
- Corpus path
include/trace/events/filemap.h- Extension
.h- Size
- 4629 bytes
- Lines
- 203
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/tracepoint.hlinux/mm.hlinux/memcontrol.hlinux/device.hlinux/kdev_t.hlinux/errseq.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 filemap
#if !defined(_TRACE_FILEMAP_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_FILEMAP_H
#include <linux/types.h>
#include <linux/tracepoint.h>
#include <linux/mm.h>
#include <linux/memcontrol.h>
#include <linux/device.h>
#include <linux/kdev_t.h>
#include <linux/errseq.h>
DECLARE_EVENT_CLASS(mm_filemap_op_page_cache,
TP_PROTO(struct folio *folio),
TP_ARGS(folio),
TP_STRUCT__entry(
__field(u64, i_ino)
__field(unsigned long, pfn)
__field(unsigned long, index)
__field(dev_t, s_dev)
__field(unsigned char, order)
),
TP_fast_assign(
__entry->pfn = folio_pfn(folio);
__entry->i_ino = folio->mapping->host->i_ino;
__entry->index = folio->index;
if (folio->mapping->host->i_sb)
__entry->s_dev = folio->mapping->host->i_sb->s_dev;
else
__entry->s_dev = folio->mapping->host->i_rdev;
__entry->order = folio_order(folio);
),
TP_printk("dev %d:%d ino %llx pfn=0x%lx ofs=%lu order=%u",
MAJOR(__entry->s_dev), MINOR(__entry->s_dev),
__entry->i_ino,
__entry->pfn,
__entry->index << PAGE_SHIFT,
__entry->order)
);
DEFINE_EVENT(mm_filemap_op_page_cache, mm_filemap_delete_from_page_cache,
TP_PROTO(struct folio *folio),
TP_ARGS(folio)
);
DEFINE_EVENT(mm_filemap_op_page_cache, mm_filemap_add_to_page_cache,
TP_PROTO(struct folio *folio),
TP_ARGS(folio)
);
DECLARE_EVENT_CLASS(mm_filemap_op_page_cache_range,
TP_PROTO(
struct address_space *mapping,
pgoff_t index,
pgoff_t last_index
),
TP_ARGS(mapping, index, last_index),
TP_STRUCT__entry(
__field(u64, i_ino)
__field(dev_t, s_dev)
__field(unsigned long, index)
__field(unsigned long, last_index)
),
TP_fast_assign(
__entry->i_ino = mapping->host->i_ino;
if (mapping->host->i_sb)
__entry->s_dev =
mapping->host->i_sb->s_dev;
else
__entry->s_dev = mapping->host->i_rdev;
__entry->index = index;
__entry->last_index = last_index;
),
TP_printk(
"dev=%d:%d ino=%llx ofs=%lld-%lld",
MAJOR(__entry->s_dev),
MINOR(__entry->s_dev), __entry->i_ino,
((loff_t)__entry->index) << PAGE_SHIFT,
Annotation
- Immediate include surface: `linux/types.h`, `linux/tracepoint.h`, `linux/mm.h`, `linux/memcontrol.h`, `linux/device.h`, `linux/kdev_t.h`, `linux/errseq.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.