def convert_dump(args): if os.path.isfile(args.dumpfile): if os.path.exists(args.tracefile): os.remove(args.tracefile) assert (not os.path.exists(args.tracefile)) print("Converting dump %s -> %s" % (args.dumpfile, args.tracefile)) td = trace.TraceDumpReader(args.dumpfile) trace.write_to_file(args.tracefile, list(td.traces())) else: print("error: %s not found" % (args.dumpfile)) sys.exit(1)
def convert_dump(args) : if os.path.isfile(args.dumpfile): if os.path.exists(args.tracefile): os.remove(args.tracefile) assert(not os.path.exists(args.tracefile)) print "Converting dump %s -> %s" % (args.dumpfile, args.tracefile) td = trace.TraceDumpReader(args.dumpfile) trace.write_to_file(args.tracefile, list(td.traces())) else: print("error: %s not found" % (args.dumpfile)) sys.exit(1)
def save_traces_to_file(filename): trace.write_to_file(filename, list(all_traces()))