include/trace/events/dlm.h

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

File Facts

System
Linux kernel
Corpus path
include/trace/events/dlm.h
Extension
.h
Size
20759 bytes
Lines
675
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

if (kernel_lock) {
			/* return value will be zeroed in those cases by dlm_lock()
			 * we do it here again to not introduce more overhead if
			 * trace isn't running and error reflects the return value.
			 */
			if (error == -EAGAIN || error == -EDEADLK)
				__entry->error = 0;
		}

	),

	TP_printk("ls_id=%u lkb_id=%x mode=%s flags=%s error=%d res_name=%s",
		  __entry->ls_id, __entry->lkb_id,
		  show_lock_mode(__entry->mode),
		  show_lock_flags(__entry->flags), __entry->error,
		  __print_hex_str(__get_dynamic_array(res_name),
				  __get_dynamic_array_len(res_name)))

);

TRACE_EVENT(dlm_bast,

	TP_PROTO(__u32 ls_id, __u32 lkb_id, int mode,
		 const char *res_name, size_t res_length),

	TP_ARGS(ls_id, lkb_id, mode, res_name, res_length),

	TP_STRUCT__entry(
		__field(__u32, ls_id)
		__field(__u32, lkb_id)
		__field(int, mode)
		__dynamic_array(unsigned char, res_name, res_length)
	),

	TP_fast_assign(
		__entry->ls_id = ls_id;
		__entry->lkb_id = lkb_id;
		__entry->mode = mode;

		memcpy(__get_dynamic_array(res_name), res_name,
		       __get_dynamic_array_len(res_name));
	),

	TP_printk("ls_id=%u lkb_id=%x mode=%s res_name=%s",
		  __entry->ls_id, __entry->lkb_id,
		  show_lock_mode(__entry->mode),
		  __print_hex_str(__get_dynamic_array(res_name),
				  __get_dynamic_array_len(res_name)))

);

TRACE_EVENT(dlm_ast,

	TP_PROTO(__u32 ls_id, __u32 lkb_id, __u8 sb_flags, int sb_status,
		 const char *res_name, size_t res_length),

	TP_ARGS(ls_id, lkb_id, sb_flags, sb_status, res_name, res_length),

	TP_STRUCT__entry(
		__field(__u32, ls_id)
		__field(__u32, lkb_id)
		__field(__u8, sb_flags)
		__field(int, sb_status)
		__dynamic_array(unsigned char, res_name, res_length)
	),

	TP_fast_assign(
		__entry->ls_id = ls_id;
		__entry->lkb_id = lkb_id;
		__entry->sb_flags = sb_flags;
		__entry->sb_status = sb_status;

		memcpy(__get_dynamic_array(res_name), res_name,
		       __get_dynamic_array_len(res_name));
	),

	TP_printk("ls_id=%u lkb_id=%x sb_flags=%s sb_status=%d res_name=%s",
		  __entry->ls_id, __entry->lkb_id,
		  show_dlm_sb_flags(__entry->sb_flags), __entry->sb_status,
		  __print_hex_str(__get_dynamic_array(res_name),
				  __get_dynamic_array_len(res_name)))

);

/* note: we begin tracing dlm_unlock_start() only if ls and lkb are found */
TRACE_EVENT(dlm_unlock_start,

	TP_PROTO(struct dlm_ls *ls, struct dlm_lkb *lkb, __u32 flags),

	TP_ARGS(ls, lkb, flags),

Annotation

Implementation Notes