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 78484C433F5 for ; Wed, 5 Jan 2022 06:20:16 +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=SvLcobQApLJeZ7si/LAPHl2szenbt+wtKSVujVkDlTM=; b=lPVj+eD+l4aZDquGOzSUtHMcMd PoMevlMwg4COzprpaW8Mfm3WmLNkWacCQZOGFj5lLBx75lajAnE26YYyOR/O1n8mjVTKDtr9cljak gIRzCzEbwiyKup6hvBE7gbhSpPxBz0d4f286hOh1gsdrOd/ORsTgv7tlw79TStLic9YMcbB2PfNDY U9lDY4O05gWAfoNq1jtvocCuR6SckhoFSb1K7kPj8xxYZbpZVXkBjJjpPVjP8T1D+d4ahMovQB95I 9Y/Sg59cwb98FFKn6zv18/IENw+tBKBjLDJ+5N7tuDa8XPsqDoPQ72DP8kZJJ1LAB3vkpjiZn+bVc vQbp1O/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n4zdI-00DiAS-QB; Wed, 05 Jan 2022 06:18:49 +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 1n4zZ4-00Dfl8-7G for linux-arm-kernel@lists.infradead.org; Wed, 05 Jan 2022 06:14:27 +0000 Received: by mail-yb1-xb49.google.com with SMTP id i65-20020a252244000000b0060b2e5fd54cso56199893ybi.13 for ; Tue, 04 Jan 2022 22:14:25 -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=dtLecDqeKsVhu8ABFSrCuZx030SIijpylbO9HpLxlsg=; b=rPvr9gWoMp+tcEvklfD5YFGVB4IOVMSXA117VxrsDkCGWfU/2AA1KKemErzaEz1j80 nBOEQnRPHAZFKtZRHLMcfPdJO5iUjmMNZp+pTJc8ZThvUUVVivW4pU5HY/m1WM2hPB1r fFgp7YMx2E53p36U8UPtkcsIFA1BkZmpGUK1ebEvL0WRIuV4KUw2q5N6hk3ixJfP4Fec A8MOSS8M9nQVwuVHZmMKL5FR/AGkCMf1ZytTNVvm0hqsZVD9XiIXTOJWeoW3mW3a06mO jeK2e2sUGr8eVylaGRBrV3wSFdyuxaVMdsukodtAhx5H6uPONqT9WsqTOZvBplqlLHim sQNA== 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=dtLecDqeKsVhu8ABFSrCuZx030SIijpylbO9HpLxlsg=; b=qvVl0U3RpNlOKf8O+y0i61/xFbOJNu3r16QKzDHvAsb40PzqUpCGZmPU8qMh4sy5q0 5SwrskVcBXHBxhuHyGYmiNk9J2IuWyV040Qhh3J6XxBDbeANbKIjoI6VU/1hIART04Gy I3zBKxAhYl2HQK29CyK/rzvAlVRMsuFKrQCaWsRuWSnZf+PezCcUnhgaO2SxOOw92vHC Hy3aa+G7cYRwqkZC3mJlLL8c8wD3VNYAYZr9Lf6Xp+t3RrEhxghIUW+D1s0MSiM3WTmQ fysVS8yFwdf50yr2sBx3mKExqS5pw8KgGld7zUyyXdqTgEL9r/msh1gtx//f4+mO8cUk wCZg== X-Gm-Message-State: AOAM532QUQ822tnhTHq9gqz3dvbNnZ9wSup+TB37dpIqqfEepaD/jRZc 75XMW2cjOTMIwuHi8obRV8iagOXfnibB X-Google-Smtp-Source: ABdhPJyH6R41LCy4/zs50E9ENXaQ6Sbr6DfCrUwXfPwYx/SOE3XFHZos7IPT/kYvGsrk6IipKw4if2TGN8YU X-Received: from irogers.svl.corp.google.com ([2620:15c:2cd:202:3af1:caef:2937:5d2b]) (user=irogers job=sendgmr) by 2002:a25:b1a7:: with SMTP id h39mr55511579ybj.142.1641363264670; Tue, 04 Jan 2022 22:14:24 -0800 (PST) Date: Tue, 4 Jan 2022 22:13:14 -0800 In-Reply-To: <20220105061351.120843-1-irogers@google.com> Message-Id: <20220105061351.120843-12-irogers@google.com> Mime-Version: 1.0 References: <20220105061351.120843-1-irogers@google.com> X-Mailer: git-send-email 2.34.1.448.ga2b2bfdf31-goog Subject: [PATCH v4 11/48] perf cpumap: Add comments to aggr_cpu_id From: Ian Rogers To: Andi Kleen , Jiri Olsa , Namhyung Kim , John Garry , Kajol Jain , "Paul A . Clarke" , Arnaldo Carvalho de Melo , Riccardo Mancini , Kan Liang , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Vineet Singh , James Clark , Mathieu Poirier , Suzuki K Poulose , Mike Leach , Leo Yan , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, zhengjun.xing@intel.com Cc: eranian@google.com, Ian Rogers X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220104_221426_295651_52CB706B X-CRM114-Status: GOOD ( 10.82 ) 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 This code is already tested in topology.c. Reviewed-by: James Clark Signed-off-by: Ian Rogers --- tools/perf/util/cpumap.h | 9 +++++++++ 1 file changed, 9 insertions(+) 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 #include +/** 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; }; -- 2.34.1.448.ga2b2bfdf31-goog _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel