tools: acrntrace: Refactor vmexit_analyzer based on new trace format

- Refactor vmexit_analyzer based on new trace format (raw data). We can get
    the same output like original implementation.

  - Remove irq related analysis. Will add it back with an option "--irq".

  - Remove unused VMEXIT_EPT_VIOLATION_GVT

Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
This commit is contained in:
Kaige Fu
2018-06-25 23:09:28 +08:00
committed by lijinxia
parent 2bdd8112bd
commit 8a233eec63
2 changed files with 52 additions and 108 deletions

View File

@@ -4,7 +4,6 @@
"""
This is the main script of arnalyzer, which:
- parse the options
- pre-process the trace data file
- call a specific script to do analysis
"""
@@ -46,22 +45,6 @@ def do_analysis(ifile, ofile, analyzer):
for alyer in analyzer:
alyer(ifile, ofile)
# pre process to make sure the trace data start and end with VMENTER
def pre_process(ifile, evstr):
"""invoke sh script to preprocess the data file
Args:
ifile: input trace data file
evstr: event string, after the processing, the data file should
start and end with the string
Returns:
status of sh script execution
Raises:
NA
"""
status = os.system('bash pre_process.sh %s %s' % (ifile, evstr))
return status
def main(argv):
"""Main enterance function
@@ -103,11 +86,7 @@ def main(argv):
assert outputfile != '', "output file is required"
assert analyzer != '', 'MUST contain one of analyzer: ''vm_exit'
status = pre_process(inputfile, 'VM_ENTER')
if status == 0:
do_analysis(inputfile, outputfile, analyzer)
else:
print "Invalid trace data file %s" % (inputfile)
do_analysis(inputfile, outputfile, analyzer)
if __name__ == "__main__":
main(sys.argv[1:])