[PATCH] drm/amd/doc: add rough outline of tracepoint documentation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Tom St Denis <tom.stdenis@xxxxxxx>
---
 Documentation/gpu/amdgpu.rst              |  10 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 221 ++++++++++++++++++++++
 2 files changed, 231 insertions(+)

diff --git a/Documentation/gpu/amdgpu.rst b/Documentation/gpu/amdgpu.rst
index 86138798128f..3564765110e5 100644
--- a/Documentation/gpu/amdgpu.rst
+++ b/Documentation/gpu/amdgpu.rst
@@ -89,6 +89,16 @@ AMDGPU RAS debugfs control interface
 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
    :internal:
 
+AMDGPU Tracing Support
+======================
+
+.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h
+   :doc: AMDGPU Tracing Support
+
+
+.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h
+   :internal:
+
 
 GPU Power/Thermal Controls and Monitoring
 =========================================
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h
index d3ca2424b5fe..71febb90d3e3 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h
@@ -37,6 +37,227 @@
 #define AMDGPU_JOB_GET_TIMELINE_NAME(job) \
 	 job->base.s_fence->finished.ops->get_timeline_name(&job->base.s_fence->finished)
 
+/**
+ * DOC: AMDGPU Tracing Support
+ *
+ * The AMDGPU driver provides numerous trace points that can aid
+ * in debugging.  They are globally enabled by the file:
+ *
+ * /sys/kernel/debug/tracing/events/amdgpu/enable
+ *
+ * or individually by the enable files in the sub-directories
+ * of that directory.
+ *
+ * amdgpu_mm_rreg, amdgpu_mm_wreg
+ * ------------------------------
+ *
+ * These trace points track reads and writes to MMIO registers by
+ * the kernel driver (activity inside ring/indirect buffers are not
+ * traced) which can be used to diagnose IP block activity and
+ * responses.
+ *
+ * The trace captures the following information:
+ *
+ *     - DID of the device being used
+ *     - Register address
+ *     - Value being read or written
+ *
+ * It does not differentiate between multiple instances of the same
+ * ASIC. The register address is the DWORD address of the register
+ * being used.
+ *
+ * amdgpu_iv
+ * ---------
+ *
+ * This tracepoint captures data from an IRQ event before dispatching
+ * control to the respective IP block IRQ handler.  The trace
+ * captures the following information:
+ *
+ *    - client ID
+ *    - source ID
+ *    - ring ID
+ *    - VM ID
+ *    - VM ID source
+ *    - Timestamp
+ *    - Timestamp source
+ *    - PAS ID
+ *    - 4 SRC data words
+ *
+ * amdgpu_bo_create
+ * ----------------
+ *
+ * This tracepoint captures the state of a successfully created
+ * buffer object (BO).  The trace captures the following information:
+ *
+ *    - kernel address of the BO
+ *    - Number of (GPU) pages
+ *    - Memory type
+ *    - Preferred domain
+ *    - Allowed domains
+ *    - Buffer Object Flags
+ *
+ * amdgpu_cs
+ * ---------
+ *
+ * This tracepoint captures data about a command submission prior
+ * to being submitted to a ring (or queue).  The trace captures all
+ * indirect buffers (ibs) at once before issuing any commands.  The
+ * trace captures the following information:
+ *
+ *    - kernel address of the buffer object (BO) list
+ *    - The ring (index) being submitted to
+ *    - The number of words
+ *    - The number of fences emitted
+ *
+ * amdgpu_cs_ioctl
+ * ---------------
+ *
+ * This tracepoint captures information from the IOCTL query that
+ * submits commands to a ring.  It is part of the DRM userspace
+ * infrastructure.  The trace captures the following information:
+ *
+ *    - Schedule job ID
+ *    - Timeline (name of ring the fence is emitted to)
+ *    - Fence context
+ *    - Fence sequence number
+ *    - Ring name being submitted to
+ *    - Number of indirect buffers (ibs)
+ *
+ * amdgpu_sched_run_job
+ * --------------------
+ *
+ * This tracepoint captures information about a job submission
+ * at the point of scheduling for submission to a ring.  The trace
+ * captures the following information:
+ *
+ *    - Job ID
+ *    - Timeline (name of ring the fence is emitted to)
+ *    - Context ID
+ *    - Sequence Number
+ *    - Ring name being submitted to
+ *    - Number of indirect buffers (ibs)
+ *
+ * amdgpu_vm_grab_id
+ * -----------------
+ *
+ * This tracepoint captures information about a VM allocation.
+ * The trace captures the following information:
+ *
+ *    - PAS ID
+ *    - Ring name
+ *    - Ring index
+ *    - VM ID that is assigned
+ *    - VM hub assigned (depends on ring)
+ *    - Page Directory base address
+ *    - Flag indicating whether it needs to be flushed or not
+ *
+ * amdgpu_vm_bo_map
+ * ----------------
+ *
+ * This tracepoint captures information when a new mapping is inserted
+ * into a VM space.  The trace captures the following information:
+ *
+ *    - Kernel address of the buffer object (bo)
+ *    - Start page address of mapping
+ *    - Last page address of mapping
+ *    - Offset into mapping
+ *    - Flags for the mapping
+ *
+ * amdgpu_vm_bo_unmap
+ * ------------------
+ *
+ * This tracepoint captures information when a mapping is deleted
+ * from a VM space.  The trace captures the following information:
+ *
+ *    - Kernel address of the buffer object (bo)
+ *    - Start page address of mapping
+ *    - Last page address of mapping
+ *    - Offset into mapping
+ *    - Flags for the mapping
+ *
+ * amdgpu_vm_set_ptes
+ * ------------------
+ *
+ * This tracepoint captures information when new Page Table Entries
+ * (PTE) are to be written out to the Page Table Block (PTB) pointed
+ * to by a Page Directory Entry (PDE).  The trace captures the
+ * following information:
+ *
+ *    - CPU address of PTE (pe)
+ *    - Page Base Address (addr) to be inserted
+ *    - Number of PTEs to be written
+ *    - Increment on the page based address per entry
+ *    - The PTE flags
+ *
+ * amdgpu_vm_copy_ptes
+ * -------------------
+ *
+ * This tracepoint captures information when Page Table Entries are
+ * copied from a mapping to a Page Table Block.  The trace captures the
+ * following information:
+ *
+ *    - Destination PTB for the copied entries
+ *    - Source address
+ *    - Count of PTE entries to copy
+ *
+ * amdgpu_vm_flush
+ * ---------------
+ *
+ * This tracepoint captures information of a VM flush being performed
+ * via a specific GPU ring.  The trace captures the following
+ * information:
+ *
+ *    - Ring name
+ *    - VM ID
+ *    - VM Hub
+ *    - The base address of the PDB being invalidated
+ *
+ * amdgpu_bo_list_set
+ * ------------------
+ *
+ * This tracepoint captures information when storing a buffer
+ * object (bo) list entry. The trace captures the following
+ * information:
+ *
+ *    - Kernel address of the buffer object list
+ *    - Kernel address of the buffer object being added
+ *    - Size of the buffer object being added
+ *
+ * amdgpu_cs_bo_status
+ * -------------------
+ *
+ * This tracepoint captures information when a buffer object (bo)
+ * list is created.  The trace captures the following information:
+ *
+ *    - Total number of entries
+ *    - Total bytes of objects stored in list
+ *
+ * amdgpu_bo_move
+ * --------------
+ *
+ * This tracepoint captures information about the movement of a
+ * buffer object from one placement (memory type) to another.  the
+ * trace captures the following information:
+ *
+ *     - Kernel address of buffer object
+ *     - Size of buffer object in bytes
+ *     - New placement target
+ *     - Old placement source
+ *
+ * amdgpu_ib_pipe_sync
+ * -------------------
+ *
+ * This tracepoint captures information when a pipeline sync is
+ * emitted to a ring.  The trace captures the following information:
+ *
+ *     - Name of the ring
+ *     - Job ID
+ *     - Kernel address of fence object
+ *     - Context ID
+ *     - Fence sequence number
+ *
+ */
+
 TRACE_EVENT(amdgpu_mm_rreg,
 	    TP_PROTO(unsigned did, uint32_t reg, uint32_t value),
 	    TP_ARGS(did, reg, value),
-- 
2.21.0

_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux