| .. | .. |
|---|
| 1 | | -#!/usr/bin/env python |
|---|
| 2 | 1 | # SPDX-License-Identifier: GPL-2.0 |
|---|
| 2 | + |
|---|
| 3 | +from __future__ import print_function |
|---|
| 3 | 4 | |
|---|
| 4 | 5 | data = {} |
|---|
| 5 | 6 | times = [] |
|---|
| .. | .. |
|---|
| 20 | 21 | threads.append(thread) |
|---|
| 21 | 22 | |
|---|
| 22 | 23 | def 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 | | - # (event, cpu, thread, time, val, ena, run) |
|---|
| 24 | + #print("event %s cpu %d, thread %d, time %d, val %d, ena %d, run %d" % |
|---|
| 25 | + # (event, cpu, thread, time, val, ena, run)) |
|---|
| 25 | 26 | |
|---|
| 26 | 27 | store_key(time, cpu, thread) |
|---|
| 27 | 28 | key = get_key(time, event, cpu, thread) |
|---|
| .. | .. |
|---|
| 59 | 60 | if ins != 0: |
|---|
| 60 | 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 | |
|---|
| 64 | 65 | def trace_end(): |
|---|
| 65 | 66 | pass |
|---|
| .. | .. |
|---|
| 75 | 76 | # if ins != 0: |
|---|
| 76 | 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)) |
|---|