tools: acrntrace: Add irq related analyzer

This analyzer is implemented in vmexit_analyze. This patch make it as independent
analyzer with an option "--irq"

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:18:15 +08:00
committed by lijinxia
parent 8a233eec63
commit 136d5c30fb
2 changed files with 112 additions and 1 deletions

View File

@@ -12,6 +12,7 @@ import getopt
import os
import config
from vmexit_analyze import analyze_vm_exit
from irq_analyze import analyze_irq
def usage():
"""print the usage of the script
@@ -28,6 +29,7 @@ def usage():
-o, --ofile=[string]: output file
-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):
@@ -58,7 +60,7 @@ def main(argv):
inputfile = ''
outputfile = ''
opts_short = "hi:o:f:"
opts_long = ["ifile=", "ofile=", "frequency=", "vm_exit"]
opts_long = ["ifile=", "ofile=", "frequency=", "vm_exit", "irq"]
analyzer = []
try:
@@ -79,6 +81,8 @@ def main(argv):
TSC_FREQ = arg
elif opt == "--vm_exit":
analyzer.append(analyze_vm_exit)
elif opt == "--irq":
analyzer.append(analyze_irq)
else:
assert False, "unhandled option"