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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09946C433F5 for ; Wed, 5 Jan 2022 06:17:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238304AbiAEGRm (ORCPT ); Wed, 5 Jan 2022 01:17:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238187AbiAEGQO (ORCPT ); Wed, 5 Jan 2022 01:16:14 -0500 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 131CCC0698D9 for ; Tue, 4 Jan 2022 22:15:53 -0800 (PST) Received: by mail-yb1-xb49.google.com with SMTP id s84-20020a254557000000b0060ac37f4bb1so58181813yba.5 for ; Tue, 04 Jan 2022 22:15:53 -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=qtV1zFQM1oC6nqS9kOztDQtUXtSA1ZGHj+U+RoiLGco=; b=TF44h6bDW9ENH23eEmW9TItbeR7WjGNdvIzxU07LPcU/fVFvC13Vxf5hnb0t5zIi4L oQOsDHElQSTh7S/mT70nFE9Nm1VBwAMt/kptivfrpfiQcaVutbvK6eWOKyfKHoA516Sh fG7HiIp6e2uUFA5bMd41QW17SW9ctaigu70CBjtliIpF02yXP2lR8lz52KHEIPO5rMmG PbLPzLWCUxoqFVUPbOuCFCi3gOry2BVMXOH8Xikg93oG6BA5f9c4Si3CgfS4/KJ1Petv +1uM7MVZf3RS5Gqe5kw7Jyvq3SSZykfThKQyvxGZWuPZUReoQhTeEbSEOCIUPbrSK/VT sVuA== 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=qtV1zFQM1oC6nqS9kOztDQtUXtSA1ZGHj+U+RoiLGco=; b=eMV1gql+n9yLzOBoygC7anVbbO+0pviGEQqgNbYf2D2RJbkrNpC7SjlxR+24XgS8PW m5bEEwz6DVOWX7JHev6uEUvjUqI5wuSx9bgDS9NqpWHhWRS0NmNCCz8hcsZql4G0Egzc lAoFI2T/S8dyUpKsRuDcmLDF0Novs1S/Nhe+lTvaH7FGHsfygGqaNv71lrGIaHYSir0B 4gNXV8/Za4At6nDtgBrf6hk5CsepTPCdauZWfoNAGojZMJ6z6OZkgN8U4iJbEUdFvjhy gEyUdoYzPBBjWwmP9qo+aYxoAln/KUmLU87nsOwnH/za+99QvyFDNpEHt89gjd72zRxc TiPg== X-Gm-Message-State: AOAM530Ul4UrPxxUb9nGAw9lQVzDSxRNFpBBh0ZVCn/ecBUeCGqZgHga QuhkjOncgavDyeFLa2ALBbci9Li9y4F1 X-Google-Smtp-Source: ABdhPJyO0RjQjjaLRZAsFsRj64Vi//uVlLSevrlUFyHAY3W0w1VhoNId3q47hdhQc3dTyIvu2xlWIy9+gchN X-Received: from irogers.svl.corp.google.com ([2620:15c:2cd:202:3af1:caef:2937:5d2b]) (user=irogers job=sendgmr) by 2002:a25:aacd:: with SMTP id t71mr49891988ybi.542.1641363352306; Tue, 04 Jan 2022 22:15:52 -0800 (PST) Date: Tue, 4 Jan 2022 22:13:49 -0800 In-Reply-To: <20220105061351.120843-1-irogers@google.com> Message-Id: <20220105061351.120843-47-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 46/48] perf script: Fix flipped index and cpu 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org perf_counts are accessed by the densely packed index. Signed-off-by: Ian Rogers --- tools/perf/builtin-script.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index f40319144856..bb43529618b3 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -2131,7 +2131,7 @@ static void __process_stat(struct evsel *counter, u64 tstamp) perf_cpu_map__for_each_cpu(cpu, idx, evsel__cpus(counter)) { struct perf_counts_values *counts; - counts = perf_counts(counter->counts, cpu, thread); + counts = perf_counts(counter->counts, idx, thread); printf("%3d %8d %15" PRIu64 " %15" PRIu64 " %15" PRIu64 " %15" PRIu64 " %s\n", cpu, -- 2.34.1.448.ga2b2bfdf31-goog 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 E0AA6C433F5 for ; Wed, 5 Jan 2022 06:54:41 +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=2epUbtLsSux3XDNg1ddkz6+xhnj1+GDzI6h1iYNS0hI=; b=11fMSokBZRRrQIh96wWGuuVBZg kfvdWlI/h3zuIpFhTO1wu/i2MSDvK5B21l15F1dA8d1tGCp0WCmmfPCvFNlJcVHWoijSZ9cvNICuT JrCPESeuT7jKFHY+Iij8F/EtM2T3X5egjluMGWAJBhZXcVru7nSIaqNc1a6Tvk8PV9hsi8wRULmHc Nvt0mTFroLKsFm6hTV/78l7oh9O6OtUJu6wxMK7PcZeX5RhLxD+AwCU+hweM6YpixEsscdT2gTySb KhdBXAjJGbOVLKWqE4C/OVM+SlQtk0zrkjXpOtKIrkvrELrp50IBqN8YhFy6EkQ+rd2Cb33EOJRsh dwT/vyJQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n50AV-00Duf6-1w; Wed, 05 Jan 2022 06:53:08 +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 1n4zaU-00Dger-28 for linux-arm-kernel@lists.infradead.org; Wed, 05 Jan 2022 06:15:55 +0000 Received: by mail-yb1-xb49.google.com with SMTP id b6-20020a256706000000b0060aa7315dd9so58383051ybc.9 for ; Tue, 04 Jan 2022 22:15:52 -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=qtV1zFQM1oC6nqS9kOztDQtUXtSA1ZGHj+U+RoiLGco=; b=TF44h6bDW9ENH23eEmW9TItbeR7WjGNdvIzxU07LPcU/fVFvC13Vxf5hnb0t5zIi4L oQOsDHElQSTh7S/mT70nFE9Nm1VBwAMt/kptivfrpfiQcaVutbvK6eWOKyfKHoA516Sh fG7HiIp6e2uUFA5bMd41QW17SW9ctaigu70CBjtliIpF02yXP2lR8lz52KHEIPO5rMmG PbLPzLWCUxoqFVUPbOuCFCi3gOry2BVMXOH8Xikg93oG6BA5f9c4Si3CgfS4/KJ1Petv +1uM7MVZf3RS5Gqe5kw7Jyvq3SSZykfThKQyvxGZWuPZUReoQhTeEbSEOCIUPbrSK/VT sVuA== 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=qtV1zFQM1oC6nqS9kOztDQtUXtSA1ZGHj+U+RoiLGco=; b=yaV+b30KrjU6I+BsLAISVcbdze9Z6hfmNrFkpRZkp2tJ/xOzrmE1oFvEXTDb9lqft4 rKNP0PiRT0+oc8oupIT/hxtaHaR/AEvUOu6ZPe1+EvT+KCSj/eI1ZR72wNDtnv5hykwe BS6sdC2LZKjyGR8NLwS+AdCr+NYFUJJFQGWKscvw3SASOx/YFkZ+ugYEVR3MmZ6xJ1B9 fMh1TMumNOmAJSK5rH1B+YbLZEXJ6fEkzQ3+1taN4TooxkFl0V5mZQfiiFcWD7OEsE7t A2wH6hJy8lZ28e9cIknlzByJaTVKKCmZtLOVBvnbE9TXJLQ7e30M+o5TN1UCnmdMfQG1 PPqQ== X-Gm-Message-State: AOAM531ohykiQwNrBhO9v3cJoc038ydOJUYv32x1MDXm/qzR/J/F5tny aUIId9DLwa2oiMrXuN0LFz6/7yM0lud+ X-Google-Smtp-Source: ABdhPJyO0RjQjjaLRZAsFsRj64Vi//uVlLSevrlUFyHAY3W0w1VhoNId3q47hdhQc3dTyIvu2xlWIy9+gchN X-Received: from irogers.svl.corp.google.com ([2620:15c:2cd:202:3af1:caef:2937:5d2b]) (user=irogers job=sendgmr) by 2002:a25:aacd:: with SMTP id t71mr49891988ybi.542.1641363352306; Tue, 04 Jan 2022 22:15:52 -0800 (PST) Date: Tue, 4 Jan 2022 22:13:49 -0800 In-Reply-To: <20220105061351.120843-1-irogers@google.com> Message-Id: <20220105061351.120843-47-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 46/48] perf script: Fix flipped index and cpu 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_221554_177883_EB881817 X-CRM114-Status: GOOD ( 12.71 ) 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 perf_counts are accessed by the densely packed index. Signed-off-by: Ian Rogers --- tools/perf/builtin-script.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index f40319144856..bb43529618b3 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -2131,7 +2131,7 @@ static void __process_stat(struct evsel *counter, u64 tstamp) perf_cpu_map__for_each_cpu(cpu, idx, evsel__cpus(counter)) { struct perf_counts_values *counts; - counts = perf_counts(counter->counts, cpu, thread); + counts = perf_counts(counter->counts, idx, thread); printf("%3d %8d %15" PRIu64 " %15" PRIu64 " %15" PRIu64 " %15" PRIu64 " %s\n", cpu, -- 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