[PATCH v1 58/58] perf python: Improve perf script -l descriptions

From: Ian Rogers

Date: Sun Apr 19 2026 - 20:15:30 EST


Improve the description when running "perf script -l":
```
$ perf script -l
List of available scripts:
...
counting Example for counting perf events.
...
exported-sql-viewer exported-sql-viewer.py: view data from sql database.
...
tracepoint Example showing how to enable a tracepoint and access its fields.
twatch Example to show how to enable a tracepoint and access its fields.
...
```

Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
---
tools/perf/python/counting.py | 1 +
tools/perf/python/exported-sql-viewer.py | 2 +-
tools/perf/python/tracepoint.py | 1 +
tools/perf/python/twatch.py | 1 +
4 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/perf/python/counting.py b/tools/perf/python/counting.py
index 02121d2bb11d..9adbbeccdacd 100755
--- a/tools/perf/python/counting.py
+++ b/tools/perf/python/counting.py
@@ -1,5 +1,6 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: GPL-2.0
+"""Example for counting perf events."""
# -*- python -*-
# -*- coding: utf-8 -*-

diff --git a/tools/perf/python/exported-sql-viewer.py b/tools/perf/python/exported-sql-viewer.py
index e0b2e7268ef6..6cb3101d0d3e 100755
--- a/tools/perf/python/exported-sql-viewer.py
+++ b/tools/perf/python/exported-sql-viewer.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# SPDX-License-Identifier: GPL-2.0
-# exported-sql-viewer.py: view data from sql database
+"""exported-sql-viewer.py: view data from sql database."""
# Copyright (c) 2014-2018, Intel Corporation.

# To use this script you will need to have exported data using either the
diff --git a/tools/perf/python/tracepoint.py b/tools/perf/python/tracepoint.py
index 15b0c8268996..d3bc22628ef7 100755
--- a/tools/perf/python/tracepoint.py
+++ b/tools/perf/python/tracepoint.py
@@ -1,5 +1,6 @@
#! /usr/bin/env python
# SPDX-License-Identifier: GPL-2.0
+"""Example showing how to enable a tracepoint and access its fields."""
# -*- python -*-
# -*- coding: utf-8 -*-

diff --git a/tools/perf/python/twatch.py b/tools/perf/python/twatch.py
index 04f3db29b9bc..e50cc2feb58a 100755
--- a/tools/perf/python/twatch.py
+++ b/tools/perf/python/twatch.py
@@ -1,5 +1,6 @@
#! /usr/bin/env python
# SPDX-License-Identifier: GPL-2.0-only
+"""Example to show how to enable a tracepoint and access its fields."""
# -*- python -*-
# -*- coding: utf-8 -*-
# twatch - Experimental use of the perf python interface
--
2.54.0.rc1.513.gad8abe7a5a-goog