include/trace/events/wbt.h
Source file repositories/reference/linux-study-clean/include/trace/events/wbt.h
File Facts
- System
- Linux kernel
- Corpus path
include/trace/events/wbt.h- Extension
.h- Size
- 3907 bytes
- Lines
- 159
- 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.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/tracepoint.h../../../block/blk-wbt.htrace/define_trace.h
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#undef TRACE_SYSTEM
#define TRACE_SYSTEM wbt
#if !defined(_TRACE_WBT_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_WBT_H
#include <linux/tracepoint.h>
#include "../../../block/blk-wbt.h"
/**
* wbt_stat - trace stats for blk_wb
* @stat: array of read/write stats
*/
TRACE_EVENT(wbt_stat,
TP_PROTO(struct backing_dev_info *bdi, struct blk_rq_stat *stat),
TP_ARGS(bdi, stat),
TP_STRUCT__entry(
__array(char, name, 32)
__field(s64, rmean)
__field(u64, rmin)
__field(u64, rmax)
__field(s64, rnr_samples)
__field(s64, rtime)
__field(s64, wmean)
__field(u64, wmin)
__field(u64, wmax)
__field(s64, wnr_samples)
__field(s64, wtime)
),
TP_fast_assign(
strscpy(__entry->name, bdi_dev_name(bdi),
ARRAY_SIZE(__entry->name));
__entry->rmean = stat[0].mean;
__entry->rmin = stat[0].min;
__entry->rmax = stat[0].max;
__entry->rnr_samples = stat[0].nr_samples;
__entry->wmean = stat[1].mean;
__entry->wmin = stat[1].min;
__entry->wmax = stat[1].max;
__entry->wnr_samples = stat[1].nr_samples;
),
TP_printk("%s: rmean=%llu, rmin=%llu, rmax=%llu, rsamples=%llu, "
"wmean=%llu, wmin=%llu, wmax=%llu, wsamples=%llu",
__entry->name, __entry->rmean, __entry->rmin, __entry->rmax,
__entry->rnr_samples, __entry->wmean, __entry->wmin,
__entry->wmax, __entry->wnr_samples)
);
/**
* wbt_lat - trace latency event
* @lat: latency trigger
*/
TRACE_EVENT(wbt_lat,
TP_PROTO(struct backing_dev_info *bdi, unsigned long lat),
TP_ARGS(bdi, lat),
TP_STRUCT__entry(
__array(char, name, 32)
__field(unsigned long, lat)
),
TP_fast_assign(
strscpy(__entry->name, bdi_dev_name(bdi),
ARRAY_SIZE(__entry->name));
__entry->lat = div_u64(lat, 1000);
),
TP_printk("%s: latency %lluus", __entry->name,
(unsigned long long) __entry->lat)
);
/**
* wbt_step - trace wb event step
* @msg: context message
* @step: the current scale step count
* @window: the current monitoring window
* @bg: the current background queue limit
* @normal: the current normal writeback limit
* @max: the current max throughput writeback limit
*/
TRACE_EVENT(wbt_step,
TP_PROTO(struct backing_dev_info *bdi, const char *msg,
Annotation
- Immediate include surface: `linux/tracepoint.h`, `../../../block/blk-wbt.h`, `trace/define_trace.h`.
- Atlas domain: Repository Root And Misc / include.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.