Exemple #1
0
     printHelp()
     sys.exit()
 elif (arg == '-v'):
     print("Version %.1f" % sysvals.version)
     sys.exit()
 elif (arg in simplecmds):
     cmd = arg[1:]
 elif (arg == '-f'):
     sysvals.useftrace = True
 elif (arg == '-callgraph'):
     sysvals.useftrace = True
     sysvals.usecallgraph = True
 elif (arg == '-mincg'):
     sysvals.mincglen = aslib.getArgFloat('-mincg', args, 0.0, 10000.0)
 elif (arg == '-timeprec'):
     sysvals.setPrecision(aslib.getArgInt('-timeprec', args, 0, 6))
 elif (arg == '-maxdepth'):
     sysvals.max_graph_depth = aslib.getArgInt('-maxdepth', args, 0,
                                               1000)
 elif (arg == '-filter'):
     try:
         val = args.next()
     except:
         doError('No filter functions supplied', True)
     aslib.rootCheck(True)
     sysvals.setGraphFilter(val)
 elif (arg == '-ftrace'):
     try:
         val = args.next()
     except:
         doError('No ftrace file supplied', True)
		elif(arg == '-cgfilter'):
			try:
				val = args.next()
			except:
				doError('No callgraph functions supplied', True)
			sysvals.setDeviceFilter(val)
		elif(arg == '-bl'):
			try:
				val = args.next()
			except:
				doError('No boot loader name supplied', True)
			if val.lower() not in ['grub']:
				doError('Unknown boot loader: %s' % val, True)
			sysvals.bootloader = val.lower()
		elif(arg == '-timeprec'):
			sysvals.setPrecision(aslib.getArgInt('-timeprec', args, 0, 6))
		elif(arg == '-maxdepth'):
			sysvals.max_graph_depth = aslib.getArgInt('-maxdepth', args, 0, 1000)
		elif(arg == '-func'):
			try:
				val = args.next()
			except:
				doError('No filter functions supplied', True)
			sysvals.useftrace = True
			sysvals.usecallgraph = True
			sysvals.rootCheck(True)
			sysvals.setGraphFilter(val)
		elif(arg == '-ftrace'):
			try:
				val = args.next()
			except: