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 793FDC433F5 for ; Wed, 5 Jan 2022 06:38:49 +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=bFPE90Pz+Jxc7nWspke7mnhVkoEe7VHQ0vIjPE/QinY=; b=N8xIrk48wQtPvmWWeXh2HwVeWD XUdl0t4SHFpC5X2syLxysGIObV8qoifrqAcxXmsibtzwAyuTUPG0eec+osP/cs1GbPgJpvGtkb9fA 6PNwn1vwxiJI+2ogDr6FcL716PTRGZ6oQdXH0GBYcivDOCEginj8fez/Y97mrnMrPRMjuK3uj89Mr /wLXLCVRrY29H3Cnnm+boF0TI6FBOTF6vpofyJLAGN8L4rVjp/FWTCAAL88IwUNTc5qWle+dbAcGU l/bAqCkcOsg5xJhmYtU3ue4W9Au3tdlQG4oLWCZqYU83Q5EEbsfJYEMAUx3L95pvtGLjX31LjlQIX qG9C6YsA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n4zvC-00Dp1m-2G; Wed, 05 Jan 2022 06:37:18 +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 1n4zZn-00DgBn-SH for linux-arm-kernel@lists.infradead.org; Wed, 05 Jan 2022 06:15:13 +0000 Received: by mail-yb1-xb49.google.com with SMTP id s7-20020a5b0447000000b005fb83901511so71119217ybp.11 for ; Tue, 04 Jan 2022 22:15:10 -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=8kii3dU4XUig2NsMBYh2ztP77tNeRDKF26nqmJlinnw=; b=BSYcjgUHghko72edoiIv4G3cjKBzq3ehGryZJE+H8BRTklqIkutZuePSRHPpMV6vBw Z06T8Bp1YNRRHloiV7U+1uZP2Bhs5d+lVTRziFfQ1AOLjcQwfiIexNiEc202pyfnMax9 N9njEIRcEKtKTN1xsAVdtk9zmsWzAoJXPpVbJnBTZzYdCbodW2lknjllCqmCnVvemOci aTObHJCt6X4QIUGWKxDuN6UO6RAX/7XbOpdQaYSMetQVQ2PyU5Xr2EldMOS55EGCafWy LEgt2OIF8c5qVFS1B/5WOHwH7hrXZ0PVKuZkExuxCVbUTtBpOUW2PzbSueFNDveySNMH rMYg== 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=8kii3dU4XUig2NsMBYh2ztP77tNeRDKF26nqmJlinnw=; b=n28Mb69+DVaNRzUJnLDZnGiYHv1n6kmgqu356+LgoQmVtn29wuDliD1Nju9RkRuoua icuRrKpQPp9z9TsHQOZJtXozTIDjwe33J0WVYjwUSBIEOee/qcz/G2+aKHsJbEfRrfbl Kc6bNfOCsmnhypno+ImvLeAUF8Xqq3bFZH+838Db4aNTsj6L7zBXLjJXF9K/0pR1lCBa Apv97S9lKtbB2qBGEB6Vdeq30602vDnI0IgXEzhTaD/UTDDxAoh6J7Y2djdc9zeAdweN eAdGR4nmxBUkC3PCMzKJoSWTOVNwcYO6bxujCaF3iqvaYymbdHMRykbkg6uHUhAG2I0G XHeg== X-Gm-Message-State: AOAM531mHJQtyegv+ZocQO4ao2pD2fWYUxva514TG36G4NjJMX5ZKAm1 6lsg+32b94tohldkuHzPUFVao+qiX2jW X-Google-Smtp-Source: ABdhPJyACmhRpL//P3NHuYdqf28x0b4/9Re1ZbBwgLpJRx+vhfd3Aq0crqV0mPEFMOz5FCU1L4iYQZxlghlk X-Received: from irogers.svl.corp.google.com ([2620:15c:2cd:202:3af1:caef:2937:5d2b]) (user=irogers job=sendgmr) by 2002:a25:b5c3:: with SMTP id d3mr72174615ybg.665.1641363310263; Tue, 04 Jan 2022 22:15:10 -0800 (PST) Date: Tue, 4 Jan 2022 22:13:32 -0800 In-Reply-To: <20220105061351.120843-1-irogers@google.com> Message-Id: <20220105061351.120843-30-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 29/48] perf counts: Switch name cpu to cpu_map_idx 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_221511_974038_27E2FF66 X-CRM114-Status: GOOD ( 12.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 Try to reduce confusion in particular when the cpu map doesn't contain an entry for every CPU. Signed-off-by: Ian Rogers --- tools/perf/util/counts.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/perf/util/counts.h b/tools/perf/util/counts.h index 3e275e9c60d1..5de275194f2b 100644 --- a/tools/perf/util/counts.h +++ b/tools/perf/util/counts.h @@ -18,21 +18,21 @@ struct perf_counts { static inline struct perf_counts_values* -perf_counts(struct perf_counts *counts, int cpu, int thread) +perf_counts(struct perf_counts *counts, int cpu_map_idx, int thread) { - return xyarray__entry(counts->values, cpu, thread); + return xyarray__entry(counts->values, cpu_map_idx, thread); } static inline bool -perf_counts__is_loaded(struct perf_counts *counts, int cpu, int thread) +perf_counts__is_loaded(struct perf_counts *counts, int cpu_map_idx, int thread) { - return *((bool *) xyarray__entry(counts->loaded, cpu, thread)); + return *((bool *) xyarray__entry(counts->loaded, cpu_map_idx, thread)); } static inline void -perf_counts__set_loaded(struct perf_counts *counts, int cpu, int thread, bool loaded) +perf_counts__set_loaded(struct perf_counts *counts, int cpu_map_idx, int thread, bool loaded) { - *((bool *) xyarray__entry(counts->loaded, cpu, thread)) = loaded; + *((bool *) xyarray__entry(counts->loaded, cpu_map_idx, thread)) = loaded; } struct perf_counts *perf_counts__new(int ncpus, int nthreads); -- 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