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 92519C433EF for ; Wed, 5 Jan 2022 06:19: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=A8AtgFDog/b15qj4MxD8ESIVPqznQoBbwpXs7JpEcSU=; b=KeKuT1LYG+68uDM1mCFLmiWqjs VmtIpRXVq34VrNwkMtSJUIOPeM2qHOjMtRl6GhhtzvWI88abKfJlNGqNrWqx1qjsAZoyaUbI7jEzB ul4u7SpE3R3yV16c5UMkt1wbyAVVH9frPhlNzuL8Y1+dEJX9VmSb4/ricQvuQrU2sfqn/jA2Tq/sF TFBRegSYFxqNvfWlvqPtd8ahkfuGuOrySaxGlLyVtysHAAR9GlEP0XnMb+vLgIklS5fpRhUddFp90 OY+7tio870pEkzwj324u35SC6cZ6xepl30edlztxvwI66Fyo+0dlW2Cid2fQhVSSRBoqMg8AnUYWv WGAhUCMw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n4zcm-00DhvH-HJ; Wed, 05 Jan 2022 06:18:16 +0000 Received: from mail-yb1-xb4a.google.com ([2607:f8b0:4864:20::b4a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n4zZ1-00Dfk0-SC for linux-arm-kernel@lists.infradead.org; Wed, 05 Jan 2022 06:14:25 +0000 Received: by mail-yb1-xb4a.google.com with SMTP id p140-20020a257492000000b0060dbb88d8abso40291074ybc.15 for ; Tue, 04 Jan 2022 22:14:22 -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=K2wBwOVyFri8+1g7YkCIisUBaXjxQi5efEY6sDY0QS0=; b=nVn71VGOgLwfr+GmVqVo1K35CBgy/AFV5UxEuzVlA8ZZSNL/7vpugvAw/J8MVfrgc3 +rTa+81IyJ8PRvEnYWYqUunC6z/clp7I0YJjIkZNxY7P24sBC0KxH4oOXQx2fCvUdHbF LTcukjuSTrQYab2na6rucy1FBiMBXvUgVDd6GyrAy0tx8jbOwSrUuRCoQdYylUQMjRV0 w3gooDlUSh2sgMyT1gs2+TItf5syO/8aCwP6y+76UKr8rbaLHXa6GwPcwNV64oGmDq1O Wqk8Bz/MPDWWvO5gOsbOtah7JCblCWGdEAvmHw0ArTM9KR9U/952O5ySv+NFY+ULG5UO nWOA== 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=K2wBwOVyFri8+1g7YkCIisUBaXjxQi5efEY6sDY0QS0=; b=oYNPdMjupUK/TAUOygz19aoivjPj0aXx9AECyHSZV4uLd/BA6lHmKhpPAq614N2tqB d4x+lpiqb0YMIfkaWXfGYWkCqivb/2OFlR/9plxNRCPzAWAPOz8OSpCy3TRFXmeW75oy PtpHS5k29jm23cY87ST6RdorEb+IJfNkwvYk5VZZ1LRR3liGTTm8GhpCFj6ks80U8Vvz 7NoFa57huc+3QTOQlBP/o2N6vVA7W+K+mdywgRHo37XmK3v4UIgsHRwtq3PvFD4/ZCsl Q9uLNadShKURRNbFjS4/S5VHW/I6KYRcTlu500iITHuhsWrAjcv4IHTvj5rTrneJUJoy trvw== X-Gm-Message-State: AOAM533KxbncvuRMNFUr+CokwbBVYA6cUJhtZe/etjvFfToqwTfnzngH aFdzK+EV3plJu+i9MzMweVPrx8RxWZV1 X-Google-Smtp-Source: ABdhPJxzM8p/CvjXb5jSkfNIAE2Koghi+sxiWFRQaRz/IQIj55KwLm3rFowpJHwwJwFmUxd2gyqSBJoYE9Fo X-Received: from irogers.svl.corp.google.com ([2620:15c:2cd:202:3af1:caef:2937:5d2b]) (user=irogers job=sendgmr) by 2002:a25:868c:: with SMTP id z12mr47594241ybk.12.1641363262213; Tue, 04 Jan 2022 22:14:22 -0800 (PST) Date: Tue, 4 Jan 2022 22:13:13 -0800 In-Reply-To: <20220105061351.120843-1-irogers@google.com> Message-Id: <20220105061351.120843-11-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 10/48] perf cpumap: Remove map+index get_node 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_221423_935177_29BB5A88 X-CRM114-Status: GOOD ( 14.07 ) 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 Migrate final users to appropriate cpu variant. Reviewed-by: James Clark Signed-off-by: Ian Rogers --- tools/perf/tests/topology.c | 2 +- tools/perf/util/cpumap.c | 8 -------- tools/perf/util/cpumap.h | 1 - 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/tools/perf/tests/topology.c b/tools/perf/tests/topology.c index 9a671670415a..5992b323c4f5 100644 --- a/tools/perf/tests/topology.c +++ b/tools/perf/tests/topology.c @@ -162,7 +162,7 @@ static int check_cpu_topology(char *path, struct perf_cpu_map *map) // Test that node ID contains only node for (i = 0; i < map->nr; i++) { - id = cpu_map__get_node(map, i, NULL); + id = cpu_map__get_node_aggr_by_cpu(perf_cpu_map__cpu(map, i), NULL); TEST_ASSERT_VAL("Node map - Node ID doesn't match", cpu__get_node(map->map[i]) == id.node); TEST_ASSERT_VAL("Node map - Socket is set", id.socket == -1); diff --git a/tools/perf/util/cpumap.c b/tools/perf/util/cpumap.c index e8149bcf8bfa..f67b2e7aac13 100644 --- a/tools/perf/util/cpumap.c +++ b/tools/perf/util/cpumap.c @@ -254,14 +254,6 @@ struct aggr_cpu_id cpu_map__get_node_aggr_by_cpu(int cpu, void *data __maybe_unu return id; } -struct aggr_cpu_id cpu_map__get_node(struct perf_cpu_map *map, int idx, void *data) -{ - if (idx < 0 || idx >= map->nr) - return cpu_map__empty_aggr_cpu_id(); - - return cpu_map__get_node_aggr_by_cpu(map->map[idx], data); -} - int cpu_map__build_socket_map(struct perf_cpu_map *cpus, struct cpu_aggr_map **sockp) { return cpu_map__build_map(cpus, sockp, cpu_map__get_socket_aggr_by_cpu, NULL); diff --git a/tools/perf/util/cpumap.h b/tools/perf/util/cpumap.h index 7e1829468bd6..f0121dd4fdcb 100644 --- a/tools/perf/util/cpumap.h +++ b/tools/perf/util/cpumap.h @@ -38,7 +38,6 @@ 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); -struct aggr_cpu_id cpu_map__get_node(struct perf_cpu_map *map, int idx, 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); int cpu_map__build_core_map(struct perf_cpu_map *cpus, struct cpu_aggr_map **corep); -- 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