[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250312203141.285263-4-acme@kernel.org>
Date: Wed, 12 Mar 2025 17:31:38 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Namhyung Kim <namhyung@...nel.org>
Cc: Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
James Clark <james.clark@...aro.org>,
Jiri Olsa <jolsa@...nel.org>,
Ian Rogers <irogers@...gle.com>,
Adrian Hunter <adrian.hunter@...el.com>,
Kan Liang <kan.liang@...ux.intel.com>,
Clark Williams <williams@...hat.com>,
linux-kernel@...r.kernel.org,
linux-perf-users@...r.kernel.org,
Arnaldo Carvalho de Melo <acme@...hat.com>
Subject: [PATCH 3/6] perf python tracepoint.py: Change the COMM using setproctitle if available
From: Arnaldo Carvalho de Melo <acme@...hat.com>
Otherwise when debugging we see just "python" in perf, top, etc.
Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: Ian Rogers <irogers@...gle.com>
Cc: James Clark <james.clark@...aro.org>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Kan Liang <kan.liang@...ux.intel.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/python/tracepoint.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tools/perf/python/tracepoint.py b/tools/perf/python/tracepoint.py
index 38b2b6d11f64566a..15b0c82689966f23 100755
--- a/tools/perf/python/tracepoint.py
+++ b/tools/perf/python/tracepoint.py
@@ -5,7 +5,15 @@
import perf
+def change_proctitle():
+ try:
+ import setproctitle
+ setproctitle.setproctitle("tracepoint.py")
+ except:
+ print("Install the setproctitle python package to help with top and friends")
+
def main():
+ change_proctitle()
cpus = perf.cpu_map()
threads = perf.thread_map(-1)
evlist = perf.parse_events("sched:sched_switch", cpus, threads)
--
2.48.1
Powered by blists - more mailing lists