summaryrefslogtreecommitdiff
path: root/tools/perf/python/tracepoint.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/python/tracepoint.py')
-rwxr-xr-xtools/perf/python/tracepoint.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/perf/python/tracepoint.py b/tools/perf/python/tracepoint.py
index 15b0c8268996..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 -*-
@@ -9,7 +10,7 @@ def change_proctitle():
try:
import setproctitle
setproctitle.setproctitle("tracepoint.py")
- except:
+ except ImportError:
print("Install the setproctitle python package to help with top and friends")
def main():
@@ -29,7 +30,7 @@ def main():
evlist.open()
evlist.mmap()
- evlist.enable();
+ evlist.enable()
while True:
evlist.poll(timeout = -1)