]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
coresight: Clarify comments around the PID of the sink owner
authorJames Clark <james.clark@arm.com>
Mon, 22 Jul 2024 10:11:52 +0000 (11:11 +0100)
committerSuzuki K Poulose <suzuki.poulose@arm.com>
Tue, 20 Aug 2024 14:02:37 +0000 (15:02 +0100)
"Process being monitored" and "pid of the process to monitor" imply that
this would be the same PID if there were two sessions targeting the same
process. But this is actually the PID of the process that did the Perf
event open call, rather than the target of the session. So update the
comments to make this clearer.

Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: Mike Leach <mike.leach@linaro.org>
Signed-off-by: James Clark <james.clark@arm.com>
Tested-by: Leo Yan <leo.yan@arm.com>
Tested-by: Ganapatrao Kulkarni <gankulkarni@os.amperecomputing.com>
Signed-off-by: James Clark <james.clark@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20240722101202.26915-11-james.clark@linaro.org
drivers/hwtracing/coresight/coresight-tmc-etr.c
drivers/hwtracing/coresight/coresight-tmc.h

index 610ad51cda656b7842f1cba5ccfe863c2a82d9c3..a48bb85d0e7f44a25b813f3c828cc3d705d16012 100644 (file)
@@ -36,7 +36,8 @@ struct etr_buf_hw {
  * etr_perf_buffer - Perf buffer used for ETR
  * @drvdata            - The ETR drvdaga this buffer has been allocated for.
  * @etr_buf            - Actual buffer used by the ETR
- * @pid                        - The PID this etr_perf_buffer belongs to.
+ * @pid                        - The PID of the session owner that etr_perf_buffer
+ *                       belongs to.
  * @snaphost           - Perf session mode
  * @nr_pages           - Number of pages in the ring buffer.
  * @pages              - Array of Pages in the ring buffer.
@@ -1662,7 +1663,7 @@ static int tmc_enable_etr_sink_perf(struct coresight_device *csdev, void *data)
                goto unlock_out;
        }
 
-       /* Get a handle on the pid of the process to monitor */
+       /* Get a handle on the pid of the session owner */
        pid = etr_perf->pid;
 
        /* Do not proceed if this device is associated with another session */
index c77763b49de0c6e30e4e3ae98969899401ab162d..2671926be62a37835cf7d616f1db8034f9048368 100644 (file)
@@ -171,8 +171,9 @@ struct etr_buf {
  * @csdev:     component vitals needed by the framework.
  * @miscdev:   specifics to handle "/dev/xyz.tmc" entry.
  * @spinlock:  only one at a time pls.
- * @pid:       Process ID of the process being monitored by the session
- *             that is using this component.
+ * @pid:       Process ID of the process that owns the session that is using
+ *             this component. For example this would be the pid of the Perf
+ *             process.
  * @buf:       Snapshot of the trace data for ETF/ETB.
  * @etr_buf:   details of buffer used in TMC-ETR
  * @len:       size of the available trace for ETF/ETB.