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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10906C433EF for ; Wed, 8 Dec 2021 02:47:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243730AbhLHCud (ORCPT ); Tue, 7 Dec 2021 21:50:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243579AbhLHCuR (ORCPT ); Tue, 7 Dec 2021 21:50:17 -0500 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5B1DC061A32 for ; Tue, 7 Dec 2021 18:46:46 -0800 (PST) Received: by mail-yb1-xb4a.google.com with SMTP id b15-20020a25ae8f000000b005c20f367790so2169639ybj.2 for ; Tue, 07 Dec 2021 18:46:46 -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=rTq2YskjpmXVXRfPu7O59kpDvN8VVeHIUZQ9nlJqsU4=; b=nUlEFDsP6fLKimtJIV4q+SFIqJLMqWEQ048ihlmwurraCkiFNybl4hHa7iWitlCw4a IyBAuOdNukFZ5fiNTly2wnn/rtBPQkwCtsdEnP+s4aivuKzUuOaSLgUGM/RlAu2K8svH S+ppK0vqWb73I0ga2AettVHio/n+HlJCU8etIRxjNPcX0y4UsZNcPRBn1PdUqNcndgTJ ysGFhb/2HttBGUJvU950o8paEg0m4YNQvXYqAANldOVL5sVjXuQaBDJ/80GP4/ZTkohN X0x77Po+QIEyugHoEzTYQFJoms/ZqXmQdsBZIWJo2RMDcOK0kPJKUvTHHVnH6z2GwpwS UWDg== 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=rTq2YskjpmXVXRfPu7O59kpDvN8VVeHIUZQ9nlJqsU4=; b=PxTFbGjVd0RGJU8Zod7gCGzyXOd9lhHnHEgbmn0GSJbxXeScWE/f6OQM/w+aY76aMk 5Dvfib7EDNb3Hvf9Kn26Zbvc6QRhCFqZ+Bcx8bzA3+cyrXtvLlv6tdQvPVycck0f37gW 7NA1XKZ50+1fNvTC72/2LU7OVbO75Iunv2SgWIL/iVjnfrMyxRnrTMaTMOB+2un2e8Cr EK/N3/sIN9FdOkwkIGS7Jsvb+lcaBkgdvOLbMj2Vz30uN3dsZS119NfDuL/Q3XgjgSKh pPCRxMwQHkiKhZph/zbE+/Fedg2drrBOpWtP8R3MYEr5LAdDAfjsbNwP8VkvT8CMs9xN Cdqw== X-Gm-Message-State: AOAM530KGAEGfO/YQ2sdyvj/a7hBfNo8k07jQZxMO/aDmv0h0PBXECXI soUrkOc7PcSJLOfDqnx4tto7GiPyeRpy X-Google-Smtp-Source: ABdhPJy/hokZEy+sBznkgBku3x531VQ30ZE5SCjzVyl6aTwPUvHtZ4Sk+7bEUVH1MIoOOrhhu9J7f6ciAPE5 X-Received: from irogers.svl.corp.google.com ([2620:15c:2cd:202:57e:1dbb:34b4:8257]) (user=irogers job=sendgmr) by 2002:a5b:c01:: with SMTP id f1mr54880603ybq.617.1638931605872; Tue, 07 Dec 2021 18:46:45 -0800 (PST) Date: Tue, 7 Dec 2021 18:45:59 -0800 In-Reply-To: <20211208024607.1784932-1-irogers@google.com> Message-Id: <20211208024607.1784932-15-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 14/22] perf cpumap: Document cpu__get_node and remove redundant function 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 Cc: eranian@google.com, Ian Rogers Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org cpu_map__get_node_id isn't used externally and merely delegates to cpu__get_node. Signed-off-by: Ian Rogers --- tools/perf/util/cpumap.c | 11 +++++------ tools/perf/util/cpumap.h | 5 ++++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/tools/perf/util/cpumap.c b/tools/perf/util/cpumap.c index b3e1304aca0c..1626b0991408 100644 --- a/tools/perf/util/cpumap.c +++ b/tools/perf/util/cpumap.c @@ -16,6 +16,10 @@ static int max_cpu_num; static int max_present_cpu_num; static int max_node_num; +/** + * The numa node X as read from /sys/devices/system/node/nodeX indexed by the + * CPU number. + */ static int *cpunode_map; static struct perf_cpu_map *cpu_map__from_entries(struct cpu_map_entries *cpus) @@ -222,11 +226,6 @@ int cpu_map__get_core_id(int cpu) return ret ?: value; } -int cpu_map__get_node_id(int cpu) -{ - return cpu__get_node(cpu); -} - struct aggr_cpu_id cpu_map__get_core_aggr_by_cpu(int cpu, void *data) { struct aggr_cpu_id id; @@ -250,7 +249,7 @@ struct aggr_cpu_id cpu_map__get_node_aggr_by_cpu(int cpu, void *data __maybe_unu { struct aggr_cpu_id id = aggr_cpu_id__empty(); - id.node = cpu_map__get_node_id(cpu); + id.node = cpu__get_node(cpu); return id; } diff --git a/tools/perf/util/cpumap.h b/tools/perf/util/cpumap.h index 9589b0001a28..f849f01c5860 100644 --- a/tools/perf/util/cpumap.h +++ b/tools/perf/util/cpumap.h @@ -45,7 +45,6 @@ int cpu_map__get_die_id(int cpu); struct aggr_cpu_id cpu_map__get_die_aggr_by_cpu(int cpu, void *data); int cpu_map__get_core_id(int cpu); struct aggr_cpu_id cpu_map__get_core_aggr_by_cpu(int cpu, void *data); -int cpu_map__get_node_id(int cpu); struct aggr_cpu_id cpu_map__get_node_aggr_by_cpu(int cpu, void *data); int cpu_map__build_socket_map(struct perf_cpu_map *cpus, struct cpu_aggr_map **sockp); int cpu_map__build_die_map(struct perf_cpu_map *cpus, struct cpu_aggr_map **diep); @@ -58,6 +57,10 @@ int cpu__setup_cpunode_map(void); int cpu__max_node(void); int cpu__max_cpu(void); int cpu__max_present_cpu(void); +/** + * cpu__get_node - Returns the numa node X as read from + * /sys/devices/system/node/nodeX for the given CPU. + */ int cpu__get_node(int cpu); int cpu_map__build_map(struct perf_cpu_map *cpus, struct cpu_aggr_map **res, -- 2.34.1.400.ga245620fadb-goog 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 38A06C433EF for ; Wed, 8 Dec 2021 02:57:17 +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=Rvz3AVAnOmVivOgWzIuhrOTTMC3Yjr7ou9ky2gH9Zvk=; b=Ecfy+xsKGdDOgZJhdK7074yaqt 27WoPWMu/zQJG+T7hqC0NN4x0uj+DpTi19H3aBTuadDW8hOD0txS4knc8kxNkWpElTkvJzop+0Iyy CrRtXtETZV/pVIiqD6ZOlvDSrViAEXz4cidBWBv1rn19PoN+cr1BneGcpfQEw5CJmEE14YkjKFtkC ds7Q65ee7SdK2px5oC+g9lGSkAY7+/wHi2Y2NRPbGgykfkTXEKJsblURqBD9I6XYwi8bU5jwy/CwF tl4e5Y0unD/J62NSNnXoK+0lnlv64THJSzTrfm+9p/LpOpEjUJTmTv4o1DK9jJBKPcINNBbjkiLnb LklbWiNg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mun71-00AnCi-JP; Wed, 08 Dec 2021 02:55:19 +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 1mumyl-00AjOV-Gc for linux-arm-kernel@lists.infradead.org; Wed, 08 Dec 2021 02:46:50 +0000 Received: by mail-yb1-xb49.google.com with SMTP id l75-20020a25254e000000b005f763be2fecso2130132ybl.7 for ; Tue, 07 Dec 2021 18:46:46 -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=rTq2YskjpmXVXRfPu7O59kpDvN8VVeHIUZQ9nlJqsU4=; b=nUlEFDsP6fLKimtJIV4q+SFIqJLMqWEQ048ihlmwurraCkiFNybl4hHa7iWitlCw4a IyBAuOdNukFZ5fiNTly2wnn/rtBPQkwCtsdEnP+s4aivuKzUuOaSLgUGM/RlAu2K8svH S+ppK0vqWb73I0ga2AettVHio/n+HlJCU8etIRxjNPcX0y4UsZNcPRBn1PdUqNcndgTJ ysGFhb/2HttBGUJvU950o8paEg0m4YNQvXYqAANldOVL5sVjXuQaBDJ/80GP4/ZTkohN X0x77Po+QIEyugHoEzTYQFJoms/ZqXmQdsBZIWJo2RMDcOK0kPJKUvTHHVnH6z2GwpwS UWDg== 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=rTq2YskjpmXVXRfPu7O59kpDvN8VVeHIUZQ9nlJqsU4=; b=wMYbnWneaMGcckHfcY1k+Ev+DThfZQNewJVNmIjMRuXgDGwIs4IbRC3B9RPHxLqKYH c9uhWfG5ihmZj2gH6NVOZZ+qEWA/PXougk5LnRcFsu0w8r+B7DrcHJOM3yeOxNTCOv9q O6VcJFaJUMBLpPEa58DN5RKQQY0LPo7znpzLhLCc9nhBNl+kyisnKXQN8Hj1dYSyZaer sa3dn8T70nQ0rVtGClbaRjbUeROjM2qO6Bbc2AvzSnyL6zBcp8L+hqd7txYdFax8Tupu nxq+5LuoZ6sXZuIJBsLx3ysvZ7/BY+Dszqd8eLLjEfye9RaS984QHq0EXiNQemw1qdCq XHTw== X-Gm-Message-State: AOAM531UwS2+yYXrdK0hirf/JmTxWY/qGPZuZ3ZIP4FJ9m8Je1dDrYYB 4hQ4UBuFFntXjUIJnkjcY9vMVn9YKXUY X-Google-Smtp-Source: ABdhPJy/hokZEy+sBznkgBku3x531VQ30ZE5SCjzVyl6aTwPUvHtZ4Sk+7bEUVH1MIoOOrhhu9J7f6ciAPE5 X-Received: from irogers.svl.corp.google.com ([2620:15c:2cd:202:57e:1dbb:34b4:8257]) (user=irogers job=sendgmr) by 2002:a5b:c01:: with SMTP id f1mr54880603ybq.617.1638931605872; Tue, 07 Dec 2021 18:46:45 -0800 (PST) Date: Tue, 7 Dec 2021 18:45:59 -0800 In-Reply-To: <20211208024607.1784932-1-irogers@google.com> Message-Id: <20211208024607.1784932-15-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 14/22] perf cpumap: Document cpu__get_node and remove redundant function 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 Cc: eranian@google.com, Ian Rogers X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211207_184647_605981_59559748 X-CRM114-Status: GOOD ( 12.47 ) 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 cpu_map__get_node_id isn't used externally and merely delegates to cpu__get_node. Signed-off-by: Ian Rogers --- tools/perf/util/cpumap.c | 11 +++++------ tools/perf/util/cpumap.h | 5 ++++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/tools/perf/util/cpumap.c b/tools/perf/util/cpumap.c index b3e1304aca0c..1626b0991408 100644 --- a/tools/perf/util/cpumap.c +++ b/tools/perf/util/cpumap.c @@ -16,6 +16,10 @@ static int max_cpu_num; static int max_present_cpu_num; static int max_node_num; +/** + * The numa node X as read from /sys/devices/system/node/nodeX indexed by the + * CPU number. + */ static int *cpunode_map; static struct perf_cpu_map *cpu_map__from_entries(struct cpu_map_entries *cpus) @@ -222,11 +226,6 @@ int cpu_map__get_core_id(int cpu) return ret ?: value; } -int cpu_map__get_node_id(int cpu) -{ - return cpu__get_node(cpu); -} - struct aggr_cpu_id cpu_map__get_core_aggr_by_cpu(int cpu, void *data) { struct aggr_cpu_id id; @@ -250,7 +249,7 @@ struct aggr_cpu_id cpu_map__get_node_aggr_by_cpu(int cpu, void *data __maybe_unu { struct aggr_cpu_id id = aggr_cpu_id__empty(); - id.node = cpu_map__get_node_id(cpu); + id.node = cpu__get_node(cpu); return id; } diff --git a/tools/perf/util/cpumap.h b/tools/perf/util/cpumap.h index 9589b0001a28..f849f01c5860 100644 --- a/tools/perf/util/cpumap.h +++ b/tools/perf/util/cpumap.h @@ -45,7 +45,6 @@ int cpu_map__get_die_id(int cpu); struct aggr_cpu_id cpu_map__get_die_aggr_by_cpu(int cpu, void *data); int cpu_map__get_core_id(int cpu); struct aggr_cpu_id cpu_map__get_core_aggr_by_cpu(int cpu, void *data); -int cpu_map__get_node_id(int cpu); struct aggr_cpu_id cpu_map__get_node_aggr_by_cpu(int cpu, void *data); int cpu_map__build_socket_map(struct perf_cpu_map *cpus, struct cpu_aggr_map **sockp); int cpu_map__build_die_map(struct perf_cpu_map *cpus, struct cpu_aggr_map **diep); @@ -58,6 +57,10 @@ int cpu__setup_cpunode_map(void); int cpu__max_node(void); int cpu__max_cpu(void); int cpu__max_present_cpu(void); +/** + * cpu__get_node - Returns the numa node X as read from + * /sys/devices/system/node/nodeX for the given CPU. + */ int cpu__get_node(int cpu); int cpu_map__build_map(struct perf_cpu_map *cpus, struct cpu_aggr_map **res, -- 2.34.1.400.ga245620fadb-goog _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel