Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3186540rwd; Sat, 10 Jun 2023 03:13:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4LaAj3nGhA07dqHL8Vowpdgt980sfN0ds1boYbMvvgONo1m+XAmHP/Gh0BvZ9gz/AwZsHl X-Received: by 2002:a17:907:7ba3:b0:96a:2210:7dd8 with SMTP id ne35-20020a1709077ba300b0096a22107dd8mr3799162ejc.38.1686392033075; Sat, 10 Jun 2023 03:13:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686392033; cv=none; d=google.com; s=arc-20160816; b=PtiHpzhr6HaNdHH5uX/NGmk3zbAQEgesMQfgU71NQOk+xjl1p/ZAH54jzR277XFQjr IuIVs2o6GzE6gUEnoKkrpl9W+zOTjt21dAtxxrkRJesFd3K4dDskt7c3PdJwYYtJUtrd W9AzBai5H8IQ+Ef38StKgQXihB6vfX7qMkYXpApPTvYFjQys11M5fV+0SAKe9iigk1ok sHBJeMK/YaAReKXOba44jEZH6UHysMNx99y+HGSpONEyPAt3ZNjU00pjSrlnYxE0US1N c5n+h7vRTGYebXokvPtwESKslB/M51YDPqmCbelrp+0CQR1fbTVrnkHkdo+918dl+1do QOZw== 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 :message-id:date:subject:cc:to:from; bh=riSs0kS/h+xs9+6whyQptoeL1que3+gTwoHPPRMtKww=; b=yjsJBz7iugFlILHXVgxgif/wzYHTc7HqKHdfXjEkSMEFVNBPJPvzcP8Kdfb0kBdxiN llN4oU0h7sx8zVW+5yF02uZ6t8o5I8FnWU2YHIZCOX2is7n4PNukdBkWZSXozDrsPTmX 3Bgiil2Rl7oE9DHxTfUgRgpP1bkJHRGkUuTiXA14x6E9jqq7dBy4wtghmS1IgjXg7+QU z7wIwEVQm8HG53JW7i13ihkP4J8JF6WE7xYEFF28E8g3EKq0sGoaiQogTy+wL+oBL4nN nkswiqGF1yrL7W4ypE0smwzq4S6JSegU2RyFdUCgK/LY9pm9PcbnlZRcpZOur2Ng56eO Lz9Q== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mc2-20020a170906eb4200b0094f329b847asi2563571ejb.852.2023.06.10.03.13.15; Sat, 10 Jun 2023 03:13:53 -0700 (PDT) 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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231184AbjFJJmO (ORCPT + 99 others); Sat, 10 Jun 2023 05:42:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229649AbjFJJmN (ORCPT ); Sat, 10 Jun 2023 05:42:13 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D6F32D41; Sat, 10 Jun 2023 02:42:10 -0700 (PDT) Received: from kwepemm600003.china.huawei.com (unknown [172.30.72.55]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4QdXxH0TdVzLmjK; Sat, 10 Jun 2023 17:40:19 +0800 (CST) Received: from localhost.localdomain (10.67.174.95) by kwepemm600003.china.huawei.com (7.193.23.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Sat, 10 Jun 2023 17:42:04 +0800 From: Yang Jihong To: , , , , , , , , , , CC: Subject: [PATCH] perf stat: Add missing newline in pr_error messages Date: Sat, 10 Jun 2023 09:40:26 +0000 Message-ID: <20230610094026.220687-1-yangjihong1@huawei.com> X-Mailer: git-send-email 2.30.GIT MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.67.174.95] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemm600003.china.huawei.com (7.193.23.202) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 The newline is missing for error messages in add_default_attributes() Before: # perf stat --topdown Topdown requested but the topdown metric groups aren't present. (See perf list the metric groups have names like TopdownL1)# After: # perf stat --topdown Topdown requested but the topdown metric groups aren't present. (See perf list the metric groups have names like TopdownL1) # In addition, perf_stat_init_aggr_mode() and perf_stat_init_aggr_mode_file() have the same problem, fixed by the way. Signed-off-by: Yang Jihong --- tools/perf/builtin-stat.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index b9ad32f21e57..78644ae538c4 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c @@ -1398,7 +1398,7 @@ static int perf_stat_init_aggr_mode(void) stat_config.aggr_map = cpu_aggr_map__new(evsel_list->core.user_requested_cpus, get_id, /*data=*/NULL, needs_sort); if (!stat_config.aggr_map) { - pr_err("cannot build %s map", aggr_mode__string[stat_config.aggr_mode]); + pr_err("cannot build %s map\n", aggr_mode__string[stat_config.aggr_mode]); return -1; } stat_config.aggr_get_id = aggr_mode__get_id(stat_config.aggr_mode); @@ -1650,7 +1650,7 @@ static int perf_stat_init_aggr_mode_file(struct perf_stat *st) stat_config.aggr_map = cpu_aggr_map__new(evsel_list->core.user_requested_cpus, get_id, env, needs_sort); if (!stat_config.aggr_map) { - pr_err("cannot build %s map", aggr_mode__string[stat_config.aggr_mode]); + pr_err("cannot build %s map\n", aggr_mode__string[stat_config.aggr_mode]); return -1; } stat_config.aggr_get_id = aggr_mode__get_id_file(stat_config.aggr_mode); @@ -1789,7 +1789,7 @@ static int add_default_attributes(void) * on an architecture test for such a metric name. */ if (!metricgroup__has_metric("transaction")) { - pr_err("Missing transaction metrics"); + pr_err("Missing transaction metrics\n"); return -1; } return metricgroup__parse_groups(evsel_list, "transaction", @@ -1805,7 +1805,7 @@ static int add_default_attributes(void) int smi; if (sysfs__read_int(FREEZE_ON_SMI_PATH, &smi) < 0) { - pr_err("freeze_on_smi is not supported."); + pr_err("freeze_on_smi is not supported.\n"); return -1; } @@ -1818,7 +1818,7 @@ static int add_default_attributes(void) } if (!metricgroup__has_metric("smi")) { - pr_err("Missing smi metrics"); + pr_err("Missing smi metrics\n"); return -1; } @@ -1843,7 +1843,7 @@ static int add_default_attributes(void) if (!max_level) { pr_err("Topdown requested but the topdown metric groups aren't present.\n" - "(See perf list the metric groups have names like TopdownL1)"); + "(See perf list the metric groups have names like TopdownL1)\n"); return -1; } if (stat_config.topdown_level > max_level) { -- 2.30.GIT