diff options
| author | Ian Rogers <irogers@google.com> | 2026-09-25 23:19:34 -0700 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2026-09-26 20:49:27 +0200 |
| commit | 4b15226c14df50c8c9ca67e35295bf8c7ae71574 (patch) | |
| tree | 46b7888c983cd205849e9aa696c0864d9a6fd256 /tools/perf/python | |
| parent | abbcb48f33e6eba5bb955c4af431d2920779c0f7 (diff) | |
perf python: Improve perf script -l descriptions
Add module docstrings to counting.py, tracepoint.py, and twatch.py. This
satisfies pylint's missing-module-docstring check and prepares these
existing standalone scripts in tools/perf/python/ for the later commit
in this series ("perf script: Support standalone scripts and remove
embedded scripting"), which updates 'perf script -l' to scan
tools/perf/python/ and display each script's module docstring:
```
$ perf script -l
List of available scripts:
...
counting
Example for counting perf events.
...
tracepoint
Example showing how to enable a tracepoint and access its fields.
twatch
Example to show how to enable a software event and track
context switches.
...
```
Assisted-by: Antigravity:gemini-3.1-pro
Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/python')
| -rwxr-xr-x | tools/perf/python/counting.py | 1 | ||||
| -rwxr-xr-x | tools/perf/python/tracepoint.py | 1 | ||||
| -rwxr-xr-x | tools/perf/python/twatch.py | 1 |
3 files changed, 3 insertions, 0 deletions
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/tracepoint.py b/tools/perf/python/tracepoint.py index 9d49a25b3b1e..faa5311b8418 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 ad35b1620781..b0f1bf113162 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 software event and track context switches.""" # -*- python -*- # -*- coding: utf-8 -*- # twatch - Experimental use of the perf python interface |
