Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp412683lqp; Tue, 11 Jun 2024 08:05:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUK92r72KGb0AHsPuX+33THaJQ0maDqlVIYxnconrH9RAoQu2G1RYC7ghYN3Aii/3Gaz6x6MaoiHUpGaEdfYr9+nTNomt+v7yFOCaQhSA== X-Google-Smtp-Source: AGHT+IEUfRjQFURYo2OV3bqaK2Ett8XjQgT0pbQU6k+o+VRGoXlyKQglospJ+Wnx45THsEJRuUie X-Received: by 2002:a50:9e65:0:b0:57c:6248:9e26 with SMTP id 4fb4d7f45d1cf-57c62489e65mr8682624a12.39.1718118311892; Tue, 11 Jun 2024 08:05:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718118311; cv=pass; d=google.com; s=arc-20160816; b=ajk1RNEa6J7nJCJOOj3QXJFqn6+FnU3XVmRL5eiw1U9cKeSNVg0cnJnTclgQzw3M8b 0kDBRNCdACLj0J1cAKWyeeHn4VdFvTmlCV66eQ24G+vudIuzqmmhNaPX9vM8bWYNoecj JpK++LabUjeEsS2rrrt4kTsCW02VKvWTGbEArtdbCxKcX0FxbHv/Amga/LRj49LEENDD 4Hw/ZXsNvmR1Vx0UV0qUdrfTIOA326Oy/TsTjbIW+c6OKH0xMZQcgUJDPW+MQB5MrluU cfNsm8G9SwKyhUcM5au8uk/YidRHXFtZlhRi0j/CvcT032dlYvJEY9iIAhWV+A9XFtY5 IdIA== 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=2s+eIsKHHam+jMV7/s2ffLwy54AhQ8M2v8jHKEN3Fe4=; b=abxG7Vs3jRjHVKWARUzvj8q76X5o0yMOgtwrc+FAsWrRpva3R0pLTI77btBT92b5BO 5PUgMfFJuBO9P48TEO6PgZY99E23T9V9h3MughhCwu3//jEkDxy/B2apSQNWPLCruCiF 265xjNC6hn/vWdLMZ3j/oBmkQBFnfD4HlDh6EKuyCkeea/1VgtSsiT4Cgi1iZZN/CAmc tDIfJOEFQxBEjLEYn/6R0iGS1Dbqc98N1Ligo4cc0nMH26G8bOgVV034K8Swh0m8pb6D KpKB/wDDwV3cAwFanNNJXAzelfqhcUcc/cmbL+KJGE8FWOLWAkiHrgbX6tPO/BZznPhI SxWA==; 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-210120-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210120-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 4fb4d7f45d1cf-57c6896aa3dsi4168485a12.450.2024.06.11.08.05.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 08:05:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-210120-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-210120-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210120-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 8C1931F21F74 for ; Tue, 11 Jun 2024 15:05:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 550A3376E4; Tue, 11 Jun 2024 15:03:35 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 595173D38E; Tue, 11 Jun 2024 15:03:33 +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=1718118214; cv=none; b=GRnkuNAz6T3onSTYKkk+Zq44UTDgBtUF/l12/BIU9+7kGhizOL4smKFOiPpHoDMuYJTBmgZImzJIZT5y9j5dMxK7oYIo9e6/z5O93EagJ7/407BCXGAwvDqIbuzLlIjoA54dX2PP+cPfYj0RrgIK5OUgVFb9eHDoR1vvz487ueI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718118214; 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=bqKi6FNZ91L2st62xZF7WVBAY2JeJCSBE8iUkVH/1KASRPzUDxiSyM330mmVpm19qx0BUaOHKhAZ1umgBx/20sjT2JVy0ir3hjNr+/KtMBsB3Vzk2y5CF5wXb34qL5Ob9dmBXVuOE48PXDFVsHnmjZ+HxecmQE4YTIuLlqDB/FA= 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 2FFD7152B; Tue, 11 Jun 2024 08:03:57 -0700 (PDT) Received: from e127643.arm.com (unknown [10.57.41.181]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B13AA3F64C; Tue, 11 Jun 2024 08:03:28 -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 , "Liang, Kan" , 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 v3 07/14] coresight: Clarify comments around the PID of the sink owner Date: Tue, 11 Jun 2024 16:02:18 +0100 Message-Id: <20240611150228.1802828-8-james.clark@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240611150228.1802828-1-james.clark@arm.com> References: <20240611150228.1802828-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