Skip to content

Commit eda1d11

Browse files
James-A-ClarkSuzuki K Poulose
authored andcommitted
coresight: Clarify comments around the PID of the sink owner
"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 <[email protected]> Reviewed-by: Mike Leach <[email protected]> Signed-off-by: James Clark <[email protected]> Tested-by: Leo Yan <[email protected]> Tested-by: Ganapatrao Kulkarni <[email protected]> Signed-off-by: James Clark <[email protected]> Signed-off-by: Suzuki K Poulose <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 3417200 commit eda1d11

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

drivers/hwtracing/coresight/coresight-tmc-etr.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ struct etr_buf_hw {
3636
* etr_perf_buffer - Perf buffer used for ETR
3737
* @drvdata - The ETR drvdaga this buffer has been allocated for.
3838
* @etr_buf - Actual buffer used by the ETR
39-
* @pid - The PID this etr_perf_buffer belongs to.
39+
* @pid - The PID of the session owner that etr_perf_buffer
40+
* belongs to.
4041
* @snaphost - Perf session mode
4142
* @nr_pages - Number of pages in the ring buffer.
4243
* @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)
16621663
goto unlock_out;
16631664
}
16641665

1665-
/* Get a handle on the pid of the process to monitor */
1666+
/* Get a handle on the pid of the session owner */
16661667
pid = etr_perf->pid;
16671668

16681669
/* Do not proceed if this device is associated with another session */

drivers/hwtracing/coresight/coresight-tmc.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,9 @@ struct etr_buf {
171171
* @csdev: component vitals needed by the framework.
172172
* @miscdev: specifics to handle "/dev/xyz.tmc" entry.
173173
* @spinlock: only one at a time pls.
174-
* @pid: Process ID of the process being monitored by the session
175-
* that is using this component.
174+
* @pid: Process ID of the process that owns the session that is using
175+
* this component. For example this would be the pid of the Perf
176+
* process.
176177
* @buf: Snapshot of the trace data for ETF/ETB.
177178
* @etr_buf: details of buffer used in TMC-ETR
178179
* @len: size of the available trace for ETF/ETB.

0 commit comments

Comments
 (0)