fs/xfs/xfs_trace.h
Source file repositories/reference/linux-study-clean/fs/xfs/xfs_trace.h
File Facts
- System
- Linux kernel
- Corpus path
fs/xfs/xfs_trace.h- Extension
.h- Size
- 203972 bytes
- Lines
- 6448
- Domain
- Core OS
- Bucket
- VFS And Filesystem Core
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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/tracepoint.htrace/define_trace.h
Detected Declarations
struct xfs_agfstruct xfs_ailstruct xfs_alloc_argstruct xfs_attr_list_contextstruct xfs_buf_log_itemstruct xfs_da_argsstruct xfs_da_node_entrystruct xfs_dquotstruct xfs_log_itemstruct xlogstruct xlog_ticketstruct xlog_recoverstruct xlog_recover_itemstruct xlog_rec_headerstruct xlog_in_corestruct xfs_buf_log_formatstruct xfs_inode_log_formatstruct xfs_bmbt_irecstruct xfs_btree_curstruct xfs_defer_op_typestruct xfs_refcount_irecstruct xfs_fsmapstruct xfs_fsmap_irecstruct xfs_groupstruct xfs_rmap_irecstruct xfs_icreate_logstruct xfs_iunlink_itemstruct xfs_owner_infostruct xfs_trans_resstruct xfs_inobt_rec_incorestruct xfs_dqtrxstruct xfs_icwalkstruct xfs_peragstruct xfbtreestruct xfs_btree_opsstruct xfs_bmap_intentstruct xfs_exchmaps_intentstruct xfs_exchmaps_reqstruct xfs_exchrangestruct xfs_getparentsstruct xfs_parent_irecstruct xfs_attrlist_cursor_kernstruct xfs_extent_free_itemstruct xfs_rmap_intentstruct xfs_refcount_intentstruct xfs_metadir_updatestruct xfs_rtgroupstruct xfs_open_zone
Annotated Snippet
if (mp) {
__entry->dev = mp->m_super->s_dev;
__entry->mflags = mp->m_features;
__entry->opstate = mp->m_opstate;
__entry->sbflags = mp->m_super->s_flags;
}
__entry->caller_ip = caller_ip;
),
TP_printk("dev %d:%d m_features 0x%llx opstate (%s) s_flags 0x%lx caller %pS",
MAJOR(__entry->dev), MINOR(__entry->dev),
__entry->mflags,
__print_flags(__entry->opstate, "|", XFS_OPSTATE_STRINGS),
__entry->sbflags,
__entry->caller_ip)
);
#define DEFINE_FS_EVENT(name) \
DEFINE_EVENT(xfs_fs_class, name, \
TP_PROTO(struct xfs_mount *mp, void *caller_ip), \
TP_ARGS(mp, caller_ip))
DEFINE_FS_EVENT(xfs_inodegc_flush);
DEFINE_FS_EVENT(xfs_inodegc_push);
DEFINE_FS_EVENT(xfs_inodegc_start);
DEFINE_FS_EVENT(xfs_inodegc_stop);
DEFINE_FS_EVENT(xfs_inodegc_queue);
DEFINE_FS_EVENT(xfs_inodegc_throttle);
DEFINE_FS_EVENT(xfs_fs_sync_fs);
DEFINE_FS_EVENT(xfs_blockgc_start);
DEFINE_FS_EVENT(xfs_blockgc_stop);
DEFINE_FS_EVENT(xfs_blockgc_worker);
DEFINE_FS_EVENT(xfs_blockgc_flush_all);
TRACE_EVENT(xfs_inodegc_shrinker_scan,
TP_PROTO(struct xfs_mount *mp, struct shrink_control *sc,
void *caller_ip),
TP_ARGS(mp, sc, caller_ip),
TP_STRUCT__entry(
__field(dev_t, dev)
__field(unsigned long, nr_to_scan)
__field(void *, caller_ip)
),
TP_fast_assign(
__entry->dev = mp->m_super->s_dev;
__entry->nr_to_scan = sc->nr_to_scan;
__entry->caller_ip = caller_ip;
),
TP_printk("dev %d:%d nr_to_scan %lu caller %pS",
MAJOR(__entry->dev), MINOR(__entry->dev),
__entry->nr_to_scan,
__entry->caller_ip)
);
DECLARE_EVENT_CLASS(xfs_ag_class,
TP_PROTO(const struct xfs_perag *pag),
TP_ARGS(pag),
TP_STRUCT__entry(
__field(dev_t, dev)
__field(xfs_agnumber_t, agno)
),
TP_fast_assign(
__entry->dev = pag_mount(pag)->m_super->s_dev;
__entry->agno = pag_agno(pag);
),
TP_printk("dev %d:%d agno 0x%x",
MAJOR(__entry->dev), MINOR(__entry->dev),
__entry->agno)
);
#define DEFINE_AG_EVENT(name) \
DEFINE_EVENT(xfs_ag_class, name, \
TP_PROTO(const struct xfs_perag *pag), \
TP_ARGS(pag))
DEFINE_AG_EVENT(xfs_read_agf);
DEFINE_AG_EVENT(xfs_alloc_read_agf);
DEFINE_AG_EVENT(xfs_read_agi);
DEFINE_AG_EVENT(xfs_ialloc_read_agi);
TRACE_EVENT(xfs_attr_list_node_descend,
TP_PROTO(struct xfs_attr_list_context *ctx,
struct xfs_da_node_entry *btree),
TP_ARGS(ctx, btree),
TP_STRUCT__entry(
__field(dev_t, dev)
__field(xfs_ino_t, ino)
__field(u32, hashval)
__field(u32, blkno)
__field(u32, offset)
__field(void *, buffer)
__field(int, bufsize)
__field(int, count)
Annotation
- Immediate include surface: `linux/tracepoint.h`, `trace/define_trace.h`.
- Detected declarations: `struct xfs_agf`, `struct xfs_ail`, `struct xfs_alloc_arg`, `struct xfs_attr_list_context`, `struct xfs_buf_log_item`, `struct xfs_da_args`, `struct xfs_da_node_entry`, `struct xfs_dquot`, `struct xfs_log_item`, `struct xlog`.
- Atlas domain: Core OS / VFS And Filesystem Core.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.