Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp1299714lqb; Thu, 18 Apr 2024 06:13:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUE8RLn3WzqdZpDFV3oAnRK5ijEeesrObku8iwysK6uMfbGqqkrL++VnMLjfPQwpjqi5C+grnw+QvArpjpBT5rdP361UQ9NXuUiQ/2zaQ== X-Google-Smtp-Source: AGHT+IHcIwPJ6mUgLQlPcQe06YtkalpNWSbh303kJx9xyK0cgiMZmV8SHAq2qmVsNJsXdXFxuoPr X-Received: by 2002:a05:690c:fd2:b0:615:39a9:5b3 with SMTP id dg18-20020a05690c0fd200b0061539a905b3mr3500702ywb.7.1713446017421; Thu, 18 Apr 2024 06:13:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713446017; cv=pass; d=google.com; s=arc-20160816; b=RV9rCfutT7g7S+tzeLUH1jQICSOy7zeAOAyClr91v5T0Yfdk0Mu2tTG8WooO42JzgJ EKzApVnBUMpUeKFKP8EawkgXPJauTtoeUaYof+omMUxvMtIUxDS7uKB6u/2u/FMOEGd2 RDWNvFmR8KTXtpQ1DSzGHHjP+MPyvNMipwsHTZzmwaaGXlaRWdyyMr+wtuJ/FSe6IzvO BlA9y8x/nfe/opZiRXzVTkOIWkwP7w2yysLTOqLY2AjulkOihOZPx+MUkA5N4xBnTc8b 8UKCUZh/OsvyZnbdotnsfxFDcF4MWbfh4+6/8gwDT8xiDpwGayNMmpZG81dwNzQwy5cm pKMw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=7jW0HaiB3H350zZLocmI/kjPglHoMsAii7Uef7t3NGE=; fh=qYBgL0xDXiZbrLeipx8X/fz2jSxMbqgYzzneIVPF86s=; b=KJULg1SBOwms7HkSRiNlUnBNUvid451eN2H37zUo+0CyooBlIcPweUWsAIIjonO9CI RI5boifqZO8Co99buMlPZo3P+qTsksPkoD4rWWOHGpymV5V8NXEMfxlfJDSa/mIq0QNT H27Aj4/kAO7NSQXwjY8E+qh531AJcuea+kjjbaJYV08y2Y48SZz+P8GfKJ7pofQXPB4k HJX7ju/U/3Ija9fj+g8SscPjNTt1ZJKMZQEKYbpD/h3idNTdQSn9NGPtiPh1xMpsONZt Ft3DkDTHe5bPQFQoOirVOGwLQe2ovaaVqIB///nkYiiLHwG/hWAGtUJtyHX6meHUZTN7 opOQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-150142-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150142-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id c25-20020ab030d9000000b007e82755576dsi163711uam.61.2024.04.18.06.13.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 06:13:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-150142-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-150142-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150142-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 19F181C2116A for ; Thu, 18 Apr 2024 13:13:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5DFB915B157; Thu, 18 Apr 2024 13:13:25 +0000 (UTC) Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4421513C3FF; Thu, 18 Apr 2024 13:13:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.189 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713446004; cv=none; b=Yatd20flO+134NEr/e9dNhqpB3WPndUL3V4sO9uD4DnJVdmww4e3FMr7JdE+CqA1f70aDcW2O9KIRVMU6d65I98pRkrMhCEyRWUhfInd9GAxnuUrXAsIYJZkflXmPyLKJRIPHM1sFevHkn/7RDGfGM2vHtbdYHoiyACaEM3Ixns= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713446004; c=relaxed/simple; bh=FzJPan2NAFjCC04AmFBOdGDeNlf6oAypFIRmzBRbrQY=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=tVFBgV+zhA3H8M0oFgzp2LTKNaZDCBd8AYbYd8aa+qE6xQ5UZUGZuX6Tvfz/2ro1eMGJlz476/EeWfbQcNYClMfVHLo8U0OvuRfEtHRHpIqwg0AMHxAJiEGkrLt/dO3k1OYUHJNcB6DzJwN62HDKRnl5wfwD3gFJsJ0DlOR0/NY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.189 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.163.174]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4VKynm6RhjzNsWj; Thu, 18 Apr 2024 21:10:52 +0800 (CST) Received: from kwepemd100011.china.huawei.com (unknown [7.221.188.204]) by mail.maildlp.com (Postfix) with ESMTPS id D2DF214044F; Thu, 18 Apr 2024 21:13:17 +0800 (CST) Received: from M910t.huawei.com (10.110.54.157) by kwepemd100011.china.huawei.com (7.221.188.204) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.28; Thu, 18 Apr 2024 21:13:16 +0800 From: Changbin Du To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim CC: Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , , , Changbin Du Subject: [PATCH 3/4] perf trace beauty: Always show param if show_zero is set Date: Thu, 18 Apr 2024 21:13:03 +0800 Message-ID: <20240418131304.3188385-4-changbin.du@huawei.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240418131304.3188385-1-changbin.du@huawei.com> References: <20240418131304.3188385-1-changbin.du@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemd100011.china.huawei.com (7.221.188.204) For some parameters, it is best to also display them when they are 0, e.g. flags. Signed-off-by: Changbin Du --- tools/perf/builtin-trace.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 19e81a467d6a..349550b02f79 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -2086,9 +2086,9 @@ static size_t syscall__scnprintf_args(struct syscall *sc, char *bf, size_t size, !trace->show_zeros && !(sc->arg_fmt && (sc->arg_fmt[arg.idx].show_zero || - sc->arg_fmt[arg.idx].scnprintf == SCA_STRARRAY || - sc->arg_fmt[arg.idx].scnprintf == SCA_STRARRAYS) && - sc->arg_fmt[arg.idx].parm)) + ((sc->arg_fmt[arg.idx].scnprintf == SCA_STRARRAY || + sc->arg_fmt[arg.idx].scnprintf == SCA_STRARRAYS) && + sc->arg_fmt[arg.idx].parm)))) continue; printed += scnprintf(bf + printed, size - printed, "%s", printed ? ", " : ""); @@ -2790,8 +2790,8 @@ static size_t trace__fprintf_tp_fields(struct trace *trace, struct evsel *evsel, */ if (val == 0 && !trace->show_zeros && - !((arg->show_zero || - arg->scnprintf == SCA_STRARRAY || + !arg->show_zero && + !((arg->scnprintf == SCA_STRARRAY || arg->scnprintf == SCA_STRARRAYS) && arg->parm)) continue; -- 2.34.1