include/trace/events/mmflags.h

Source file repositories/reference/linux-study-clean/include/trace/events/mmflags.h

File Facts

System
Linux kernel
Corpus path
include/trace/events/mmflags.h
Extension
.h
Size
9360 bytes
Lines
338
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.

Dependency Surface

Detected Declarations

Annotated Snippet

#include <linux/node.h>
#include <linux/mmzone.h>
#include <linux/compaction.h>
/*
 * The order of these masks is important. Matching masks will be seen
 * first and the left over flags will end up showing by themselves.
 *
 * For example, if we have GFP_KERNEL before GFP_USER we wil get:
 *
 *  GFP_KERNEL|GFP_HARDWALL
 *
 * Thus most bits set go first.
 */

/* These define the values that are enums (the bits) */
#define TRACE_GFP_FLAGS_GENERAL			\
	TRACE_GFP_EM(DMA)			\
	TRACE_GFP_EM(HIGHMEM)			\
	TRACE_GFP_EM(DMA32)			\
	TRACE_GFP_EM(MOVABLE)			\
	TRACE_GFP_EM(RECLAIMABLE)		\
	TRACE_GFP_EM(HIGH)			\
	TRACE_GFP_EM(IO)			\
	TRACE_GFP_EM(FS)			\
	TRACE_GFP_EM(ZERO)			\
	TRACE_GFP_EM(DIRECT_RECLAIM)		\
	TRACE_GFP_EM(KSWAPD_RECLAIM)		\
	TRACE_GFP_EM(WRITE)			\
	TRACE_GFP_EM(NOWARN)			\
	TRACE_GFP_EM(RETRY_MAYFAIL)		\
	TRACE_GFP_EM(NOFAIL)			\
	TRACE_GFP_EM(NORETRY)			\
	TRACE_GFP_EM(MEMALLOC)			\
	TRACE_GFP_EM(COMP)			\
	TRACE_GFP_EM(NOMEMALLOC)		\
	TRACE_GFP_EM(HARDWALL)			\
	TRACE_GFP_EM(THISNODE)			\
	TRACE_GFP_EM(ACCOUNT)			\
	TRACE_GFP_EM(ZEROTAGS)

#ifdef CONFIG_KASAN_HW_TAGS
# define TRACE_GFP_FLAGS_KASAN			\
	TRACE_GFP_EM(SKIP_ZERO)			\
	TRACE_GFP_EM(SKIP_KASAN)
#else
# define TRACE_GFP_FLAGS_KASAN
#endif

#ifdef CONFIG_LOCKDEP
# define TRACE_GFP_FLAGS_LOCKDEP		\
	TRACE_GFP_EM(NOLOCKDEP)
#else
# define TRACE_GFP_FLAGS_LOCKDEP
#endif

#ifdef CONFIG_SLAB_OBJ_EXT
# define TRACE_GFP_FLAGS_SLAB			\
	TRACE_GFP_EM(NO_OBJ_EXT)
#else
# define TRACE_GFP_FLAGS_SLAB
#endif

#define TRACE_GFP_FLAGS				\
	TRACE_GFP_FLAGS_GENERAL			\
	TRACE_GFP_FLAGS_KASAN			\
	TRACE_GFP_FLAGS_LOCKDEP			\
	TRACE_GFP_FLAGS_SLAB

#undef TRACE_GFP_EM
#define TRACE_GFP_EM(a) TRACE_DEFINE_ENUM(___GFP_##a##_BIT);

TRACE_GFP_FLAGS

/* Just in case these are ever used */
TRACE_DEFINE_ENUM(___GFP_UNUSED_BIT);
TRACE_DEFINE_ENUM(___GFP_LAST_BIT);

#define gfpflag_string(flag) {(__force unsigned long)flag, #flag}

/*
 * For the values that match the bits, use the TRACE_GFP_FLAGS
 * which will allow any updates to be included automatically.
 */
#undef TRACE_GFP_EM
#define TRACE_GFP_EM(a) gfpflag_string(__GFP_##a),

#define __def_gfpflag_names			\
	gfpflag_string(GFP_TRANSHUGE),		\
	gfpflag_string(GFP_TRANSHUGE_LIGHT),	\
	gfpflag_string(GFP_HIGHUSER_MOVABLE),	\

Annotation

Implementation Notes