Message ID | 20211223074541.3318938-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 35553C433EF for <linux-arm-kernel@archiver.kernel.org>; Thu, 23 Dec 2021 08:15:55 +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=oO4jVYK3tmWndplC+ASjiu/hKWm8k7qDd1c0HQlLc/A=; b=lXY0fc8xctAtJ6By3KvKw8As7J aQOpfelEQZAFwiTJ6KHRsqvLy6ua1umt2lxS2RW8lmcw+Qfz86XpZ13ZimvbfsNtAiJYS72TUPhWN f7pgnCoTL51gnPrvVeEbBIV++oxlcZ7HxdAUw67fkXgxKv1O60byhY/iqhntrJ7PGwBWR6Wvu5Ce9 oShz5cMXflLj6vAERI6OZnUyyF+hrsQrOHWfxd2jQJ8q1+Z292mm0X1vL1ol47rHZl+KCqy7AsdP3 fjGP9SzKEO8Pu3GF6lDaCMyW8SI2uHg2tm/D3qP9dw7J2D2avVgDh31IkMdnX3F51v0g/J28Sqd/7 Gumg0GQw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n0JF1-00CA2e-7y; Thu, 23 Dec 2021 08:14:23 +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 1n0Ip8-00C04u-KN for linux-arm-kernel@lists.infradead.org; Thu, 23 Dec 2021 07:47:40 +0000 Received: by mail-yb1-xb4a.google.com with SMTP id r18-20020a25ac52000000b005c9047c420bso8731792ybd.4 for <linux-arm-kernel@lists.infradead.org>; Wed, 22 Dec 2021 23:47:37 -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=JSu0B8tdHCivMmDl9rVtfSdI8JuN1SLb4661ulsOdOs=; b=MuISUn2+IVYi8HnSczfjLUDfV1pxeGKnT55sncC7WyvReipoUdXYVPMvxpwiPDMqU2 AYJfmx4vLR9RcAyDuu6owRy9tJrDvwVoKz5c4xUKG9YjpN5NJpauNgUb7OqvoFyIwIi/ NasVWkbfWPGJRjpuGOHNm10Oxtbnfb9Id+Ha4YpxO5wLSBe4wCUPI8zSOyvrGQFp+nyz jxIAyTkK5gXOUZeb15/+pDNVx/56JMEvk6A0w3MNT1H9QfcV0y//6f8mh7+jLD6CTbU9 0K6uYkGy6TfG1SrF8sc3vm45nSfZl4mk4HKWbKKlUWWsQNpQ7GFYMEjZTg1EljASGglN RO2w== 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=JSu0B8tdHCivMmDl9rVtfSdI8JuN1SLb4661ulsOdOs=; b=oIjTp8vXdMQLbXXUAOi/lxea5cNkaFwN4k1XqcNVnd82JMWy9RUx9NXo/lWBjp1F0X ODBLVH9Nc7hEwvGrsr6P8V1w4ZJrWq/Qme8sxOMkQYkHX4NN4Esde34++r/iOUMYJGxZ laBjrdykuz+3Gn4CqZ1aOAPQ6QIua2ZAvmRXZ8V0qbCOL+OabL54SWSY3SPDfsdRGPgC xsI2Cv3LWGyJmgwcFYA1K4SL9oPYiwtG3Qh+Pkmr+DcEigSXpFsayD9CjvIKgbwe/O5v wxWalBG7n21joVtF2HkEq94YFyqFxJFsU0j2c/TMdvoGrFyQn43Kq+5zW3LL3cAzfhnq rOWg== X-Gm-Message-State: AOAM533GtRzuE67gygBziP0LesYqEBcu7R82gI+I6q24jveAaKqDu9kV dHuwuYoaa3WHlrE1hNHhpfvUSX/L9BJK X-Google-Smtp-Source: ABdhPJxYbNY0pwl8Fufs0Pid0QbIDU5v4Zuv3xywBYVxR6l5Lyw95aqt3+MnHVp2HyKaLvHGj3YPR0TT1Jox X-Received: from irogers.svl.corp.google.com ([2620:15c:2cd:202:4fef:90ff:589d:24ca]) (user=irogers job=sendgmr) by 2002:a5b:14a:: with SMTP id c10mr1640778ybp.586.1640245656983; Wed, 22 Dec 2021 23:47:36 -0800 (PST) Date: Wed, 22 Dec 2021 23:45:28 -0800 In-Reply-To: <20211223074541.3318938-1-irogers@google.com> Message-Id: <20211223074541.3318938-36-irogers@google.com> Mime-Version: 1.0 References: <20211223074541.3318938-1-irogers@google.com> X-Mailer: git-send-email 2.34.1.307.g9b7440fafd-goog Subject: [PATCH v2 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 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-20211222_234738_730442_2635ECF7 X-CRM114-Status: GOOD ( 12.41 ) 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(-)