Message ID | 20220105061351.120843-36-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 8E3F9C433F5 for <linux-arm-kernel@archiver.kernel.org>; Wed, 5 Jan 2022 06:44:15 +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=V54Dc74eY9F8kn7HzOUHG/qlVYdLTYbTXxOl3zvjt5c=; b=1O39Z6NLOYNvx7cSPkYBi60rud H8TP9k4LOrLqPhsUkSCAkbL9fGklBbHqRh1SvaUalyd9lT1iNU6LGpAfS4B6eJG/cdvc7iFwfHRkN ZppP7R7fv4+fzl6MdtEdt/+o9UDdq4E7iXnltzSZ9dILktOl111TsijCoUSDevUgc/xTbiidtYNlR 5sY8Clueqr9VeFGdFTpMiHyHzAuyoUR9HMNAPz4tDUU0JnfqfXNYEvrwPGSR34cvQg3a24GQhdLaH tk+Krmrzh5KPB8mxUyFq8Pgk0wIGEA1R1NaDLbDZZN4xxrOBtM2lxRTWWEmBF2khSPVohzntHYGFS PD3r8CQQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n500N-00DqsM-H6; Wed, 05 Jan 2022 06:42:42 +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 1n4za2-00DgM5-MJ for linux-arm-kernel@lists.infradead.org; Wed, 05 Jan 2022 06:15:28 +0000 Received: by mail-yb1-xb4a.google.com with SMTP id b6-20020a256706000000b0060aa7315dd9so58381406ybc.9 for <linux-arm-kernel@lists.infradead.org>; Tue, 04 Jan 2022 22:15: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=dr21UIWlWh08GpstPSt0DXreHsY1rvRjUlHXGQMgUUQ=; b=N23I1Y95+IicYXElTikWu4ibqxH7undrAZt9c6XkFA26KOXh0Cabt0ke3IUWLQCo6y MuY+49CfMYdz60bdKosSoQKvvW4T3gKUqNUjUCMPYN4+3DkWpaRE6B51xA8h2cTEUmIs hrksTXQr2bqb9F2RP89sVD8TZ9JZpVCT0cF3Xh5k3eRCo7v78OHCJF4nelsV6dg7OihL VOVgRzbICB5QffqLSPPd0CoRWGLZp9/HoHMmA667/6DkUZ8rNZF1xPAkECY9bTSCxR8i 727Gsx7Xm3oxcNtenH3PISyWYd64hCiCGEpjbuQITvKHVj8fphmH4KpcwH9rrsgHTCHM welg== 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=dr21UIWlWh08GpstPSt0DXreHsY1rvRjUlHXGQMgUUQ=; b=n4EHAy9nSni9cWU0rKSTG0ctjL5ep15qJr9Dc8tQfpCw7n1TE1N9QtdWn5s4RJiN7I yHto/Wmh6UQEMDMQTQLbIA1oq/LbA3N10tx3j/m4BgN7926ABHg+zHwUr99lgjmd2GRO Lb658eWRKvr8ro9RTcCO1TgmuO9nZp6M8kFQiVSndcj2SS7ZYhHKsOUSW2yzQUMJXIx0 gMjh00lZ7LV11ezTez5Hj95kCaFZzbuaFAorhoZPqaUi9wQKsZr784TuG82AzgcL96rm cUqRJlpVROsh/a/BRnuM8ACYDqVhz7wtjCcF2xQgu2ANnu83plOepoqzb+dJ77omZLfC qzZg== X-Gm-Message-State: AOAM532AJ4LDfp7Fe86t+KJk/u8Pve1tEQ+lXaVeYwSt/qrJ1NbxkDTm Ry2XYd+n/w56nrL37+U6juST2di9aw67 X-Google-Smtp-Source: ABdhPJzzjxoIEQAHd/uTP0ntUzzsxqof28Ml9SvqSkhMxWMruzLausY445YH2gXdmRvC1CCS2Sz01vE6I/81 X-Received: from irogers.svl.corp.google.com ([2620:15c:2cd:202:3af1:caef:2937:5d2b]) (user=irogers job=sendgmr) by 2002:a25:2442:: with SMTP id k63mr42725045ybk.180.1641363325070; Tue, 04 Jan 2022 22:15:25 -0800 (PST) Date: Tue, 4 Jan 2022 22:13:38 -0800 In-Reply-To: <20220105061351.120843-1-irogers@google.com> Message-Id: <20220105061351.120843-36-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 35/48] perf evsel: Pass cpu not cpu map index to synthesize 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_221526_784065_A7B43DE6 X-CRM114-Status: GOOD ( 12.70 ) 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/builtin-stat.c b/tools/perf/builtin-stat.c index f31bc34bd4cc..ec252579b587 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c @@ -327,10 +327,11 @@ static int write_stat_round_event(u64 tm, u64 type) #define SID(e, x, y) xyarray__entry(e->core.sample_id, x, y) -static int evsel__write_stat_event(struct evsel *counter, u32 cpu, u32 thread, +static int evsel__write_stat_event(struct evsel *counter, int cpu_map_idx, u32 thread, struct perf_counts_values *count) { - struct perf_sample_id *sid = SID(counter, cpu, thread); + struct perf_sample_id *sid = SID(counter, cpu_map_idx, thread); + int cpu = perf_cpu_map__cpu(evsel__cpus(counter), cpu_map_idx); return perf_event__synthesize_stat(NULL, cpu, thread, sid->id, count, process_synthesized_event, NULL);
evsel__write_stat_event was incorrectly passing a cpu map index rather than a CPU to perf_event__synthesize_stat. Signed-off-by: Ian Rogers <irogers@google.com> --- tools/perf/builtin-stat.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)