linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf parse: Add missing newline to pr_debug message in evsel__compute_group_pmu_name()
@ 2023-06-16  2:45 Yang Jihong
  2023-06-20 20:32 ` Namhyung Kim
  0 siblings, 1 reply; 3+ messages in thread
From: Yang Jihong @ 2023-06-16  2:45 UTC (permalink / raw)
  To: peterz, mingo, acme, mark.rutland, alexander.shishkin, jolsa,
	namhyung, irogers, adrian.hunter, kan.liang, linux-perf-users,
	linux-kernel
  Cc: yangjihong1

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(-)

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] perf parse: Add missing newline to pr_debug message in evsel__compute_group_pmu_name()
  2023-06-16  2:45 [PATCH] perf parse: Add missing newline to pr_debug message in evsel__compute_group_pmu_name() Yang Jihong
@ 2023-06-20 20:32 ` Namhyung Kim
  2023-06-21 17:25   ` Namhyung Kim
  0 siblings, 1 reply; 3+ messages in thread
From: Namhyung Kim @ 2023-06-20 20:32 UTC (permalink / raw)
  To: Yang Jihong
  Cc: peterz, mingo, acme, mark.rutland, alexander.shishkin, jolsa,
	irogers, adrian.hunter, kan.liang, linux-perf-users,
	linux-kernel

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
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] perf parse: Add missing newline to pr_debug message in evsel__compute_group_pmu_name()
  2023-06-20 20:32 ` Namhyung Kim
@ 2023-06-21 17:25   ` Namhyung Kim
  0 siblings, 0 replies; 3+ messages in thread
From: Namhyung Kim @ 2023-06-21 17:25 UTC (permalink / raw)
  To: Yang Jihong
  Cc: peterz, mingo, acme, mark.rutland, alexander.shishkin, jolsa,
	irogers, adrian.hunter, kan.liang, linux-perf-users,
	linux-kernel

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!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-06-21 17:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-16  2:45 [PATCH] perf parse: Add missing newline to pr_debug message in evsel__compute_group_pmu_name() Yang Jihong
2023-06-20 20:32 ` Namhyung Kim
2023-06-21 17:25   ` Namhyung Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).