mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-09 02:24:45 +00:00
tools: acrntrace: Make all python scripts python3 module
The trend is to focus on Python3 and deprecate Python2. This patch make all the
acrntrace related scripts as Python3 module.
- Add parentheses to all the print as Python3 required.
- Remove suffix L and long() Python3 has deprecated. Python3 will treat all
intergers as long.
- Replace has_key() with "key in .keys()" because has_key() has been deprecated.
- Other minor fixes.
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python2
|
||||
#!/usr/bin/python3
|
||||
# -*- coding: UTF-8 -*-
|
||||
|
||||
"""
|
||||
@@ -20,7 +20,7 @@ def usage():
|
||||
Returns: None
|
||||
Raises: NA
|
||||
"""
|
||||
print '''
|
||||
print ('''
|
||||
[Usage] acrnalyze.py [options] [value] ...
|
||||
|
||||
[options]
|
||||
@@ -30,7 +30,7 @@ def usage():
|
||||
-f, --frequency=[unsigned int]: TSC frequency in MHz
|
||||
--vm_exit: to generate vm_exit report
|
||||
--irq: to generate irq related report
|
||||
'''
|
||||
''')
|
||||
|
||||
def do_analysis(ifile, ofile, analyzer):
|
||||
"""do the specific analysis
|
||||
|
||||
Reference in New Issue
Block a user