include/trace/events/vb2.h
Source file repositories/reference/linux-study-clean/include/trace/events/vb2.h
File Facts
- System
- Linux kernel
- Corpus path
include/trace/events/vb2.h- Extension
.h- Size
- 1769 bytes
- Lines
- 70
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/tracepoint.hmedia/videobuf2-core.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 vb2
#if !defined(_TRACE_VB2_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_VB2_H
#include <linux/tracepoint.h>
#include <media/videobuf2-core.h>
DECLARE_EVENT_CLASS(vb2_event_class,
TP_PROTO(struct vb2_queue *q, struct vb2_buffer *vb),
TP_ARGS(q, vb),
TP_STRUCT__entry(
__field(void *, owner)
__field(u32, queued_count)
__field(int, owned_by_drv_count)
__field(u32, index)
__field(u32, type)
__field(u32, bytesused)
__field(u64, timestamp)
),
TP_fast_assign(
__entry->owner = q->owner;
__entry->queued_count = q->queued_count;
__entry->owned_by_drv_count =
atomic_read(&q->owned_by_drv_count);
__entry->index = vb->index;
__entry->type = vb->type;
__entry->bytesused = vb->planes[0].bytesused;
__entry->timestamp = vb->timestamp;
),
TP_printk("owner = %p, queued = %u, owned_by_drv = %d, index = %u, "
"type = %u, bytesused = %u, timestamp = %llu", __entry->owner,
__entry->queued_count,
__entry->owned_by_drv_count,
__entry->index, __entry->type,
__entry->bytesused,
__entry->timestamp
)
)
DEFINE_EVENT(vb2_event_class, vb2_buf_done,
TP_PROTO(struct vb2_queue *q, struct vb2_buffer *vb),
TP_ARGS(q, vb)
);
DEFINE_EVENT(vb2_event_class, vb2_buf_queue,
TP_PROTO(struct vb2_queue *q, struct vb2_buffer *vb),
TP_ARGS(q, vb)
);
DEFINE_EVENT(vb2_event_class, vb2_dqbuf,
TP_PROTO(struct vb2_queue *q, struct vb2_buffer *vb),
TP_ARGS(q, vb)
);
DEFINE_EVENT(vb2_event_class, vb2_qbuf,
TP_PROTO(struct vb2_queue *q, struct vb2_buffer *vb),
TP_ARGS(q, vb)
);
#endif /* if !defined(_TRACE_VB2_H) || defined(TRACE_HEADER_MULTI_READ) */
/* This part must be outside protection */
#include <trace/define_trace.h>
Annotation
- Immediate include surface: `linux/tracepoint.h`, `media/videobuf2-core.h`, `trace/define_trace.h`.
- Atlas domain: Repository Root And Misc / include.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.