drivers/vfio/pci/trace.h
Source file repositories/reference/linux-study-clean/drivers/vfio/pci/trace.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/vfio/pci/trace.h- Extension
.h- Size
- 2355 bytes
- Lines
- 99
- Domain
- Driver Families
- Bucket
- drivers/vfio
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/tracepoint.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 vfio_pci
#if !defined(_TRACE_VFIO_PCI_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_VFIO_PCI_H
#include <linux/tracepoint.h>
TRACE_EVENT(vfio_pci_nvgpu_mmap_fault,
TP_PROTO(struct pci_dev *pdev, unsigned long hpa, unsigned long ua,
vm_fault_t ret),
TP_ARGS(pdev, hpa, ua, ret),
TP_STRUCT__entry(
__field(const char *, name)
__field(unsigned long, hpa)
__field(unsigned long, ua)
__field(int, ret)
),
TP_fast_assign(
__entry->name = dev_name(&pdev->dev),
__entry->hpa = hpa;
__entry->ua = ua;
__entry->ret = ret;
),
TP_printk("%s: %lx -> %lx ret=%d", __entry->name, __entry->hpa,
__entry->ua, __entry->ret)
);
TRACE_EVENT(vfio_pci_nvgpu_mmap,
TP_PROTO(struct pci_dev *pdev, unsigned long hpa, unsigned long ua,
unsigned long size, int ret),
TP_ARGS(pdev, hpa, ua, size, ret),
TP_STRUCT__entry(
__field(const char *, name)
__field(unsigned long, hpa)
__field(unsigned long, ua)
__field(unsigned long, size)
__field(int, ret)
),
TP_fast_assign(
__entry->name = dev_name(&pdev->dev),
__entry->hpa = hpa;
__entry->ua = ua;
__entry->size = size;
__entry->ret = ret;
),
TP_printk("%s: %lx -> %lx size=%lx ret=%d", __entry->name, __entry->hpa,
__entry->ua, __entry->size, __entry->ret)
);
TRACE_EVENT(vfio_pci_npu2_mmap,
TP_PROTO(struct pci_dev *pdev, unsigned long hpa, unsigned long ua,
unsigned long size, int ret),
TP_ARGS(pdev, hpa, ua, size, ret),
TP_STRUCT__entry(
__field(const char *, name)
__field(unsigned long, hpa)
__field(unsigned long, ua)
__field(unsigned long, size)
__field(int, ret)
),
TP_fast_assign(
__entry->name = dev_name(&pdev->dev),
__entry->hpa = hpa;
__entry->ua = ua;
__entry->size = size;
__entry->ret = ret;
),
TP_printk("%s: %lx -> %lx size=%lx ret=%d", __entry->name, __entry->hpa,
__entry->ua, __entry->size, __entry->ret)
);
#endif /* _TRACE_VFIO_PCI_H */
#undef TRACE_INCLUDE_PATH
#define TRACE_INCLUDE_PATH ../../drivers/vfio/pci
#undef TRACE_INCLUDE_FILE
#define TRACE_INCLUDE_FILE trace
/* This part must be outside protection */
#include <trace/define_trace.h>
Annotation
- Immediate include surface: `linux/tracepoint.h`, `trace/define_trace.h`.
- Atlas domain: Driver Families / drivers/vfio.
- 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.