aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/stat-cpi.py
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-04-11 08:36:30 -0400
committerTakashi Iwai <tiwai@suse.de>2019-04-11 08:36:30 -0400
commit9b0dcd0e5a27958b57e3e390f63c098d63a055da (patch)
treede778d683f121d3062df316994e9c4cf195eb12c /tools/perf/scripts/python/stat-cpi.py
parentd7a181da2dfa3190487c446042ba01e07d851c74 (diff)
parentac71317e6be01812cc0c54d8be6d3c1139c8380b (diff)
Merge tag 'asoc-fix-v5.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v5.1 A few core fixes along with the driver specific ones, mainly fixing small issues that only affect x86 platforms for various reasons (their unusual machine enumeration mechanisms mainly, plus a fix for error handling in topology). There's some of the driver fixes that look larger than they are, like the hdmi-codec changes which resulted in an indentation change, and most of the other large changes are for new drivers like the STM32 changes.
Diffstat (limited to 'tools/perf/scripts/python/stat-cpi.py')
-rw-r--r--tools/perf/scripts/python/stat-cpi.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/perf/scripts/python/stat-cpi.py b/tools/perf/scripts/python/stat-cpi.py
index 8410672efb8b..01fa933ff3cf 100644
--- a/tools/perf/scripts/python/stat-cpi.py
+++ b/tools/perf/scripts/python/stat-cpi.py
@@ -1,6 +1,7 @@
1#!/usr/bin/env python
2# SPDX-License-Identifier: GPL-2.0 1# SPDX-License-Identifier: GPL-2.0
3 2
3from __future__ import print_function
4
4data = {} 5data = {}
5times = [] 6times = []
6threads = [] 7threads = []
@@ -20,8 +21,8 @@ def store_key(time, cpu, thread):
20 threads.append(thread) 21 threads.append(thread)
21 22
22def store(time, event, cpu, thread, val, ena, run): 23def store(time, event, cpu, thread, val, ena, run):
23 #print "event %s cpu %d, thread %d, time %d, val %d, ena %d, run %d" % \ 24 #print("event %s cpu %d, thread %d, time %d, val %d, ena %d, run %d" %
24 # (event, cpu, thread, time, val, ena, run) 25 # (event, cpu, thread, time, val, ena, run))
25 26
26 store_key(time, cpu, thread) 27 store_key(time, cpu, thread)
27 key = get_key(time, event, cpu, thread) 28 key = get_key(time, event, cpu, thread)
@@ -59,7 +60,7 @@ def stat__interval(time):
59 if ins != 0: 60 if ins != 0:
60 cpi = cyc/float(ins) 61 cpi = cyc/float(ins)
61 62
62 print "%15f: cpu %d, thread %d -> cpi %f (%d/%d)" % (time/(float(1000000000)), cpu, thread, cpi, cyc, ins) 63 print("%15f: cpu %d, thread %d -> cpi %f (%d/%d)" % (time/(float(1000000000)), cpu, thread, cpi, cyc, ins))
63 64
64def trace_end(): 65def trace_end():
65 pass 66 pass
@@ -75,4 +76,4 @@ def trace_end():
75# if ins != 0: 76# if ins != 0:
76# cpi = cyc/float(ins) 77# cpi = cyc/float(ins)
77# 78#
78# print "time %.9f, cpu %d, thread %d -> cpi %f" % (time/(float(1000000000)), cpu, thread, cpi) 79# print("time %.9f, cpu %d, thread %d -> cpi %f" % (time/(float(1000000000)), cpu, thread, cpi))