linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] /bin/dmesg to dmesg Path
@ 2023-10-01 13:09 April John
  2023-10-03  4:16 ` Namhyung Kim
  0 siblings, 1 reply; 3+ messages in thread
From: April John @ 2023-10-01 13:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: April John, Peter Zijlstra, Ingo Molnar,
	Arnaldo Carvalho de Melo, Mark Rutland, Alexander Shishkin,
	Jiri Olsa, Namhyung Kim, Ian Rogers, Adrian Hunter,
	open list:PERFORMANCE EVENTS SUBSYSTEM

Dmesg is not in every distro at /bin/dmesg, in NixOS for example, this fails,
but the path should in most cases contain dmesg.
This follows the example of replacing /bin/bash with bash Path in the codebase.

---
tools/perf/util/evsel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index a8a5ff87c..aa602aae6 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -3053,7 +3053,7 @@ int evsel__open_strerror(struct evsel *evsel, struct target *target,

return scnprintf(msg, size,
"The sys_perf_event_open() syscall returned with %d (%s) for event (%s).\n"
- "/bin/dmesg | grep -i perf may provide additional information.\n",
+ "dmesg | grep -i perf may provide additional information.\n",
err, str_error_r(err, sbuf, sizeof(sbuf)), evsel__name(evsel));
}

--
2.42.0

Signed-off-by: April John <april@acab.dev>



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

* Re: [PATCH] /bin/dmesg to dmesg Path
  2023-10-01 13:09 [PATCH] /bin/dmesg to dmesg Path April John
@ 2023-10-03  4:16 ` Namhyung Kim
  2023-10-05  4:44   ` Namhyung Kim
  0 siblings, 1 reply; 3+ messages in thread
From: Namhyung Kim @ 2023-10-03  4:16 UTC (permalink / raw)
  To: April John
  Cc: linux-kernel, Peter Zijlstra, Ingo Molnar,
	Arnaldo Carvalho de Melo, Mark Rutland, Alexander Shishkin,
	Jiri Olsa, Ian Rogers, Adrian Hunter,
	open list:PERFORMANCE EVENTS SUBSYSTEM

Hello,

On Sun, Oct 1, 2023 at 6:10 AM April John <april@acab.dev> wrote:
>
> Dmesg is not in every distro at /bin/dmesg, in NixOS for example, this fails,
> but the path should in most cases contain dmesg.
> This follows the example of replacing /bin/bash with bash Path in the codebase.
>
> ---
> tools/perf/util/evsel.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
> index a8a5ff87c..aa602aae6 100644
> --- a/tools/perf/util/evsel.c
> +++ b/tools/perf/util/evsel.c
> @@ -3053,7 +3053,7 @@ int evsel__open_strerror(struct evsel *evsel, struct target *target,
>
> return scnprintf(msg, size,
> "The sys_perf_event_open() syscall returned with %d (%s) for event (%s).\n"
> - "/bin/dmesg | grep -i perf may provide additional information.\n",
> + "dmesg | grep -i perf may provide additional information.\n",
> err, str_error_r(err, sbuf, sizeof(sbuf)), evsel__name(evsel));
> }
>
> --
> 2.42.0
>
> Signed-off-by: April John <april@acab.dev>

It is usual to put a tag after the patch, it should be at the end of the
commit message.  With that,

Acked-by: Namhyung Kim <namhyung@kernel.org>

Thanks,
Namhyung

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

* Re: [PATCH] /bin/dmesg to dmesg Path
  2023-10-03  4:16 ` Namhyung Kim
@ 2023-10-05  4:44   ` Namhyung Kim
  0 siblings, 0 replies; 3+ messages in thread
From: Namhyung Kim @ 2023-10-05  4:44 UTC (permalink / raw)
  To: April John
  Cc: linux-kernel, Peter Zijlstra, Ingo Molnar,
	Arnaldo Carvalho de Melo, Mark Rutland, Alexander Shishkin,
	Jiri Olsa, Ian Rogers, Adrian Hunter,
	open list:PERFORMANCE EVENTS SUBSYSTEM

On Mon, Oct 2, 2023 at 9:16 PM Namhyung Kim <namhyung@kernel.org> wrote:
>
> Hello,
>
> On Sun, Oct 1, 2023 at 6:10 AM April John <april@acab.dev> wrote:
> >
> > Dmesg is not in every distro at /bin/dmesg, in NixOS for example, this fails,
> > but the path should in most cases contain dmesg.
> > This follows the example of replacing /bin/bash with bash Path in the codebase.
> >
> > ---
> > tools/perf/util/evsel.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
> > index a8a5ff87c..aa602aae6 100644
> > --- a/tools/perf/util/evsel.c
> > +++ b/tools/perf/util/evsel.c
> > @@ -3053,7 +3053,7 @@ int evsel__open_strerror(struct evsel *evsel, struct target *target,
> >
> > return scnprintf(msg, size,
> > "The sys_perf_event_open() syscall returned with %d (%s) for event (%s).\n"
> > - "/bin/dmesg | grep -i perf may provide additional information.\n",
> > + "dmesg | grep -i perf may provide additional information.\n",
> > err, str_error_r(err, sbuf, sizeof(sbuf)), evsel__name(evsel));
> > }
> >
> > --
> > 2.42.0
> >
> > Signed-off-by: April John <april@acab.dev>
>
> It is usual to put a tag after the patch, it should be at the end of the
> commit message.  With that,
>
> Acked-by: Namhyung Kim <namhyung@kernel.org>

I've tried to apply the patch but it failed.  It looks broken.
Have you generated it using git format-patch ?

Thanks,
Namhyung


  Applying: /bin/dmesg to dmesg Path
  error: corrupt patch at line 11
  Patch failed at 0001 /bin/dmesg to dmesg Path

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

end of thread, other threads:[~2023-10-05 16:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-01 13:09 [PATCH] /bin/dmesg to dmesg Path April John
2023-10-03  4:16 ` Namhyung Kim
2023-10-05  4:44   ` 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).