From patchwork Mon Nov 14 23:02:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Namhyung Kim X-Patchwork-Id: 20080 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2409230wru; Mon, 14 Nov 2022 15:06:35 -0800 (PST) X-Google-Smtp-Source: AA0mqf4BKxVfgxBfT6S/A5fPfapSAVNfwPgZ4E3RlycgOnS+dwEFxS029ZnMfRz0sss03qqsXdSr X-Received: by 2002:a17:906:3a55:b0:78d:f2d8:4623 with SMTP id a21-20020a1709063a5500b0078df2d84623mr12147031ejf.274.1668467195103; Mon, 14 Nov 2022 15:06:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668467195; cv=none; d=google.com; s=arc-20160816; b=UHSN/x+2uytQvqPJPn5cMHAK5hmLJLYcr81YTVZDwsjinCHxtUCKJNWVnWTCr3ICqg HKwM5ULvwFPIfTevtMHrZ+DtTw2S4Vuexl5jcu/azXja5WcuBZNaPOagdeK0i4KCmD8A H6fAR5+Av2RZQZQZKE37YVQ/Cu8k1GZ3GR3EZlibvJ8SBQpJyt8+tNqYOc0qCP7o4C8I J52geqlx7SaYtwEnxrla5+a+avLBRhgukV9pk064Q9yLG+NhNW/7BAHQ2leRgnAw1Uk0 bxvryxgPEc0/ZQybSojl9slT4+kDS6wyGZlJV+HZnQP8qhNPOpOcQIce/mbL5XgbXRkp 1ZQw== 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=Dj8iIW6Moofk4jxR56ZsoVFULFdU2ag6CE3awXc28Rc=; b=cIL3MH5aJIRnV6V5XFJLoseidIOKRzYbgpPkCoAM6Dpn/5ejaNyzRRaoKn3+IfKn4U sZzTagqWmGU8Zf6LM8WxbJ5d8ih71+s23dpZTHtD/nh4JqqnnRH0I8jJ6m4reqJSpWli uAAJfRRPkyImMlT9W0Zk8mlvDJQ2CRGWi/ipXzLREpFnJ5eI0LK/rpwTg+QQmfmx2pEH 2mU/ywjIWjRU7KVGNKTKP+Tef3tBDeMWt6vfN01pmXwA2v5RqWnORYbyeEzSouoQNher mBhUUYhhu7a5scZdEEXTfNrfiQR9xprYpxu4Isg/2IntqbPF38er+G+yorPtceDvSFxZ Kqkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=GlPXquPr; 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 qa37-20020a17090786a500b00782ece08669si8975851ejc.13.2022.11.14.15.06.09; Mon, 14 Nov 2022 15:06:35 -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=GlPXquPr; 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 S237829AbiKNXEZ (ORCPT + 99 others); Mon, 14 Nov 2022 18:04:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238053AbiKNXD3 (ORCPT ); Mon, 14 Nov 2022 18:03:29 -0500 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F7A51C933; Mon, 14 Nov 2022 15:02:50 -0800 (PST) Received: by mail-pj1-x1029.google.com with SMTP id h14so11705809pjv.4; Mon, 14 Nov 2022 15:02:50 -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=Dj8iIW6Moofk4jxR56ZsoVFULFdU2ag6CE3awXc28Rc=; b=GlPXquPr/Ffvox+CyOypFSRLgTJtFCM69J4Fcnu8bHgNvm8LOdWgtdsBQJfj+4cBDP i7sT51MOc3MVuGENMx5j6UmpuT9CmzahltE3yCcgNaUhAFhYRf6y8zBgL70oBQOZTfCj FIZ/BizgnfXRgvkFFWslH48d0mj4JvM3o8IE65s+tOcij8F0EuVtiSYE8qhVvSWs2hoy 4el0nKkH5j53B5knLlMitO8qKIUXbdMlExlX1w8+2AmMbLMTYeZIdxMF5ziEGi3q2EhD MV1xjF/k98DjcExBb0S7rumweMGwPCS0u/6RM05YvRurZ8giL4phO2QOk/zuvzwMb9ZC u6DA== 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=Dj8iIW6Moofk4jxR56ZsoVFULFdU2ag6CE3awXc28Rc=; b=XFayzyY9EZKyG18EPnpIT3vr6esgFGEDmsaW/+eBDQU0vZmP2pBjWbqbWy+tmfH65H +D8MOe6MFuU3AJpR0vtWu0FhD8zwuZGNVX5DTxIGlmQhaFm0ljFlTETvV/CpzyQC+Ano r2CWIvwRYqVuTOLts0u13ecYkniAjdY+ykC2gsp+D8yM3X2j0utRYD1C9D8jY43dR0rL 7T8IBP4XRscp788HK82tyQyCnoT2GfUobYAi6KncT4qDGD8aXR9dfLnVtRSdBYZWcHt5 CchCoCoQxrFoObqPXH2hlCzvf6uxYxl5MzJpdYS+qBm1MZF0HVdM1m6LpFM+u4R5pZ+7 TxjQ== X-Gm-Message-State: ANoB5plvxxfs19SAMGX93MVF2Ox9yMGRkoywXy93cj7WYUTF2e04d49u h2rFytLzfUsfAhLigLO7t2k= X-Received: by 2002:a17:902:c211:b0:188:a6ea:27a1 with SMTP id 17-20020a170902c21100b00188a6ea27a1mr1234620pll.164.1668466970017; Mon, 14 Nov 2022 15:02:50 -0800 (PST) Received: from balhae.hsd1.ca.comcast.net ([2601:647:6780:a80:cf9f:e038:c19b:797e]) by smtp.gmail.com with ESMTPSA id 132-20020a62148a000000b0056c814a501dsm7534724pfu.10.2022.11.14.15.02.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Nov 2022 15:02:49 -0800 (PST) Sender: Namhyung Kim From: Namhyung Kim To: Arnaldo Carvalho de Melo , Jiri Olsa Cc: Ingo Molnar , Peter Zijlstra , LKML , Ian Rogers , Adrian Hunter , linux-perf-users@vger.kernel.org, Kan Liang , Zhengjun Xing , James Clark , Athira Jajeev Subject: [PATCH 13/19] perf stat: Remove impossible condition Date: Mon, 14 Nov 2022 15:02:21 -0800 Message-Id: <20221114230227.1255976-14-namhyung@kernel.org> X-Mailer: git-send-email 2.38.1.493.g58b659f92b-goog In-Reply-To: <20221114230227.1255976-1-namhyung@kernel.org> References: <20221114230227.1255976-1-namhyung@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-1.7 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749514657590623879?= X-GMAIL-MSGID: =?utf-8?q?1749514657590623879?= The print would run only if metric_only is not set, but it's already in a block that says it's in metric_only case. And there's no place to change the setting. Signed-off-by: Namhyung Kim --- tools/perf/util/stat-display.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/tools/perf/util/stat-display.c b/tools/perf/util/stat-display.c index f983432aaddd..cc8bb6d07dcb 100644 --- a/tools/perf/util/stat-display.c +++ b/tools/perf/util/stat-display.c @@ -1292,9 +1292,6 @@ void evlist__print_counters(struct evlist *evlist, struct perf_stat_config *conf num_print_iv = 0; if (config->aggr_mode == AGGR_GLOBAL && prefix && !config->iostat_run) fprintf(config->output, "%s", prefix); - - if (config->json_output && !config->metric_only) - fprintf(config->output, "}"); } switch (config->aggr_mode) {