Received: by 2002:a05:6500:1b41:b0:1fb:d597:ff75 with SMTP id cz1csp148305lqb; Tue, 4 Jun 2024 07:35:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWZk3mPw4tcv7wMbqdURLIc+GfrT/rAxCNqyIuDPgy4VCJou1vkgZkFudzX6Xr8KTXEW4D+oDi0QdIhvwTZZtrGEBG4CiAbDym9h4oAhQ== X-Google-Smtp-Source: AGHT+IHtXa7xyEnWqOxFlmbYZjXIQW7RF1FtlZdOIuoXF8CTSoSHgC6ayQA98ZT+U2cQRm89AmGs X-Received: by 2002:a17:906:5609:b0:a68:e162:66e0 with SMTP id a640c23a62f3a-a68e1626819mr538844266b.38.1717511707621; Tue, 04 Jun 2024 07:35:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717511707; cv=pass; d=google.com; s=arc-20160816; b=oto4E9rQe1aQT7fT689uktxBetzkEveWPPjodAlO6+1o3FPOoD+BRB35pZYe96GQ+o gCvFTwo9/w97Ta3dm1h82bCZzYvKluvTXZaU131FTfnFvtEydC02gz+8akC3qkp7ldLN QqL2FVulBHeyZAA/goaxy62NNTgycjfsLzvZFfqlA4B9MhCezTWNnGYaZXXvRcX2tJnf 7w8hxOc/rDdBJnjSJGiBGe6n9fLMYyBRbFfvRU3sTAurpaRBt1wyhVNMhTw1rvv/TaCe bWcMRMi8FCeyx5diYZCYrTHKog/hApXLqnLJN4vCw2REo5yDbIU5iKmuYQhOXZJyhP3J cS9w== 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=zCUdff80LaAho/KXDRszrQQ33AEG9EptbUso0dBLvmA=; fh=PS2xZ37x6i1et2MxEVJy4TSpqrJZGNwd6DyYCR5/2fw=; b=UeE1PDOL76t4AgNKZAbTo5A0Fh72yBcLahm1PcTr4mixE215O1LjMgTSLqLtyIY4Xq h4jGyp8BAPVqc/gIDett4+Zm+07NnfGH0Ee9wiYP6OI3gS/3hOe1q08OezK8XiRS36kc X/x3KBwjq3VJP3vmhLs+C3jwV5AsxGoDSyROu9J58wHNYnO1qJJX2CXiQa1/cidmyN2m E/ex0fiDH5F1xVYSWxm84bKtUcacp6858qbwcCbjRE7nGJtm4EY4RSGukQouYHz7uwvZ vL4dUN6zs9IVZnf7ikJGBGz8bKHFo6tHvOE5RMas/5z6oXAOWE9WsfofHOKwx6teD+4L YmKQ==; 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-200831-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200831-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a68e956760fsi277543666b.164.2024.06.04.07.35.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 07:35:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-200831-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; 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-200831-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200831-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 9D5721F21CFC for ; Tue, 4 Jun 2024 14:34:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 56F10143897; Tue, 4 Jun 2024 14:32:32 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6815B13CFA1; Tue, 4 Jun 2024 14:32:30 +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=1717511551; cv=none; b=Q3ILYd6qsvpbxVb1cTUO6A1DMb/8X1C4S1ntRfBTXrYhbzxDzFYCfUvGRNNWKw1DO1sIh7cotUc5vcJ9slkY+3bkYJd/7JcYnY8iXjQOQ+EG5dg9fvl4m+/Z4L3V5XKBFVP/xgzF0tN2RBgeTak6BWPduTCjx+KsQmfSlhQ9Aek= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717511551; c=relaxed/simple; bh=wFlpTBjQ7b6ixH+wxY/aRCo3v9tll5/p+Sl/xnV6xpw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=LiJ+VLoELlXfkVAmVr5HzQBO/V6aODbAsg82x2xdF7F4Pb2CNIZG1sQWXgm9rnkdfMYsh/gAr9W466uASLAlsYg8c+NpcIQdNKRN46Q+A20pjd/mR3DbU/ZPTsiEZ+1hmFdm823GlDI8ALtMx7UolB3f96dzxZDj1sjf0DLjknM= 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 3383F1042; Tue, 4 Jun 2024 07:32:54 -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 CCA3A3F64C; Tue, 4 Jun 2024 07:32:26 -0700 (PDT) From: James Clark To: coresight@lists.linaro.org, suzuki.poulose@arm.com, gankulkarni@os.amperecomputing.com, mike.leach@linaro.org, leo.yan@linux.dev, anshuman.khandual@arm.com 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 , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-perf-users@vger.kernel.org Subject: [PATCH v2 09/16] coresight: Clarify comments around the PID of the sink owner Date: Tue, 4 Jun 2024 15:30:18 +0100 Message-Id: <20240604143030.519906-10-james.clark@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240604143030.519906-1-james.clark@arm.com> References: <20240604143030.519906-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. Reviewed-by: Anshuman Khandual Reviewed-by: Mike Leach 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