Message ID | 20220105061351.120843-42-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 61336C433F5 for <linux-arm-kernel@archiver.kernel.org>; Wed, 5 Jan 2022 06:49:53 +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=CSfhPmx62R/s/o1IKvFhnu3J5dq/JH/PeLs1X3d3W4o=; b=h6Pq2VBX9rPN/Gjonia/LIdDCB SanDCqwEwOCGvIevZa7aBbCbp/RgRbaT1Yf4ZokMGtbmxBLqVbPkbQs6RXbhd0G6oDM5zgqlsvbzp G6GWQv6k7e99BYHJoP0QAgRf66gNaSVBQxnou1zsvhTD5vmxb7WXqdQqj+Rfv7kRZV3RpBgfkbhka /NBJWI7c57UwuDl7kL7I9/Z4RKboJ5BQHcHiVLAjCjdCdOVZrkn0cYppTQggV6MmEt5MYp2uhB7p/ mQpFTvNGEN3q4mTsU2GyEPhFufTJNWxj3rF/A0RZHDqP6X7gcNthIp/eKpa8UuKXbP7j0AsAAQT0X Icx9OoPA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n505r-00Dsuw-HS; Wed, 05 Jan 2022 06:48:20 +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 1n4zaH-00DgWA-7w for linux-arm-kernel@lists.infradead.org; Wed, 05 Jan 2022 06:15:42 +0000 Received: by mail-yb1-xb49.google.com with SMTP id b6-20020a256706000000b0060aa7315dd9so58382301ybc.9 for <linux-arm-kernel@lists.infradead.org>; Tue, 04 Jan 2022 22:15:40 -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=wNEaBrVID5KM3S+MlzNQlzdEQtierpy9+J1kdBtC9c0=; b=WZn8xmkrKYSldq7JqIbFNcKZISXWtE24gAeqxe6WCDbrccu2Na4X6LhsDB70POLjWs GZiEqTanFDVpY5baoNwRYrFOkXnFRPPTjViOrsSBkVFTbcJOAxANKymYca22p/Ij1mT+ 6QHcEP/VK4Ks06lVGJXFdog6KwUPjRgxSjNLKX7etHoFKCrGQs8GFqxlimdnEdmK76Hf wlzYah3Zlq7dvgc50O40UriT9aaXwwKKqvgd5GQx8SCa/N8Fz7KQZQkMl9fEZnX2Oalu y7nZLXzm/U1WJI3LpZ8bBn6cEAOgOsV6+JEUWmCQJ3rLIQSlNGMhKCiGrlGLWFyisIU7 3/0Q== 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=wNEaBrVID5KM3S+MlzNQlzdEQtierpy9+J1kdBtC9c0=; b=ipgrrTPib1X6KFp8iakl/0GIg/i/kRifLhEUSutsGy7nNjEI6hySP6kxIuljtGV5ll AlPsj0wWKIjk+rf/6L02KaIR9LLB8B+jo2DUZFth8mBHSF8fVCR6KsioqxNPig/qVdFM uXmSfR8lSu3vWII01298u7QBFHatFEE3byI5WR11zibF16IVEM3ByurscMKQpPZV3RKU d8Mv8NQAosR1JNgZAkyWOKe0YkSzmwwK+EQuGT4UnWlibL3FsKKaOjTazBjBiuFq+1FB Ob/fdYw9M3eezqErB4azFUDy5dSeTHAfz5bO79nq8QWDLEOCmx7cBjGuhYr2mePbUV/1 Nmvw== X-Gm-Message-State: AOAM533J7i4DQmw4GXWRt+WpOcMzeBU2hJQ8ZfzY2LSeNCtdHyC5RR6t F+b+r7t+CPm+9rPjRqvNxpda/dJmUPEN X-Google-Smtp-Source: ABdhPJxvHg/G/TnVmSMcJExq8JscSaEMGMUJGDv0dfelD+vcY1O+NwfP5Cg4pWKMN5NrRECAnW1joptjWk29 X-Received: from irogers.svl.corp.google.com ([2620:15c:2cd:202:3af1:caef:2937:5d2b]) (user=irogers job=sendgmr) by 2002:a25:7609:: with SMTP id r9mr50860138ybc.508.1641363339813; Tue, 04 Jan 2022 22:15:39 -0800 (PST) Date: Tue, 4 Jan 2022 22:13:44 -0800 In-Reply-To: <20220105061351.120843-1-irogers@google.com> Message-Id: <20220105061351.120843-42-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 41/48] perf stat: Correct check_per_pkg cpu 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, zhengjun.xing@intel.com 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-20220104_221541_328892_667B62C9 X-CRM114-Status: GOOD ( 12.64 ) 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/stat.c b/tools/perf/util/stat.c index f7f9757eba23..86ab427e87fc 100644 --- a/tools/perf/util/stat.c +++ b/tools/perf/util/stat.c @@ -292,11 +292,12 @@ static bool pkg_id_equal(const void *__key1, const void *__key2, return *key1 == *key2; } -static int check_per_pkg(struct evsel *counter, - struct perf_counts_values *vals, int cpu, bool *skip) +static int check_per_pkg(struct evsel *counter, struct perf_counts_values *vals, + int cpu_map_idx, bool *skip) { struct hashmap *mask = counter->per_pkg_mask; struct perf_cpu_map *cpus = evsel__cpus(counter); + int cpu = perf_cpu_map__cpu(cpus, cpu_map_idx); int s, d, ret = 0; uint64_t *key;
Code was incorrectly using the cpu map index as the CPU. Signed-off-by: Ian Rogers <irogers@google.com> --- tools/perf/util/stat.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)