public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf Documentation: clarify sysfs event names characters
@ 2024-05-13 19:24 Randy Dunlap
  2024-05-14  0:44 ` Ian Rogers
  0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2024-05-13 19:24 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Kan Liang, Ian Rogers, Arnaldo Carvalho de Melo,
	linux-perf-users

Specify that perf event names in sysfs must not contain mixed lower and
upper case characters and that they may contain numbers, ".", "_",
or "-" as well.

Fixes: 785623ee855e ("perf Document: Sysfs event names must be lower or upper case")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: linux-perf-users@vger.kernel.org
---
 Documentation/ABI/testing/sysfs-bus-event_source-devices-events |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff -- a/Documentation/ABI/testing/sysfs-bus-event_source-devices-events b/Documentation/ABI/testing/sysfs-bus-event_source-devices-events
--- a/Documentation/ABI/testing/sysfs-bus-event_source-devices-events
+++ b/Documentation/ABI/testing/sysfs-bus-event_source-devices-events
@@ -37,11 +37,13 @@ Description:	Per-pmu performance monitor
 		performance monitoring event supported by the <pmu>. The name
 		of the file is the name of the event.
 
-		As performance monitoring event names are case
-		insensitive in the perf tool, the perf tool only looks
-		for lower or upper case event names in sysfs to avoid
+		As performance monitoring event names are case insensitive
+		in the perf tool, the perf tool only looks for all lower
+		case or all upper case event names in sysfs to avoid
 		scanning the directory. It is therefore required the
-		name of the event here is either lower or upper case.
+		name of the event here is either completely lower or upper
+		case, with no mixed-case characters. Numbers, '.', '_', and
+		'-' are also allowed.
 
 		File contents:
 

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

* Re: [PATCH] perf Documentation: clarify sysfs event names characters
  2024-05-13 19:24 [PATCH] perf Documentation: clarify sysfs event names characters Randy Dunlap
@ 2024-05-14  0:44 ` Ian Rogers
  2025-01-07 19:14   ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Rogers @ 2024-05-14  0:44 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, Kan Liang, Arnaldo Carvalho de Melo,
	linux-perf-users

On Mon, May 13, 2024 at 12:24 PM Randy Dunlap <rdunlap@infradead.org> wrote:
>
> Specify that perf event names in sysfs must not contain mixed lower and
> upper case characters and that they may contain numbers, ".", "_",
> or "-" as well.
>
> Fixes: 785623ee855e ("perf Document: Sysfs event names must be lower or upper case")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Kan Liang <kan.liang@linux.intel.com>
> Cc: Ian Rogers <irogers@google.com>
> Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
> Cc: linux-perf-users@vger.kernel.org

Reviewed-by: Ian Rogers <irogers@google.com>

Looks good to me! Thanks,
Ian

> ---
>  Documentation/ABI/testing/sysfs-bus-event_source-devices-events |   10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff -- a/Documentation/ABI/testing/sysfs-bus-event_source-devices-events b/Documentation/ABI/testing/sysfs-bus-event_source-devices-events
> --- a/Documentation/ABI/testing/sysfs-bus-event_source-devices-events
> +++ b/Documentation/ABI/testing/sysfs-bus-event_source-devices-events
> @@ -37,11 +37,13 @@ Description:        Per-pmu performance monitor
>                 performance monitoring event supported by the <pmu>. The name
>                 of the file is the name of the event.
>
> -               As performance monitoring event names are case
> -               insensitive in the perf tool, the perf tool only looks
> -               for lower or upper case event names in sysfs to avoid
> +               As performance monitoring event names are case insensitive
> +               in the perf tool, the perf tool only looks for all lower
> +               case or all upper case event names in sysfs to avoid
>                 scanning the directory. It is therefore required the
> -               name of the event here is either lower or upper case.
> +               name of the event here is either completely lower or upper
> +               case, with no mixed-case characters. Numbers, '.', '_', and
> +               '-' are also allowed.
>
>                 File contents:
>

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

* Re: [PATCH] perf Documentation: clarify sysfs event names characters
  2024-05-14  0:44 ` Ian Rogers
@ 2025-01-07 19:14   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2025-01-07 19:14 UTC (permalink / raw)
  To: Ian Rogers
  Cc: Randy Dunlap, linux-kernel, Kan Liang, Arnaldo Carvalho de Melo,
	linux-perf-users

On Mon, May 13, 2024 at 05:44:41PM -0700, Ian Rogers wrote:
> On Mon, May 13, 2024 at 12:24 PM Randy Dunlap <rdunlap@infradead.org> wrote:
> >
> > Specify that perf event names in sysfs must not contain mixed lower and
> > upper case characters and that they may contain numbers, ".", "_",
> > or "-" as well.
> >
> > Fixes: 785623ee855e ("perf Document: Sysfs event names must be lower or upper case")
> > Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> > Cc: Kan Liang <kan.liang@linux.intel.com>
> > Cc: Ian Rogers <irogers@google.com>
> > Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
> > Cc: linux-perf-users@vger.kernel.org
> 
> Reviewed-by: Ian Rogers <irogers@google.com>
> 
> Looks good to me! Thanks,

Fell thru the cracks, finally picking this up.

- Arnaldo

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

end of thread, other threads:[~2025-01-07 19:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-13 19:24 [PATCH] perf Documentation: clarify sysfs event names characters Randy Dunlap
2024-05-14  0:44 ` Ian Rogers
2025-01-07 19:14   ` Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox