Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2206637iof; Tue, 7 Jun 2022 23:11:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPMm3UoLMo2aoZ/zp9scfRb2rtMAiiE9UHSrZaIZyvWcQz9MnmG8zJwIqahmrWsnsRHuPt X-Received: by 2002:a05:6a00:2311:b0:4e1:52bf:e466 with SMTP id h17-20020a056a00231100b004e152bfe466mr42827348pfh.77.1654668715496; Tue, 07 Jun 2022 23:11:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654668715; cv=none; d=google.com; s=arc-20160816; b=Scyg8Kh+W9oogb/Nprq2YtDeTZOuLx+1S3QH6YSE8J2cqy80f9luAYoL8O1TgfEW1V IUAKTLTZ4ssq7LPEtfJQO4S1i4YN+2mhVd8DFjT6MBOHWVM0yNpr1ORymIRQKXEWtFRj mMY1oU9afTU1f+xfpGs59PPl4O6ZH5CoJaFNrqE7YjhOWNb8/mf+tVsrwT6bqCh85DE8 UgSfi704S35oYWwePcBtY1ThOrVK98xPccAMsCF/aHz7aZWtZ93KOu78dla6OPlMyP83 DOplDstzuhEv5Rl1i6jRYzgeY8+A8qENliBameEdOUNs9LUgtWU30mwAGXoGqXkSKr+o I1Qg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=rFDucWaPhppHIzaBP7Jy2hmk3jjHGYAnoJ77mR7SxBI=; b=QPk5zkZE8Qq+838KhYIJapY5M9+cl+qFv2bmRX2/+RmpsBYCqjanMx2Uvt0XjPnCCA EmrlyuQegWlJODglbY9JdYfnyMjD9+yWjyn8eExB2m4en5m81+dnRruqP/S7BhVRR9nx RvaVmEOuBboGvJepz/hzhGPX0S7l5zJy5ybSH9EWgDS/vyAgxT0oSG5lh32Bu8JD+2uL Utlnz8Lwav82lyoa2j8UzPCEzHBIS2GVM26q0S8y/ZmTtKOZ0GBYNgscJrfsb6r9xaz6 R7CYr6sBx1KtlTgoQPTIvrAstDJKGHk6K2BgEvCiGzpQAMDlPJ9rOqO5ukWlh4lZcy9Q iHrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pzTSzj92; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id r6-20020a17090a2e8600b001d960c22782si21151420pjd.158.2022.06.07.23.11.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 23:11:55 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pzTSzj92; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A62C12D56ED; Tue, 7 Jun 2022 22:34:00 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344573AbiFHBrJ (ORCPT + 99 others); Tue, 7 Jun 2022 21:47:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352072AbiFGWGs (ORCPT ); Tue, 7 Jun 2022 18:06:48 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 683DE196A8C; Tue, 7 Jun 2022 12:17:36 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 02A0461929; Tue, 7 Jun 2022 19:17:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D6D14C34115; Tue, 7 Jun 2022 19:17:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654629455; bh=rIhcoJ6CXlFY2L4nR6l3Jj4eTV+vu2FtNzEYgveVvdo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pzTSzj92N2oK8H4cF58say7oMdUTRWXPSqkSyFcHnRyS7FbnoJNY/bMVM4QfVEdhN SsAuFlLDPnYIkoDj47aImVsaoL8r06D638whsDFN3q0LudNYSMdp0EXK7om7La+okh bQ/X1hL0QJZxQKbMZUhpMARAzafzl4dSE2V9GDI8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Joe Mario , Leo Yan , Alexander Shishkin , Jiri Olsa , Mark Rutland , Namhyung Kim , Peter Zijlstra , Arnaldo Carvalho de Melo , Sasha Levin Subject: [PATCH 5.18 697/879] perf c2c: Use stdio interface if slang is not supported Date: Tue, 7 Jun 2022 19:03:35 +0200 Message-Id: <20220607165023.079061480@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 From: Leo Yan [ Upstream commit c4040212bc97d16040712a410335f93bc94d2262 ] If the slang lib is not installed on the system, perf c2c tool disables TUI mode and roll back to use stdio mode; but the flag 'c2c.use_stdio' is missed to set true and thus it wrongly applies UI quirks in the function ui_quirks(). This commit forces to use stdio interface if slang is not supported, and it can avoid to apply the UI quirks and show the correct metric header. Before: ================================================= Shared Cache Line Distribution Pareto ================================================= ------------------------------------------------------------------------------- 0 0 0 99 0 0 0 0xaaaac17d6000 ------------------------------------------------------------------------------- 0.00% 0.00% 6.06% 0.00% 0.00% 0.00% 0x20 N/A 0 0xaaaac17c25ac 0 0 43 375 18469 2 [.] 0x00000000000025ac memstress memstress[25ac] 0 0.00% 0.00% 93.94% 0.00% 0.00% 0.00% 0x29 N/A 0 0xaaaac17c3e88 0 0 173 180 135 2 [.] 0x0000000000003e88 memstress memstress[3e88] 0 After: ================================================= Shared Cache Line Distribution Pareto ================================================= ------------------------------------------------------------------------------- 0 0 0 99 0 0 0 0xaaaac17d6000 ------------------------------------------------------------------------------- 0.00% 0.00% 6.06% 0.00% 0.00% 0.00% 0x20 N/A 0 0xaaaac17c25ac 0 0 43 375 18469 2 [.] 0x00000000000025ac memstress memstress[25ac] 0 0.00% 0.00% 93.94% 0.00% 0.00% 0.00% 0x29 N/A 0 0xaaaac17c3e88 0 0 173 180 135 2 [.] 0x0000000000003e88 memstress memstress[3e88] 0 Fixes: 5a1a99cd2e4e1557 ("perf c2c report: Add main TUI browser") Reported-by: Joe Mario Signed-off-by: Leo Yan Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20220526145400.611249-1-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin --- tools/perf/builtin-c2c.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c index fbbed434014f..8c9ffacbdd28 100644 --- a/tools/perf/builtin-c2c.c +++ b/tools/perf/builtin-c2c.c @@ -2735,9 +2735,7 @@ static int perf_c2c__report(int argc, const char **argv) "the input file to process"), OPT_INCR('N', "node-info", &c2c.node_info, "show extra node info in report (repeat for more info)"), -#ifdef HAVE_SLANG_SUPPORT OPT_BOOLEAN(0, "stdio", &c2c.use_stdio, "Use the stdio interface"), -#endif OPT_BOOLEAN(0, "stats", &c2c.stats_only, "Display only statistic tables (implies --stdio)"), OPT_BOOLEAN(0, "full-symbols", &c2c.symbol_full, @@ -2767,6 +2765,10 @@ static int perf_c2c__report(int argc, const char **argv) if (argc) usage_with_options(report_c2c_usage, options); +#ifndef HAVE_SLANG_SUPPORT + c2c.use_stdio = true; +#endif + if (c2c.stats_only) c2c.use_stdio = true; -- 2.35.1