bin/perf-annotate-jit.py: Update to Python 3.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12926>
This commit is contained in:
Vinson Lee 2021-09-19 22:49:37 -07:00
parent 7b81dbe591
commit 87182ba977
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
#
# Copyright 2012 VMware Inc
# Copyright 2008-2009 Jose Fonseca
@ -165,7 +165,7 @@ class PerfParser(LineParser):
sys.stdout.write('%6u' % (sample))
total_samples += sample
sys.stdout.write('%6u: %s\n' % (address, instr))
print 'total:', total_samples
print('total:', total_samples)
assert len(samples) == 0
sys.exit(0)
@ -221,7 +221,7 @@ class PerfParser(LineParser):
start_address = lookupMap(module, function_name)
address -= start_address
#print function_name, module, address
#print(function_name, module, address)
samples[address] = samples.get(address, 0) + 1