1 #!/usr/bin/env python3 2 # SPDX-License-Identifier: GPL-2.0-only 3 # 4 # Copyright (C) 2019-2022 Red Hat, Inc. Daniel< 5 # 6 # dot2k: transform dot files into a monitor fo 7 # 8 # For further information, see: 9 # Documentation/trace/rv/da_monitor_synthesi 10 11 if __name__ == '__main__': 12 from dot2.dot2k import dot2k 13 import argparse 14 import ntpath 15 import os 16 import platform 17 import sys 18 19 parser = argparse.ArgumentParser(descripti 20 parser.add_argument('-d', "--dot", dest="d 21 parser.add_argument('-t', "--monitor_type" 22 parser.add_argument('-n', "--model_name", 23 parser.add_argument("-D", "--description", 24 params = parser.parse_args() 25 26 print("Opening and parsing the dot file %s 27 try: 28 monitor=dot2k(params.dot_file, params. 29 except Exception as e: 30 print('Error: '+ str(e)) 31 print("Sorry : :-(") 32 sys.exit(1) 33 34 # easier than using argparse action. 35 if params.model_name != None: 36 print(params.model_name) 37 38 print("Writing the monitor into the direct 39 monitor.print_files() 40 print("Almost done, checklist") 41 print(" - Edit the %s/%s.c to add the ins 42 print(" - Edit include/trace/events/rv.h 43 print(" - Move it to the kernel's monitor 44 print(" - Edit kernel/trace/rv/Makefile") 45 print(" - Edit kernel/trace/rv/Kconfig")
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.