include/trace/events/hugetlbfs.h
Source file repositories/reference/linux-study-clean/include/trace/events/hugetlbfs.h
File Facts
- System
- Linux kernel
- Corpus path
include/trace/events/hugetlbfs.h- Extension
.h- Size
- 3737 bytes
- Lines
- 157
- 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/tracepoint.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 hugetlbfs
#if !defined(_TRACE_HUGETLBFS_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_HUGETLBFS_H
#include <linux/tracepoint.h>
TRACE_EVENT(hugetlbfs_alloc_inode,
TP_PROTO(struct inode *inode, struct inode *dir, int mode),
TP_ARGS(inode, dir, mode),
TP_STRUCT__entry(
__field(u64, ino)
__field(u64, dir)
__field(dev_t, dev)
__field(__u16, mode)
),
TP_fast_assign(
__entry->dev = inode->i_sb->s_dev;
__entry->ino = inode->i_ino;
__entry->dir = dir ? dir->i_ino : 0;
__entry->mode = mode;
),
TP_printk("dev %d,%d ino %llu dir %llu mode 0%o",
MAJOR(__entry->dev), MINOR(__entry->dev),
__entry->ino,
__entry->dir, __entry->mode)
);
DECLARE_EVENT_CLASS(hugetlbfs__inode,
TP_PROTO(struct inode *inode),
TP_ARGS(inode),
TP_STRUCT__entry(
__field(u64, ino)
__field(loff_t, size)
__field(blkcnt_t, blocks)
__field(dev_t, dev)
__field(unsigned int, nlink)
__field(unsigned int, seals)
__field(__u16, mode)
),
TP_fast_assign(
__entry->dev = inode->i_sb->s_dev;
__entry->ino = inode->i_ino;
__entry->mode = inode->i_mode;
__entry->size = inode->i_size;
__entry->nlink = inode->i_nlink;
__entry->seals = HUGETLBFS_I(inode)->seals;
__entry->blocks = inode->i_blocks;
),
TP_printk("dev %d,%d ino %llu mode 0%o size %lld nlink %u seals %u blocks %llu",
MAJOR(__entry->dev), MINOR(__entry->dev), __entry->ino,
__entry->mode, __entry->size, __entry->nlink, __entry->seals,
(unsigned long long)__entry->blocks)
);
DEFINE_EVENT(hugetlbfs__inode, hugetlbfs_evict_inode,
TP_PROTO(struct inode *inode),
TP_ARGS(inode)
);
DEFINE_EVENT(hugetlbfs__inode, hugetlbfs_free_inode,
TP_PROTO(struct inode *inode),
TP_ARGS(inode)
);
TRACE_EVENT(hugetlbfs_setattr,
TP_PROTO(struct inode *inode, struct dentry *dentry,
struct iattr *attr),
TP_ARGS(inode, dentry, attr),
TP_STRUCT__entry(
__field(u64, ino)
__field(loff_t, old_size)
Annotation
- Immediate include surface: `linux/tracepoint.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.