include/trace/events/iocost.h

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

File Facts

System
Linux kernel
Corpus path
include/trace/events/iocost.h
Extension
.h
Size
6292 bytes
Lines
226
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 iocost

struct ioc;
struct ioc_now;
struct ioc_gq;

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

#include <linux/tracepoint.h>

DECLARE_EVENT_CLASS(iocost_iocg_state,

	TP_PROTO(struct ioc_gq *iocg, const char *path, struct ioc_now *now,
		u64 last_period, u64 cur_period, u64 vtime),

	TP_ARGS(iocg, path, now, last_period, cur_period, vtime),

	TP_STRUCT__entry (
		__string(devname, ioc_name(iocg->ioc))
		__string(cgroup, path)
		__field(u64, now)
		__field(u64, vnow)
		__field(u64, vrate)
		__field(u64, last_period)
		__field(u64, cur_period)
		__field(u64, vtime)
		__field(u32, weight)
		__field(u32, inuse)
		__field(u64, hweight_active)
		__field(u64, hweight_inuse)
	),

	TP_fast_assign(
		__assign_str(devname);
		__assign_str(cgroup);
		__entry->now = now->now;
		__entry->vnow = now->vnow;
		__entry->vrate = iocg->ioc->vtime_base_rate;
		__entry->last_period = last_period;
		__entry->cur_period = cur_period;
		__entry->vtime = vtime;
		__entry->weight = iocg->weight;
		__entry->inuse = iocg->inuse;
		__entry->hweight_active = iocg->hweight_active;
		__entry->hweight_inuse = iocg->hweight_inuse;
	),

	TP_printk("[%s:%s] now=%llu:%llu vrate=%llu "
		  "period=%llu->%llu vtime=%llu "
		  "weight=%u/%u hweight=%llu/%llu",
		__get_str(devname), __get_str(cgroup),
		__entry->now, __entry->vnow, __entry->vrate,
		__entry->last_period, __entry->cur_period,
		__entry->vtime, __entry->inuse, __entry->weight,
		__entry->hweight_inuse, __entry->hweight_active
	)
);

DEFINE_EVENT(iocost_iocg_state, iocost_iocg_activate,
	TP_PROTO(struct ioc_gq *iocg, const char *path, struct ioc_now *now,
		 u64 last_period, u64 cur_period, u64 vtime),

	TP_ARGS(iocg, path, now, last_period, cur_period, vtime)
);

DEFINE_EVENT(iocost_iocg_state, iocost_iocg_idle,
	TP_PROTO(struct ioc_gq *iocg, const char *path, struct ioc_now *now,
		 u64 last_period, u64 cur_period, u64 vtime),

	TP_ARGS(iocg, path, now, last_period, cur_period, vtime)
);

DECLARE_EVENT_CLASS(iocg_inuse_update,

	TP_PROTO(struct ioc_gq *iocg, const char *path, struct ioc_now *now,
		u32 old_inuse, u32 new_inuse,
		u64 old_hw_inuse, u64 new_hw_inuse),

	TP_ARGS(iocg, path, now, old_inuse, new_inuse,
		old_hw_inuse, new_hw_inuse),

	TP_STRUCT__entry (
		__string(devname, ioc_name(iocg->ioc))
		__string(cgroup, path)
		__field(u64, now)
		__field(u32, old_inuse)
		__field(u32, new_inuse)
		__field(u64, old_hweight_inuse)

Annotation

Implementation Notes