Skip to content

Commit

Permalink
perf scripts intel-pt-events.py: Fix IPC output for Python 2
Browse files Browse the repository at this point in the history
[ Upstream commit 1f64cfd ]

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: a483e64 ("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>
  • Loading branch information
vient authored and gregkh committed May 17, 2023
1 parent f108cbc commit b2b9169
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/perf/scripts/python/intel-pt-events.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b2b9169

Please sign in to comment.