linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tanu M <tanu235m@gmail.com>
To: linux-perf-users@vger.kernel.org
Cc: mingo@redhat.com, acme@kernel.org, peterz@infradead.org
Subject: [PATCH] perf tools/perf/python/tracepoint.py: Converted to Python3
Date: Sun, 27 Mar 2022 23:08:46 -0700	[thread overview]
Message-ID: <CAPS78prawYzRZnyhWjgOnGw4EwoswNwztvfZFdCOPOydFzVwzQ@mail.gmail.com> (raw)

Hi,
I have converted the tracepoint.py file to python3 as many of the
files in tools/perf are already written in python3.

Signed-off-by: Tanusree Debnath <tanu235m@gmail.com>

---
 tools/perf/python/tracepoint.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/python/tracepoint.py b/tools/perf/python/tracepoint.py
index 461848c7f..6a63e6c41 100755
--- a/tools/perf/python/tracepoint.py
+++ b/tools/perf/python/tracepoint.py
@@ -34,7 +34,7 @@ def main():
             if not isinstance(event, perf.sample_event):
                 continue

-            print "time %u prev_comm=%s prev_pid=%d prev_prio=%d
prev_state=0x%x ==> next_comm=%s next_pid=%d next_prio=%d" % (
+            print ("time %u prev_comm=%s prev_pid=%d prev_prio=%d
prev_state=0x%x ==> next_comm=%s next_pid=%d next_prio=%d" % (
                    event.sample_time,
                    event.prev_comm,
                    event.prev_pid,
@@ -42,7 +42,7 @@ def main():
                    event.prev_state,
                    event.next_comm,
                    event.next_pid,
-                   event.next_prio)
+                   event.next_prio))

 if __name__ == '__main__':
     main()
-- 
2.25.1

             reply	other threads:[~2022-03-28  6:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-28  6:08 Tanu M [this message]
2022-03-30 20:39 ` [PATCH] perf tools/perf/python/tracepoint.py: Converted to Python3 Arnaldo Carvalho de Melo
2022-03-30 20:47   ` Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPS78prawYzRZnyhWjgOnGw4EwoswNwztvfZFdCOPOydFzVwzQ@mail.gmail.com \
    --to=tanu235m@gmail.com \
    --cc=acme@kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).