Documentation/trace/events-pci.rst
Source file repositories/reference/linux-study-clean/Documentation/trace/events-pci.rst
File Facts
- System
- Linux kernel
- Corpus path
Documentation/trace/events-pci.rst- Extension
.rst- Size
- 2187 bytes
- Lines
- 75
- Domain
- Support Tooling And Documentation
- Bucket
- Documentation
- Inferred role
- Support Tooling And Documentation: documentation
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
.. SPDX-License-Identifier: GPL-2.0
===========================
Subsystem Trace Points: PCI
===========================
Overview
========
The PCI tracing system provides tracepoints to monitor critical hardware events
that can impact system performance and reliability. These events normally show
up here:
/sys/kernel/tracing/events/pci
Cf. include/trace/events/pci.h for the events definitions.
Available Tracepoints
=====================
pci_hp_event
------------
Monitors PCI hotplug events including card insertion/removal and link
state changes.
::
pci_hp_event "%s slot:%s, event:%s\n"
**Event Types**:
* ``LINK_UP`` - PCIe link established
* ``LINK_DOWN`` - PCIe link lost
* ``CARD_PRESENT`` - Card detected in slot
* ``CARD_NOT_PRESENT`` - Card removed from slot
**Example Usage**::
# Enable the tracepoint
echo 1 > /sys/kernel/debug/tracing/events/pci/pci_hp_event/enable
# Monitor events (the following output is generated when a device is hotplugged)
cat /sys/kernel/debug/tracing/trace_pipe
irq/51-pciehp-88 [001] ..... 1311.177459: pci_hp_event: 0000:00:02.0 slot:10, event:CARD_PRESENT
irq/51-pciehp-88 [001] ..... 1311.177566: pci_hp_event: 0000:00:02.0 slot:10, event:LINK_UP
pcie_link_event
---------------
Monitors PCIe link speed changes and provides detailed link status information.
::
pcie_link_event "%s type:%d, reason:%d, cur_bus_speed:%d, max_bus_speed:%d, width:%u, flit_mode:%u, status:%s\n"
**Parameters**:
* ``type`` - PCIe device type (4=Root Port, etc.)
* ``reason`` - Reason for link change:
- ``0`` - Link retrain
- ``1`` - Bus enumeration
- ``2`` - Bandwidth notification enable
- ``3`` - Bandwidth notification IRQ
- ``4`` - Hotplug event
**Example Usage**::
# Enable the tracepoint
echo 1 > /sys/kernel/debug/tracing/events/pci/pcie_link_event/enable
Annotation
- Atlas domain: Support Tooling And Documentation / Documentation.
- Implementation status: atlas-only.
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.