include/linux/mmdebug.h

Source file repositories/reference/linux-study-clean/include/linux/mmdebug.h

File Facts

System
Linux kernel
Corpus path
include/linux/mmdebug.h
Extension
.h
Size
5087 bytes
Lines
164
Domain
Core OS
Bucket
Core Kernel Interface
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 (unlikely(cond)) {					\
			dump_page(page, "VM_BUG_ON_PAGE(" __stringify(cond)")");\
			BUG();						\
		}							\
	} while (0)
#define VM_BUG_ON_FOLIO(cond, folio)					\
	do {								\
		if (unlikely(cond)) {					\
			dump_page(&folio->page, "VM_BUG_ON_FOLIO(" __stringify(cond)")");\
			BUG();						\
		}							\
	} while (0)
#define VM_BUG_ON_VMA(cond, vma)					\
	do {								\
		if (unlikely(cond)) {					\
			dump_vma(vma);					\
			BUG();						\
		}							\
	} while (0)
#define VM_BUG_ON_MM(cond, mm)						\
	do {								\
		if (unlikely(cond)) {					\
			dump_mm(mm);					\
			BUG();						\
		}							\
	} while (0)
#define VM_WARN_ON_PAGE(cond, page)		({			\
	int __ret_warn = !!(cond);					\
									\
	if (unlikely(__ret_warn)) {					\
		dump_page(page, "VM_WARN_ON_PAGE(" __stringify(cond)")");\
		WARN_ON(1);						\
	}								\
	unlikely(__ret_warn);						\
})
#define VM_WARN_ON_ONCE_PAGE(cond, page)	({			\
	static bool __section(".data..once") __warned;			\
	int __ret_warn_once = !!(cond);					\
									\
	if (unlikely(__ret_warn_once && !__warned)) {			\
		dump_page(page, "VM_WARN_ON_ONCE_PAGE(" __stringify(cond)")");\
		__warned = true;					\
		WARN_ON(1);						\
	}								\
	unlikely(__ret_warn_once);					\
})
#define VM_WARN_ON_FOLIO(cond, folio)		({			\
	int __ret_warn = !!(cond);					\
									\
	if (unlikely(__ret_warn)) {					\
		dump_page(&folio->page, "VM_WARN_ON_FOLIO(" __stringify(cond)")");\
		WARN_ON(1);						\
	}								\
	unlikely(__ret_warn);						\
})
#define VM_WARN_ON_ONCE_FOLIO(cond, folio)	({			\
	static bool __section(".data..once") __warned;			\
	int __ret_warn_once = !!(cond);					\
									\
	if (unlikely(__ret_warn_once && !__warned)) {			\
		dump_page(&folio->page, "VM_WARN_ON_ONCE_FOLIO(" __stringify(cond)")");\
		__warned = true;					\
		WARN_ON(1);						\
	}								\
	unlikely(__ret_warn_once);					\
})
#define VM_WARN_ON_ONCE_MM(cond, mm)		({			\
	static bool __section(".data..once") __warned;			\
	int __ret_warn_once = !!(cond);					\
									\
	if (unlikely(__ret_warn_once && !__warned)) {			\
		dump_mm(mm);						\
		__warned = true;					\
		WARN_ON(1);						\
	}								\
	unlikely(__ret_warn_once);					\
})
#define VM_WARN_ON_ONCE_VMA(cond, vma)		({			\
	static bool __section(".data..once") __warned;			\
	int __ret_warn_once = !!(cond);					\
									\
	if (unlikely(__ret_warn_once && !__warned)) {			\
		dump_vma(vma);						\
		__warned = true;					\
		WARN_ON(1);						\
	}								\
	unlikely(__ret_warn_once);					\
})
#define VM_WARN_ON_VMG(cond, vmg)		({			\
	int __ret_warn = !!(cond);					\

Annotation

Implementation Notes