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.

Dependency Surface

Detected Declarations

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

Implementation Notes