Message ID | 20221123180208.2068936-15-namhyung@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2945925wrr; Wed, 23 Nov 2022 10:11:37 -0800 (PST) X-Google-Smtp-Source: AA0mqf7VlNpbN4kSNq33XmVc5e2Rxi6xIdeVSWPev9QnF2wqh3ie4Hl8BppUTa4higsBDqI48/ga X-Received: by 2002:a17:902:f68a:b0:176:71be:cc64 with SMTP id l10-20020a170902f68a00b0017671becc64mr11608341plg.141.1669227097417; Wed, 23 Nov 2022 10:11:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669227097; cv=none; d=google.com; s=arc-20160816; b=vWCxupRmvjHjY6KIvpDUNJZQPj0GorFZ9vl3m1AvWVVSFMStEvt+rNkXzCpvoX2HVR hK/dg9l8yLmZ8L+0VYR4RkNqdycl/13mtWHuGg2k0vTbIA0GJ0LHR/nHzXCsU2hqUhZj 08Ctvmc1hCeAVpoXZOHBn90rOHjnmIyAsqlaqXhe+UXLPiQrmOX0hfJIzHb1qEm926co H0My6rp4bh2pg1VTVhWVPy204mA+XPH0hbUQDFsN/hbTcHa87F9oe8Ah9lIe0w/aWwUj W352iQXQj/4W1bFQH1hID1uEWm9+pJ+xmEjMu1XDqJoBAuPqKTPSPpFlZT0Gx4HHv04K Zzrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:sender :dkim-signature; bh=6JY8VK7mm86rFloCYzzq/VVEp4y79oTf5pSVCAGXfaQ=; b=szNdcAMFC2SMcpwQ+4SGZqli72QHgVbeVdMGWFA+GSsRrleStccLaxZ1HI+knG9EJn 2pEZBoJ/FID00IrXiuvbKd5yswl1vKIhs0obN2bKIFftDOZ1CodqFvPYvsDH96Jfa4hI xMvj0C2irpxzAG+YETdVwRr7mDmsZtdwu3bpok6Zlj5UzbybgYJpBETWit9ymkpn5yvJ z+LNn+wweqkzD5h2oZ9t2J8BTSYfVuLupaEP9PbKG0o0hUw5cMvdB5QCi74xGUnQd0DH e3Y5MY6oUOwd44EVcNCPc3QxvGwnzzLllD/A4NrZoy7OHHQyOwQa1oAI5tskgt4i86es EbSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=C3zIKkzc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cq17-20020a056a00331100b005712b7c5b2fsi15011774pfb.78.2022.11.23.10.11.23; Wed, 23 Nov 2022 10:11:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=C3zIKkzc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239612AbiKWSFD (ORCPT <rfc822;fengqi706@gmail.com> + 99 others); Wed, 23 Nov 2022 13:05:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239477AbiKWSDE (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 23 Nov 2022 13:03:04 -0500 Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F705AE52; Wed, 23 Nov 2022 10:02:31 -0800 (PST) Received: by mail-pg1-x52c.google.com with SMTP id q1so17382336pgl.11; Wed, 23 Nov 2022 10:02:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=6JY8VK7mm86rFloCYzzq/VVEp4y79oTf5pSVCAGXfaQ=; b=C3zIKkzcOV1TrjDmX6L0bR17gpwYhWEv+xiT26HBcW84xtlj6fhBFmAhqs/3COFcXC VTliI5vz+jWa/qL3CuqC093JzQaTYQxGRYsJeu5E2Vh0A6KPTTX9RK6v13oH7FxofezU ELMK78JeU0oKkj2ajvHSsRcYpyNJofsveA+3B59/AmnyY1QaxmIH7gnJpDe3QcjgadXd +st0ZbMXUBZIHN1Q1Zvdzag9tlDQl6Vi2la14+gtB3OrvY3AcudiCunKfvFclQNUCoCG r17Y0gOQnWapFlBkd5ZSyxrgB9j8Kdk8uJHxx5Jy5tSnwzgyI5AFZMQfVoldKaIW/wG1 EmkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=6JY8VK7mm86rFloCYzzq/VVEp4y79oTf5pSVCAGXfaQ=; b=28iQmFTaojSpc/AkvzOwSBnydjfQBOOOo+qOqj2DuBT7E31E7d1/TrJYd/b1/SzkbO caM2ZnJK/EMRRITVrlfC3s9dn/wvUYM9i/Xb+NYgbHTSJjBmrkM5noig8YN3hM0Ko3S0 ahye8tjiJTXm+LNziGUYM2PEXktPgXBgIZ2l11BV0Cw0TVa6jElgjIEX6AistyOvHRzx ANOZWXHdrFRuoHy9kov6evgicKRtzmZonlWY92Zs8Kg/0BY+QffqQ9MlhDtYMszb5BMy MuiXTGbOCgqFI4yagxDUBWXJxAIB39FxQR3B5w9w3PgJAHqllDmcCHy42spNB5NQO/OB 7U2g== X-Gm-Message-State: ANoB5pkG/Za2xy2rO1gKZG6mrG0HcnUV4b0IgTH/Gd32lJyJ1Cfh5C8j 4N2KcX0ksfokdHOAc+JECJ0= X-Received: by 2002:a63:ff5f:0:b0:46f:b6df:3107 with SMTP id s31-20020a63ff5f000000b0046fb6df3107mr8603480pgk.454.1669226550830; Wed, 23 Nov 2022 10:02:30 -0800 (PST) Received: from balhae.hsd1.ca.comcast.net ([2601:647:6780:a80:c968:76:254b:3790]) by smtp.gmail.com with ESMTPSA id i15-20020a655b8f000000b00470275c8d6dsm10792364pgr.10.2022.11.23.10.02.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Nov 2022 10:02:30 -0800 (PST) Sender: Namhyung Kim <namhyung@gmail.com> From: Namhyung Kim <namhyung@kernel.org> To: Arnaldo Carvalho de Melo <acme@kernel.org>, Jiri Olsa <jolsa@kernel.org> Cc: Ingo Molnar <mingo@kernel.org>, Peter Zijlstra <peterz@infradead.org>, LKML <linux-kernel@vger.kernel.org>, Ian Rogers <irogers@google.com>, Adrian Hunter <adrian.hunter@intel.com>, linux-perf-users@vger.kernel.org, Kan Liang <kan.liang@linux.intel.com>, Zhengjun Xing <zhengjun.xing@linux.intel.com>, James Clark <james.clark@arm.com>, Athira Jajeev <atrajeev@linux.vnet.ibm.com> Subject: [PATCH 14/15] perf stat: Rename "aggregate-number" to "cpu-count" in JSON Date: Wed, 23 Nov 2022 10:02:07 -0800 Message-Id: <20221123180208.2068936-15-namhyung@kernel.org> X-Mailer: git-send-email 2.38.1.584.g0f3c55d4c2-goog In-Reply-To: <20221123180208.2068936-1-namhyung@kernel.org> References: <20221123180208.2068936-1-namhyung@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750311472702271170?= X-GMAIL-MSGID: =?utf-8?q?1750311472702271170?= |
Series |
perf stat: Improve perf stat output (v2)
|
|
Commit Message
Namhyung Kim
Nov. 23, 2022, 6:02 p.m. UTC
As the JSON output has been broken for a little while, I guess there are
not many users. Let's rename the field to more intuitive one. :)
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/util/stat-display.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Comments
On Wed, Nov 23, 2022 at 10:02 AM Namhyung Kim <namhyung@kernel.org> wrote: > > As the JSON output has been broken for a little while, I guess there are > not many users. Let's rename the field to more intuitive one. :) I'm not sure cpu-count is accurate. For example, an uncore counter in a dual socket machine may have a CPU mask of "0, 36", ie one event per socket. The aggregate-number in this case I believe is 2. Thanks, Ian > Signed-off-by: Namhyung Kim <namhyung@kernel.org> > --- > tools/perf/util/stat-display.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/tools/perf/util/stat-display.c b/tools/perf/util/stat-display.c > index 43640115454c..7a39a1a7261d 100644 > --- a/tools/perf/util/stat-display.c > +++ b/tools/perf/util/stat-display.c > @@ -281,19 +281,19 @@ static void print_aggr_id_json(struct perf_stat_config *config, > > switch (config->aggr_mode) { > case AGGR_CORE: > - fprintf(output, "\"core\" : \"S%d-D%d-C%d\", \"aggregate-number\" : %d, ", > + fprintf(output, "\"core\" : \"S%d-D%d-C%d\", \"cpu-count\" : %d, ", > id.socket, id.die, id.core, nr); > break; > case AGGR_DIE: > - fprintf(output, "\"die\" : \"S%d-D%d\", \"aggregate-number\" : %d, ", > + fprintf(output, "\"die\" : \"S%d-D%d\", \"cpu-count\" : %d, ", > id.socket, id.die, nr); > break; > case AGGR_SOCKET: > - fprintf(output, "\"socket\" : \"S%d\", \"aggregate-number\" : %d, ", > + fprintf(output, "\"socket\" : \"S%d\", \"cpu-count\" : %d, ", > id.socket, nr); > break; > case AGGR_NODE: > - fprintf(output, "\"node\" : \"N%d\", \"aggregate-number\" : %d, ", > + fprintf(output, "\"node\" : \"N%d\", \"cpu-count\" : %d, ", > id.node, nr); > break; > case AGGR_NONE: > -- > 2.38.1.584.g0f3c55d4c2-goog >
Hi Ian, On Wed, Nov 23, 2022 at 3:31 PM Ian Rogers <irogers@google.com> wrote: > > On Wed, Nov 23, 2022 at 10:02 AM Namhyung Kim <namhyung@kernel.org> wrote: > > > > As the JSON output has been broken for a little while, I guess there are > > not many users. Let's rename the field to more intuitive one. :) > > I'm not sure cpu-count is accurate. For example, an uncore counter in > a dual socket machine may have a CPU mask of "0, 36", ie one event per > socket. The aggregate-number in this case I believe is 2. You're right. In case of uncore events, it can be confusing. But in some sense it could be thought as cpu count as well since it aggregates the result from two cpus anyway. :) Note that the aggregate-number (or cpu-count) is only printed if users requested one of aggregation options like --per-socket or --per-core. In your example, then it could print 1 for each socket. But I think uncore events are different from core events, and hopefully they have separate instances for different sockets or something already. That means it doesn't need to use those aggregation options for them. Also the CSV output uses "cpus" for the same information. It'd be nice we could have consistency. Thanks, Namhyung
On Thu, Nov 24, 2022 at 11:51 PM Namhyung Kim <namhyung@kernel.org> wrote: > > Hi Ian, > > On Wed, Nov 23, 2022 at 3:31 PM Ian Rogers <irogers@google.com> wrote: > > > > On Wed, Nov 23, 2022 at 10:02 AM Namhyung Kim <namhyung@kernel.org> wrote: > > > > > > As the JSON output has been broken for a little while, I guess there are > > > not many users. Let's rename the field to more intuitive one. :) > > > > I'm not sure cpu-count is accurate. For example, an uncore counter in > > a dual socket machine may have a CPU mask of "0, 36", ie one event per > > socket. The aggregate-number in this case I believe is 2. > > You're right. In case of uncore events, it can be confusing. But in some > sense it could be thought as cpu count as well since it aggregates the > result from two cpus anyway. :) > > Note that the aggregate-number (or cpu-count) is only printed if users > requested one of aggregation options like --per-socket or --per-core. > In your example, then it could print 1 for each socket. > > But I think uncore events are different from core events, and hopefully > they have separate instances for different sockets or something already. > That means it doesn't need to use those aggregation options for them. > > Also the CSV output uses "cpus" for the same information. It'd be nice > we could have consistency. So in the original patch from Claire she'd passed the name "number" through to the json from the stat code. Having an integer called "number" isn't exactly intention revealing - thank you for your clean up work! :-) I switched "number" to be "aggregate number" as the number comes from the "data" aggregated and the code refers to it as aggregate data. I think aggregate-number is more consistent with the code, and cpu-count would look strange in the uncore case above where the number of CPUs (really hyperthreads) is 72. Perhaps we should also be outputting the aggregation mode with the number. Anyway, I think for the patch series I'd prefer we skipped this one and kept the rest. Thanks, Ian > Namhyung
On Sat, Nov 26, 2022 at 7:14 PM Ian Rogers <irogers@google.com> wrote: > > On Thu, Nov 24, 2022 at 11:51 PM Namhyung Kim <namhyung@kernel.org> wrote: > > > > Hi Ian, > > > > On Wed, Nov 23, 2022 at 3:31 PM Ian Rogers <irogers@google.com> wrote: > > > > > > On Wed, Nov 23, 2022 at 10:02 AM Namhyung Kim <namhyung@kernel.org> wrote: > > > > > > > > As the JSON output has been broken for a little while, I guess there are > > > > not many users. Let's rename the field to more intuitive one. :) > > > > > > I'm not sure cpu-count is accurate. For example, an uncore counter in > > > a dual socket machine may have a CPU mask of "0, 36", ie one event per > > > socket. The aggregate-number in this case I believe is 2. > > > > You're right. In case of uncore events, it can be confusing. But in some > > sense it could be thought as cpu count as well since it aggregates the > > result from two cpus anyway. :) > > > > Note that the aggregate-number (or cpu-count) is only printed if users > > requested one of aggregation options like --per-socket or --per-core. > > In your example, then it could print 1 for each socket. > > > > But I think uncore events are different from core events, and hopefully > > they have separate instances for different sockets or something already. > > That means it doesn't need to use those aggregation options for them. > > > > Also the CSV output uses "cpus" for the same information. It'd be nice > > we could have consistency. > > So in the original patch from Claire she'd passed the name "number" > through to the json from the stat code. Having an integer called > "number" isn't exactly intention revealing - thank you for your clean > up work! :-) I switched "number" to be "aggregate number" as the > number comes from the "data" aggregated and the code refers to it as > aggregate data. I think aggregate-number is more consistent with the > code, and cpu-count would look strange in the uncore case above where > the number of CPUs (really hyperthreads) is 72. Perhaps we should also > be outputting the aggregation mode with the number. Anyway, I think > for the patch series I'd prefer we skipped this one and kept the rest. Right, I think we need a more general term to include non-cpu events. But it seems Arnaldo already merged it. Arnaldo, do you want me to send a revert? Thanks, Namhyung
On Tue, Nov 29, 2022 at 2:46 PM Namhyung Kim <namhyung@kernel.org> wrote: > > On Sat, Nov 26, 2022 at 7:14 PM Ian Rogers <irogers@google.com> wrote: > > > > On Thu, Nov 24, 2022 at 11:51 PM Namhyung Kim <namhyung@kernel.org> wrote: > > > > > > Hi Ian, > > > > > > On Wed, Nov 23, 2022 at 3:31 PM Ian Rogers <irogers@google.com> wrote: > > > > > > > > On Wed, Nov 23, 2022 at 10:02 AM Namhyung Kim <namhyung@kernel.org> wrote: > > > > > > > > > > As the JSON output has been broken for a little while, I guess there are > > > > > not many users. Let's rename the field to more intuitive one. :) > > > > > > > > I'm not sure cpu-count is accurate. For example, an uncore counter in > > > > a dual socket machine may have a CPU mask of "0, 36", ie one event per > > > > socket. The aggregate-number in this case I believe is 2. > > > > > > You're right. In case of uncore events, it can be confusing. But in some > > > sense it could be thought as cpu count as well since it aggregates the > > > result from two cpus anyway. :) > > > > > > Note that the aggregate-number (or cpu-count) is only printed if users > > > requested one of aggregation options like --per-socket or --per-core. > > > In your example, then it could print 1 for each socket. > > > > > > But I think uncore events are different from core events, and hopefully > > > they have separate instances for different sockets or something already. > > > That means it doesn't need to use those aggregation options for them. > > > > > > Also the CSV output uses "cpus" for the same information. It'd be nice > > > we could have consistency. > > > > So in the original patch from Claire she'd passed the name "number" > > through to the json from the stat code. Having an integer called > > "number" isn't exactly intention revealing - thank you for your clean > > up work! :-) I switched "number" to be "aggregate number" as the > > number comes from the "data" aggregated and the code refers to it as > > aggregate data. I think aggregate-number is more consistent with the > > code, and cpu-count would look strange in the uncore case above where > > the number of CPUs (really hyperthreads) is 72. Perhaps we should also > > be outputting the aggregation mode with the number. Anyway, I think > > for the patch series I'd prefer we skipped this one and kept the rest. > > Right, I think we need a more general term to include non-cpu events. > But it seems Arnaldo already merged it. > > Arnaldo, do you want me to send a revert? > > Thanks, > Namhyung This is also breaking the json output test: $ perf test -vv 89 89: perf stat JSON output linter : --- start --- test child forked, pid 2116261 Checking json output: no args [Success] Checking json output: system wide [Success] Checking json output: interval [Success] Checking json output: event [Success] Checking json output: per thread [Success] Checking json output: per node Test failed for input: {"node" : "N0", "cpu-count" : 16, "counter-value" : "32.468431", "unit" : "msec", "event" : "cpu-clo ck", "event-runtime" : 32498339, "pcnt-running" : 100.00, "metric-value" : 19.450525, "metric-unit" : "CPUs utilized"} {"node" : "N0", "cpu-count" : 16, "counter-value" : "52.000000", "unit" : "", "event" : "context-swi tches", "event-runtime" : 32471361, "pcnt-running" : 100.00, "metric-value" : 1.601556, "metric-unit " : "K/sec"} {"node" : "N0", "cpu-count" : 16, "counter-value" : "16.000000", "unit" : "", "event" : "cpu-migrati ons", "event-runtime" : 32469950, "pcnt-running" : 100.00, "metric-value" : 492.786362, "metric-unit " : "/sec"} {"node" : "N0", "cpu-count" : 16, "counter-value" : "57.000000", "unit" : "", "event" : "page-faults ", "event-runtime" : 32474408, "pcnt-running" : 100.00, "metric-value" : 1.755551, "metric-unit" : " K/sec"} {"node" : "N0", "cpu-count" : 16, "counter-value" : "2958499.000000", "unit" : "", "event" : "cycles ", "event-runtime" : 32411643, "pcnt-running" : 100.00, "metric-value" : 0.091119, "metric-unit" : " GHz"} {"node" : "N0", "cpu-count" : 16, "counter-value" : "3175893.000000", "unit" : "", "event" : "instru ctions", "event-runtime" : 32403573, "pcnt-running" : 100.00, "metric-value" : 1.073481, "metric-uni t" : "insn per cycle"} {"node" : "N0", "cpu-count" : 16, "counter-value" : "688120.000000", "unit" : "", "event" : "branche s", "event-runtime" : 32391536, "pcnt-running" : 100.00, "metric-value" : 21.193509, "metric-unit" : "M/sec"} {"node" : "N0", "cpu-count" : 16, "counter-value" : "17584.000000", "unit" : "", "event" : "branch-m isses", "event-runtime" : 32371972, "pcnt-running" : 100.00, "metric-value" : 2.555368, "metric-unit " : "of all branches"} {"node" : "N0", "cpu-count" : 16, "counter-value" : "14377890.000000", "unit" : "", "event" : "slots ", "event-runtime" : 32350026, "pcnt-running" : 100.00, "metric-value" : 442.826757, "metric-unit" : "M/sec"} {"node" : "N0", "cpu-count" : 16, "counter-value" : "3380921.000000", "unit" : "", "event" : "topdow n-retiring", "event-runtime" : 32350026, "pcnt-running" : 100.00, "metric-value" : 23.514767, "metri c-unit" : "Retiring"} {"node" : "N0", "cpu-count" : 16, "counter-value" : "1444174.000000", "unit" : "", "event" : "topdow n-bad-spec", "event-runtime" : 32350026, "pcnt-running" : 100.00, "metric-value" : 10.044427, "metri c-unit" : "Bad Speculation"} {"node" : "N0", "cpu-count" : 16, "counter-value" : "5899393.000000", "unit" : "", "event" : "topdow n-fe-bound", "event-runtime" : 32350026, "pcnt-running" : 100.00, "metric-value" : 41.031084, "metri c-unit" : "Frontend Bound"} {"node" : "N0", "cpu-count" : 16, "counter-value" : "3653375.000000", "unit" : "", "event" : "topdow n-be-bound", "event-runtime" : 32350026, "pcnt-running" : 100.00, "metric-value" : 25.409722, "metri c-unit" : "Backend Bound"} Traceback (most recent call last): File "/home/irogers/kernel.org/./tools/perf/tests/shell/lib/perf_json_output_lint.py", line 93, in <module> check_json_output(expected_items) File "/home/irogers/kernel.org/./tools/perf/tests/shell/lib/perf_json_output_lint.py", line 78, in check_json_output raise RuntimeError(f'Unexpected key: key={key} value={value}') RuntimeError: Unexpected key: key=cpu-count value=16 test child finished with -1 ---- end ---- perf stat JSON output linter: FAILED! Thanks, Ian
diff --git a/tools/perf/util/stat-display.c b/tools/perf/util/stat-display.c index 43640115454c..7a39a1a7261d 100644 --- a/tools/perf/util/stat-display.c +++ b/tools/perf/util/stat-display.c @@ -281,19 +281,19 @@ static void print_aggr_id_json(struct perf_stat_config *config, switch (config->aggr_mode) { case AGGR_CORE: - fprintf(output, "\"core\" : \"S%d-D%d-C%d\", \"aggregate-number\" : %d, ", + fprintf(output, "\"core\" : \"S%d-D%d-C%d\", \"cpu-count\" : %d, ", id.socket, id.die, id.core, nr); break; case AGGR_DIE: - fprintf(output, "\"die\" : \"S%d-D%d\", \"aggregate-number\" : %d, ", + fprintf(output, "\"die\" : \"S%d-D%d\", \"cpu-count\" : %d, ", id.socket, id.die, nr); break; case AGGR_SOCKET: - fprintf(output, "\"socket\" : \"S%d\", \"aggregate-number\" : %d, ", + fprintf(output, "\"socket\" : \"S%d\", \"cpu-count\" : %d, ", id.socket, nr); break; case AGGR_NODE: - fprintf(output, "\"node\" : \"N%d\", \"aggregate-number\" : %d, ", + fprintf(output, "\"node\" : \"N%d\", \"cpu-count\" : %d, ", id.node, nr); break; case AGGR_NONE: