perf parse: Add missing newline to pr_debug message in evsel__compute_group_pmu_name()
Message ID | 20230616024515.80814-1-yangjihong1@huawei.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1051769vqr; Thu, 15 Jun 2023 19:54:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7MM6hSMWI5+0AhIaHJ3/6kESGtZ/pDanh4te5KXhSWxIku8ErhzyPTwKXcm/6n35AMflbH X-Received: by 2002:a05:6a21:3803:b0:111:6d42:a8ac with SMTP id yi3-20020a056a21380300b001116d42a8acmr967491pzb.14.1686884085504; Thu, 15 Jun 2023 19:54:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686884085; cv=none; d=google.com; s=arc-20160816; b=jcHhlASfn/m8sERRQsQEtMGLdi6YrQwB/asz2BzN0cxo3CWaapKpCETjit8I/wRpyK U7wi1WQv1o9vrL4CFzpdeUjgUu8eImPoU2Z5wGeC/lYhL5QR+xVDqTiwE73aQHT1Al6b n31svDIVolqVpWUAjCseNKv6gF0Qf1iHd5NFW9gpkMpTqFatpVf2WCM4DOj7u30yjGMJ 7OuhdZJQS0xvROz4g0LxZ40EKZlJcWAL9nsJyiMbGIdDsOmJlsaQlFIDQ13b0FbZfzeM Lfp3R9gGUxipx1/1Orb09d5iVXRrqYP2S+ZtpiIblXqbO1tU+JXsgrohpqLyyDZ7LRFP W4LQ== 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=odr9eWxDnxI9mfr6NVEiDszaSj9/9iohYHRhg9o+r7A=; b=ly/gjAmy792ORkriHbpUnO/26IGg553J0mvQ16/5WrcTphSN5y5eKWI8+oatVcxJZ2 Y/YvaBe33zExwPWQYd38UHIb0uPoyANDgW7j7lz2q9I6/ppc2f9gZHqeU37t1rE7D8kH a3rrbtLinRYSdybzw1BD2X418dagswZ2p7Icumfv5ID9oAZ/flijL7xcQnt+JmU9z0k2 9tuJOtRlxHAFtoBs74l627Xw+bwjkqgtqoSUDjXUA0k9CvUAZgwV7WtC6W4Brp09DX7R IHcO2h68mH0suSQP0hvzh11M0vEgocfI3L/0gfe1gshKs4/uUBITkF+tOAWyfb/B2iDf bjiw== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bc1-20020a170902930100b001b3c7e6a8c0si8611600plb.531.2023.06.15.19.54.32; Thu, 15 Jun 2023 19:54:45 -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 S239294AbjFPCrF (ORCPT <rfc822;maxin.john@gmail.com> + 99 others); Thu, 15 Jun 2023 22:47:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229534AbjFPCrD (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 15 Jun 2023 22:47:03 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4482F294A; Thu, 15 Jun 2023 19:47:02 -0700 (PDT) Received: from kwepemm600003.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Qj3Qh5SgKzpW4f; Fri, 16 Jun 2023 10:44:28 +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; Fri, 16 Jun 2023 10:46:59 +0800 From: Yang Jihong <yangjihong1@huawei.com> To: <peterz@infradead.org>, <mingo@redhat.com>, <acme@kernel.org>, <mark.rutland@arm.com>, <alexander.shishkin@linux.intel.com>, <jolsa@kernel.org>, <namhyung@kernel.org>, <irogers@google.com>, <adrian.hunter@intel.com>, <kan.liang@linux.intel.com>, <linux-perf-users@vger.kernel.org>, <linux-kernel@vger.kernel.org> CC: <yangjihong1@huawei.com> Subject: [PATCH] perf parse: Add missing newline to pr_debug message in evsel__compute_group_pmu_name() Date: Fri, 16 Jun 2023 02:45:15 +0000 Message-ID: <20230616024515.80814-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: dggems702-chm.china.huawei.com (10.3.19.179) 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: <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?1768826167000916325?= X-GMAIL-MSGID: =?utf-8?q?1768826167000916325?= |
Series |
perf parse: Add missing newline to pr_debug message in evsel__compute_group_pmu_name()
|
|
Commit Message
Yang Jihong
June 16, 2023, 2:45 a.m. UTC
The newline is missing for pr_debug message in
evsel__compute_group_pmu_name(), fix it.
Before:
# perf --debug verbose=2 record -e cpu-clock true
<SNIP>
No PMU found for 'cycles:u'No PMU found for 'instructions:u'------------------------------------------------------------
perf_event_attr:
type 1
size 136
{ sample_period, sample_freq } 4000
sample_type IP|TID|TIME|PERIOD
read_format ID|LOST
disabled 1
inherit 1
mmap 1
comm 1
freq 1
enable_on_exec 1
task 1
sample_id_all 1
exclude_guest 1
mmap2 1
comm_exec 1
ksymbol 1
bpf_event 1
------------------------------------------------------------
<SNIP>
After:
# perf --debug verbose=2 record -e cpu-clock true
<SNIP>
No PMU found for 'cycles:u'
No PMU found for 'instructions:u'
------------------------------------------------------------
perf_event_attr:
type 1
size 136
{ sample_period, sample_freq } 4000
sample_type IP|TID|TIME|PERIOD
read_format ID|LOST
disabled 1
inherit 1
mmap 1
comm 1
freq 1
enable_on_exec 1
task 1
sample_id_all 1
exclude_guest 1
mmap2 1
comm_exec 1
ksymbol 1
bpf_event 1
------------------------------------------------------------
<SNIP>
Signed-off-by: Yang Jihong <yangjihong1@huawei.com>
---
tools/perf/util/parse-events.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Hello, On Thu, Jun 15, 2023 at 7:47 PM Yang Jihong <yangjihong1@huawei.com> wrote: > > The newline is missing for pr_debug message in > evsel__compute_group_pmu_name(), fix it. > > Before: > > # perf --debug verbose=2 record -e cpu-clock true > <SNIP> > No PMU found for 'cycles:u'No PMU found for 'instructions:u'------------------------------------------------------------ > perf_event_attr: > type 1 > size 136 > { sample_period, sample_freq } 4000 > sample_type IP|TID|TIME|PERIOD > read_format ID|LOST > disabled 1 > inherit 1 > mmap 1 > comm 1 > freq 1 > enable_on_exec 1 > task 1 > sample_id_all 1 > exclude_guest 1 > mmap2 1 > comm_exec 1 > ksymbol 1 > bpf_event 1 > ------------------------------------------------------------ > <SNIP> > > After: > > # perf --debug verbose=2 record -e cpu-clock true > <SNIP> > No PMU found for 'cycles:u' > No PMU found for 'instructions:u' > ------------------------------------------------------------ > perf_event_attr: > type 1 > size 136 > { sample_period, sample_freq } 4000 > sample_type IP|TID|TIME|PERIOD > read_format ID|LOST > disabled 1 > inherit 1 > mmap 1 > comm 1 > freq 1 > enable_on_exec 1 > task 1 > sample_id_all 1 > exclude_guest 1 > mmap2 1 > comm_exec 1 > ksymbol 1 > bpf_event 1 > ------------------------------------------------------------ > <SNIP> > > Signed-off-by: Yang Jihong <yangjihong1@huawei.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Thanks, Namhyung > --- > tools/perf/util/parse-events.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c > index 2d36cadf35ec..bc7274641f34 100644 > --- a/tools/perf/util/parse-events.c > +++ b/tools/perf/util/parse-events.c > @@ -2036,7 +2036,7 @@ static int evsel__compute_group_pmu_name(struct evsel *evsel, > pmu = perf_pmus__scan_core(NULL); > } > if (!pmu) { > - pr_debug("No PMU found for '%s'", evsel__name(evsel)); > + pr_debug("No PMU found for '%s'\n", evsel__name(evsel)); > return -EINVAL; > } > group_pmu_name = pmu->name; > -- > 2.30.GIT >
On Tue, Jun 20, 2023 at 1:32 PM Namhyung Kim <namhyung@kernel.org> wrote: > > Hello, > > On Thu, Jun 15, 2023 at 7:47 PM Yang Jihong <yangjihong1@huawei.com> wrote: > > > > The newline is missing for pr_debug message in > > evsel__compute_group_pmu_name(), fix it. > > > > Before: > > > > # perf --debug verbose=2 record -e cpu-clock true > > <SNIP> > > No PMU found for 'cycles:u'No PMU found for 'instructions:u'------------------------------------------------------------ > > perf_event_attr: > > type 1 > > size 136 > > { sample_period, sample_freq } 4000 > > sample_type IP|TID|TIME|PERIOD > > read_format ID|LOST > > disabled 1 > > inherit 1 > > mmap 1 > > comm 1 > > freq 1 > > enable_on_exec 1 > > task 1 > > sample_id_all 1 > > exclude_guest 1 > > mmap2 1 > > comm_exec 1 > > ksymbol 1 > > bpf_event 1 > > ------------------------------------------------------------ > > <SNIP> > > > > After: > > > > # perf --debug verbose=2 record -e cpu-clock true > > <SNIP> > > No PMU found for 'cycles:u' > > No PMU found for 'instructions:u' > > ------------------------------------------------------------ > > perf_event_attr: > > type 1 > > size 136 > > { sample_period, sample_freq } 4000 > > sample_type IP|TID|TIME|PERIOD > > read_format ID|LOST > > disabled 1 > > inherit 1 > > mmap 1 > > comm 1 > > freq 1 > > enable_on_exec 1 > > task 1 > > sample_id_all 1 > > exclude_guest 1 > > mmap2 1 > > comm_exec 1 > > ksymbol 1 > > bpf_event 1 > > ------------------------------------------------------------ > > <SNIP> > > > > Signed-off-by: Yang Jihong <yangjihong1@huawei.com> > > Acked-by: Namhyung Kim <namhyung@kernel.org> Applied to perf-tools-next, thanks!
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 2d36cadf35ec..bc7274641f34 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c @@ -2036,7 +2036,7 @@ static int evsel__compute_group_pmu_name(struct evsel *evsel, pmu = perf_pmus__scan_core(NULL); } if (!pmu) { - pr_debug("No PMU found for '%s'", evsel__name(evsel)); + pr_debug("No PMU found for '%s'\n", evsel__name(evsel)); return -EINVAL; } group_pmu_name = pmu->name;