summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRoman Lozko <lozko.roma@gmail.com>2023-03-10 18:04:45 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-05-17 12:53:39 +0300
commitb2b9169960421464bfbc573b560a117b6f1390d5 (patch)
treeb722ba35fde0cdd9657753c112515eaf44d79ff5 /tools
parentf108cbc836418517fba37a7a94b49efeba75bbf6 (diff)
downloadlinux-b2b9169960421464bfbc573b560a117b6f1390d5.tar.xz
perf scripts intel-pt-events.py: Fix IPC output for Python 2
[ Upstream commit 1f64cfdebfe0494264271e8d7a3a47faf5f58ec7 ] Integers are not converted to floats during division in Python 2 which results in incorrect IPC values. Fix by switching to new division behavior. Fixes: a483e64c0b62e93a ("perf scripting python: intel-pt-events.py: Add --insn-trace and --src-trace") Signed-off-by: Roman Lozko <lozko.roma@gmail.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/20230310150445.2925841-1-lozko.roma@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/scripts/python/intel-pt-events.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/scripts/python/intel-pt-events.py b/tools/perf/scripts/python/intel-pt-events.py
index 6be7fd8fd615..8058b2fc2b68 100644
--- a/tools/perf/scripts/python/intel-pt-events.py
+++ b/tools/perf/scripts/python/intel-pt-events.py
@@ -11,7 +11,7 @@
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
-from __future__ import print_function
+from __future__ import division, print_function
import os
import sys