Message ID | 20211208024607.1784932-11-irogers@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> 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 CF086C433EF for <linux-arm-kernel@archiver.kernel.org>; Wed, 8 Dec 2021 02:52:47 +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:Cc:To:From:Subject:References: Mime-Version:Message-Id:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=qjQfHguw+BrkUbR8CF9A59s5/gSfSWTMFiUqAZVnlV0=; b=hdbxg2dms1dvHAyvTDPU8Bdum8 v6+dfGzdEjFJl7bkrXng58Sd9rRhNvNo5chxJMIyZw5YtqElY3pRd5914EEGTgu9VhdtAjRD8Mcsq eyMwzK8f7/5BBP3DSuxKnSaEio1Hbm08wz/O83BYqBIjgCqD10iPfCuttL/PyF/hcvwQNzhG0nnd3 QrzqF3IkA6PSkL596RbQpb4o1lRWV3MJBVR5TbN1tkxzghryPaqUH+ucSsakNrKCgJ9hS7cGvUI8/ BBaRMJ8M8mW71Wkvb6q1hHEsLVKEExgovls6Qa3otDZ6XsngmKfcSRjGqiE3n6vB1BNJkxn0Jonkq F4d75+zQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mun2w-00AlUa-9A; Wed, 08 Dec 2021 02:51:07 +0000 Received: from mail-yb1-xb49.google.com ([2607:f8b0:4864:20::b49]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mumyb-00AjIh-Jg for linux-arm-kernel@lists.infradead.org; Wed, 08 Dec 2021 02:46:38 +0000 Received: by mail-yb1-xb49.google.com with SMTP id e131-20020a25d389000000b005fb5e6eb757so2016636ybf.22 for <linux-arm-kernel@lists.infradead.org>; Tue, 07 Dec 2021 18:46:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=JL9xm0pQGWjwf/D+CorLwzYUYcl9IVQI3NDKsfgtnNk=; b=C9P3/WGinLrMKvSFzzif8NHIWpzFbfaMv5OWFjpGjE9dXlDuoJysDeX2XBtpbhdjMM fB9RjhQE20ez1WsJo6z5c1F6oWTcAkkMxst0JjdA4+TSNZtJtY+I9QMLZeHmdZyFzYPt 3qWrer5wb8gPFZtfrQds6mSe4juDZzYBCAa77NA+cDcLqXSaANMtP9nYQqyL11EJXY3a wJ6/ZEtGpLzrwpWkqKaFde7Hj6Y37ClqDcM+a/EZfOi+9CCpnzTLNQNyVTlEWp4KJHxX m9KPxLkrABZSohO966ruLrh3PVBmeaNHyYdPCzJ7wN2jM+mTWFSUd8zMpJNWjtzaM2Vg J3xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=JL9xm0pQGWjwf/D+CorLwzYUYcl9IVQI3NDKsfgtnNk=; b=UyOgbih8xKXvmIxZRnRxU5jcTw/UBEKN1bbdfZthCjw8axHmjt5IeUuYpI6r/xJctV cHelc/wju7SGklxnyEjfWbAVKmuiKdTqqBiBtn8duXTrn+KKL25sBDBo8w982LcahCG7 gYOdecszYiIsMnuFqSSxN8zz62tjXXt2f3Mn2hLsSFYkB1ORWUFr4eWTPIhzciLzm8H3 jNe/2i8+ugnePQCl5yd0Qy3VjQt2AvfDFh84JeUgLrrM2dozTrP8P8I+58xnWt+B/v/Y T45oRRLA6W2N2D4G5SbSRAffCg9FPSKQtGPzU1cgsHLO3Ty8ObzBPiq2QY4FgD0ovrbT I1Zw== X-Gm-Message-State: AOAM533TTZNm+ns4eMJLkBN4VfLCL2HnhBleJK9FZosdRFmHLm4/d/24 gkC71CjRriYVAKBHZ1zT6ZdZGMUCNAgH X-Google-Smtp-Source: ABdhPJyJ0bej87Fe++nEKMg3a/0nS/mAECp36Njxy2YWfSsOX0jck/jJeh25/ElQ7Gfv8JWtc2Ax0+tWpmuM X-Received: from irogers.svl.corp.google.com ([2620:15c:2cd:202:57e:1dbb:34b4:8257]) (user=irogers job=sendgmr) by 2002:a25:cbd7:: with SMTP id b206mr55557475ybg.737.1638931596072; Tue, 07 Dec 2021 18:46:36 -0800 (PST) Date: Tue, 7 Dec 2021 18:45:55 -0800 In-Reply-To: <20211208024607.1784932-1-irogers@google.com> Message-Id: <20211208024607.1784932-11-irogers@google.com> Mime-Version: 1.0 References: <20211208024607.1784932-1-irogers@google.com> X-Mailer: git-send-email 2.34.1.400.ga245620fadb-goog Subject: [PATCH 10/22] perf cpumap: Add comments to aggr_cpu_id From: Ian Rogers <irogers@google.com> To: Andi Kleen <ak@linux.intel.com>, Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>, John Garry <john.garry@huawei.com>, Kajol Jain <kjain@linux.ibm.com>, "Paul A . Clarke" <pc@us.ibm.com>, Arnaldo Carvalho de Melo <acme@kernel.org>, Riccardo Mancini <rickyman7@gmail.com>, Kan Liang <kan.liang@linux.intel.com>, Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@redhat.com>, Mark Rutland <mark.rutland@arm.com>, Alexander Shishkin <alexander.shishkin@linux.intel.com>, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Vineet Singh <vineet.singh@intel.com>, James Clark <james.clark@arm.com>, Mathieu Poirier <mathieu.poirier@linaro.org>, Suzuki K Poulose <suzuki.poulose@arm.com>, Mike Leach <mike.leach@linaro.org>, Leo Yan <leo.yan@linaro.org>, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org Cc: eranian@google.com, Ian Rogers <irogers@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211207_184637_692351_FAF53C4B X-CRM114-Status: GOOD ( 10.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
Refactor perf cpumap
|
expand
|
diff --git a/tools/perf/util/cpumap.h b/tools/perf/util/cpumap.h index f0121dd4fdcb..edd93e1db36a 100644 --- a/tools/perf/util/cpumap.h +++ b/tools/perf/util/cpumap.h @@ -7,11 +7,20 @@ #include <internal/cpumap.h> #include <perf/cpumap.h> +/** Identify where counts are aggregated, -1 implies not to aggregate. */ struct aggr_cpu_id { + /** A value in the range 0 to number of threads. */ int thread; + /** The numa node X as read from /sys/devices/system/node/nodeX. */ int node; + /** + * The socket number as read from + * /sys/devices/system/cpu/cpuX/topology/physical_package_id. + */ int socket; + /** The die id as read from /sys/devices/system/cpu/cpuX/topology/die_id. */ int die; + /** The core id as read from /sys/devices/system/cpu/cpuX/topology/core_id. */ int core; };
This code is already tested in topology.c. Signed-off-by: Ian Rogers <irogers@google.com> --- tools/perf/util/cpumap.h | 9 +++++++++ 1 file changed, 9 insertions(+)