From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BF21CC25B5C for ; Tue, 7 May 2024 04:25:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rw0y/8rte9eQhYuky14WGUJcUjmTJA2b9yiD89j+NVA=; b=mfj4W9cJ5p8ScR QZvCz7VrWf8kJn5OP4JM5Fv2QN4EEl2xwugxbCb21rda9ZtjP4N7dW3AMjl1nmllpHTvbw9J2h3ZC b/HxlKBcT6/NREN1gHNvsHfZY6m0HAZ4mwwQITQ1vCnAlCIgIlMXQtTDGQtDpyKW07PoQdbKKfN6M //bWmX+2IaoXVg6Nl+07fUoRafVv7MKU/0zf/qdXM1rIo8ufBhHStT4kcGetv6j3nizPvGwnTxQYr tKeaNrw/gWJr3+LZMSG0GNUMosIO20w/ihamz2Lufj5QMLH9dI9ucDhUk5QHkLQeV2eXXbFPZi/1x VeVepXfa3VD79HSGY7hg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4COe-00000009ZdX-32Qo; Tue, 07 May 2024 04:25:44 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4COb-00000009Zcf-30Tk for linux-arm-kernel@lists.infradead.org; Tue, 07 May 2024 04:25:43 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EAFD21042; Mon, 6 May 2024 21:26:02 -0700 (PDT) Received: from [10.163.33.37] (unknown [10.163.33.37]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D5A323F762; Mon, 6 May 2024 21:25:28 -0700 (PDT) Message-ID: <3fa5f992-b758-4928-9bf9-0c6e82db1f65@arm.com> Date: Tue, 7 May 2024 09:55:30 +0530 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 09/17] coresight: Clarify comments around the PID of the sink owner Content-Language: en-US To: James Clark , linux-perf-users@vger.kernel.org, gankulkarni@os.amperecomputing.com, scclevenger@os.amperecomputing.com, coresight@lists.linaro.org, suzuki.poulose@arm.com, mike.leach@linaro.org Cc: Alexander Shishkin , Maxime Coquelin , Alexandre Torgue , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Jiri Olsa , Ian Rogers , Adrian Hunter , John Garry , Will Deacon , Leo Yan , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com References: <20240429152207.479221-1-james.clark@arm.com> <20240429152207.479221-10-james.clark@arm.com> From: Anshuman Khandual In-Reply-To: <20240429152207.479221-10-james.clark@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240506_212541_903446_B6D90AF8 X-CRM114-Status: GOOD ( 23.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 4/29/24 20:51, James Clark wrote: > "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. > > Signed-off-by: James Clark This indeed removes the ambiguity that the PID belongs to the perf session owner rather than the monitored or target process. Reviewed-by: Anshuman Khandual > --- > drivers/hwtracing/coresight/coresight-tmc-etr.c | 5 +++-- > drivers/hwtracing/coresight/coresight-tmc.h | 5 +++-- > 2 files changed, 6 insertions(+), 4 deletions(-) > > diff --git a/drivers/hwtracing/coresight/coresight-tmc-etr.c b/drivers/hwtracing/coresight/coresight-tmc-etr.c > index e75428fa1592..8962fc27d04f 100644 > --- a/drivers/hwtracing/coresight/coresight-tmc-etr.c > +++ b/drivers/hwtracing/coresight/coresight-tmc-etr.c > @@ -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 */ > diff --git a/drivers/hwtracing/coresight/coresight-tmc.h b/drivers/hwtracing/coresight/coresight-tmc.h > index c77763b49de0..2671926be62a 100644 > --- a/drivers/hwtracing/coresight/coresight-tmc.h > +++ b/drivers/hwtracing/coresight/coresight-tmc.h > @@ -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. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel