History

perf scripts intel-pt-events.py: Fix IPC output for Python 2

Integers are not converted to floats during division in Python 2 which results in incorrect IPC values. Fix by switching to new division behavior.

Roman Lozko committed 3 years ago

Commit 1f64cfd1 parent 0e70f501 file · +1 −1Browse files

Showing the changes to tools/perf/scripts/python (1 of 1 file). Show all

Unified · Split

tools/perf/scripts/python/intel-pt-events.py+1−1
@@ -11,7 +11,7 @@ · 10 unmodified lines
1111 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
1212 # more details.
1313
14−from __future__ import print_function
14+from __future__ import division, print_function
1515
1616 import io
1717 import os