Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1442315lqa; Mon, 29 Apr 2024 08:33:22 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWaaU7XK3Odbn9+5KrBFcnbumMqnOOg/W4HUuyW+XEx9T+xr9F1stg85AlNLjhJlV4ptvjwD9P1jlmRlbKZkyVrQPFtR988JANArWpF+g== X-Google-Smtp-Source: AGHT+IEdcxjEmcvs/LRW974OP0GXcfcPHzuocOpfIM+PH60gNZFcGA8lk4CXHHInT6kAFrmhrTFP X-Received: by 2002:a05:6a20:9185:b0:1a9:3cda:dc3c with SMTP id v5-20020a056a20918500b001a93cdadc3cmr8960067pzd.61.1714404801903; Mon, 29 Apr 2024 08:33:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714404801; cv=pass; d=google.com; s=arc-20160816; b=Pv1b/KVQiyrbRBFOMrmsgNzXBVlRxnlfN5jysUcdElEeDJgO/rPebrM4CVFXJpKmhK gMysMEDuQNbatt0sqal2XJtcMuTRCX1D60WdS8l/vamvcAdPCIYuf24kYv5Wjnxdz18k h3E3YAWVvoI1ra+4MfBtKVAeMAajp6o6xCo5hllbeoWWekbKnwPcDA/9WP8Na5TKa1TA orzZAbj8XNvJ1LG0/oQTsyrJEFsumf40Y3N8bgsVSlZZAjT5epC4Tbc/dTGdKoyP3mM9 FKjIAPOwOAJE5FotdVD7YI0vaIPg1VVPiqhaHPl9W8s4pSCUfJ0n2N2X89vYOBvo9OOF 59pQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=13ak0eC/ZSvP3Gv3X4BknOtJXdSZ1NUwH8qN5HABI5s=; fh=eTkjUs/l3a9lPpUjmicKO4brnHa0D6Qg87n5LIjfzgo=; b=BvKaC15jBu6dvjHmepb62b6Da5MzLT5zxPbAceyAfC3bwEKfVKIcFh6BruncnKwNDM 6tD2oUu0UPW3Z4xOxhU3oyp3WIF/Z1cqWgCGfcN4x4PdDtEYidp0fAmbh5dBVvheFA4T bPzFYPVB+Oy5Kq/meO8cnY/hVSC+aMWdNnNDZgO68vKlVRuhOon2YtdmxHOAryHhMNG7 1dvHBuLV3zDbJ09hapVAMYI3ZALUM58JQdbfZmRwQiipfS0QuZtN3KjjYxf7p/O4BOgY /FYS5ZAMqM2yE+/B1tlsHw4mx0OCEtufO6ONjNGRWozjW53SMseFdJjBp3EmAgxRmEfY gt9w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-162577-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162577-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id r7-20020aa78b87000000b006ed25e7f702si19922178pfd.304.2024.04.29.08.33.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 08:33:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-162577-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-162577-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162577-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 3FC0C288B34 for ; Mon, 29 Apr 2024 15:26:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 352AB8595A; Mon, 29 Apr 2024 15:24:53 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5319881724; Mon, 29 Apr 2024 15:24:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714404292; cv=none; b=PI34/SjcTT8xOFq5E+L0JwsYArGn0Q5CM5adlE/Y4SQHdltWxUv3mT9zeVC2gA2gAwrZKAzzZ83DhGC12R9SI3xw5yPxyvpwnCfrFLGf9i8/Nc7ujNHx1uyz46zrcE0yL6p4y0PuKOmeaQXrudydXSgCWVOx2IJDfmzjxRF11DM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714404292; c=relaxed/simple; bh=E2yO5ffazONOP1eDnOXfTm5xfXBNn+qcPhpFvPl+uZI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=D/Af1nDgDDIU++yb+dl8DXAjDxEi2S/CSEvSqpaKofOM+pCEFyqIc4jQkJFs8KJ/XqNUl/ALY+VMzfHSA+aKLiNghwUMq7+Mi1SCJIIFyv0KzNtgvX8fMbGKQP/68llUuNmTlMHrHtSvYRPnEAeXI1n71HfGcBOpg3saS/8EkN4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com 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 586C62F4; Mon, 29 Apr 2024 08:25:17 -0700 (PDT) Received: from e127643.broadband (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 8C17F3F793; Mon, 29 Apr 2024 08:24:47 -0700 (PDT) From: James Clark To: 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: James Clark , 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 Subject: [PATCH 09/17] coresight: Clarify comments around the PID of the sink owner Date: Mon, 29 Apr 2024 16:21:54 +0100 Message-Id: <20240429152207.479221-10-james.clark@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240429152207.479221-1-james.clark@arm.com> References: <20240429152207.479221-1-james.clark@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit "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 --- 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. -- 2.34.1