diff options
Diffstat (limited to 'tools/perf/scripts/python/net_dropmonitor.py')
| -rwxr-xr-x | tools/perf/scripts/python/net_dropmonitor.py | 12 | 
1 files changed, 7 insertions, 5 deletions
diff --git a/tools/perf/scripts/python/net_dropmonitor.py b/tools/perf/scripts/python/net_dropmonitor.py index a150164b44a3..101059971738 100755 --- a/tools/perf/scripts/python/net_dropmonitor.py +++ b/tools/perf/scripts/python/net_dropmonitor.py @@ -1,11 +1,13 @@  # Monitor the system for dropped packets and proudce a report of drop locations and counts  # SPDX-License-Identifier: GPL-2.0 +from __future__ import print_function +  import os  import sys  sys.path.append(os.environ['PERF_EXEC_PATH'] + \ -		'/scripts/python/Perf-Trace-Util/lib/Perf/Trace') +	'/scripts/python/Perf-Trace-Util/lib/Perf/Trace')  from perf_trace_context import *  from Core import * @@ -50,19 +52,19 @@ def get_sym(sloc):  		return (None, 0)  def print_drop_table(): -	print "%25s %25s %25s" % ("LOCATION", "OFFSET", "COUNT") +	print("%25s %25s %25s" % ("LOCATION", "OFFSET", "COUNT"))  	for i in drop_log.keys():  		(sym, off) = get_sym(i)  		if sym == None:  			sym = i -		print "%25s %25s %25s" % (sym, off, drop_log[i]) +		print("%25s %25s %25s" % (sym, off, drop_log[i]))  def trace_begin(): -	print "Starting trace (Ctrl-C to dump results)" +	print("Starting trace (Ctrl-C to dump results)")  def trace_end(): -	print "Gathering kallsyms data" +	print("Gathering kallsyms data")  	get_kallsyms_table()  	print_drop_table()  | 
