include/trace/events/ksm.h

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

File Facts

System
Linux kernel
Corpus path
include/trace/events/ksm.h
Extension
.h
Size
6165 bytes
Lines
285
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

#undef TRACE_SYSTEM
#define TRACE_SYSTEM ksm

#if !defined(_TRACE_KSM_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_KSM_H

#include <linux/tracepoint.h>

/**
 * ksm_scan_template - called for start / stop scan
 *
 * @seq:		sequence number of scan
 * @rmap_entries:	actual number of rmap entries
 *
 * Allows to trace the start / stop of a ksm scan.
 */
DECLARE_EVENT_CLASS(ksm_scan_template,

	TP_PROTO(int seq, u32 rmap_entries),

	TP_ARGS(seq, rmap_entries),

	TP_STRUCT__entry(
		__field(int,	seq)
		__field(u32,	rmap_entries)
	),

	TP_fast_assign(
		__entry->seq		= seq;
		__entry->rmap_entries	= rmap_entries;
	),

	TP_printk("seq %d rmap size %d",
			__entry->seq, __entry->rmap_entries)
);

/**
 * ksm_start_scan - called after a new ksm scan is started
 *
 * @seq:		sequence number of scan
 * @rmap_entries:	actual number of rmap entries
 *
 * Allows to trace the start of a ksm scan.
 */
DEFINE_EVENT(ksm_scan_template, ksm_start_scan,

	TP_PROTO(int seq, u32 rmap_entries),

	TP_ARGS(seq, rmap_entries)
);

/**
 * ksm_stop_scan - called after a new ksm scan has completed
 *
 * @seq:		sequence number of scan
 * @rmap_entries:	actual number of rmap entries
 *
 * Allows to trace the completion of a ksm scan.
 */
DEFINE_EVENT(ksm_scan_template, ksm_stop_scan,

	TP_PROTO(int seq, u32 rmap_entries),

	TP_ARGS(seq, rmap_entries)
);

/**
 * ksm_enter - called after a new process has been added / removed from ksm
 *
 * @mm:			address of the mm object of the process
 *
 * Allows to trace the when a process has been added or removed from ksm.
 */
DECLARE_EVENT_CLASS(ksm_enter_exit_template,

	TP_PROTO(void *mm),

	TP_ARGS(mm),

	TP_STRUCT__entry(
		__field(void *,		mm)
	),

	TP_fast_assign(
		__entry->mm	= mm;
	),

	TP_printk("mm %p", __entry->mm)
);

Annotation

Implementation Notes