~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/verification/dot2/dot2k

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /tools/verification/dot2/dot2k (Version linux-6.12-rc7) and /tools/verification/dot2/dot2k (Version linux-6.10.14)


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

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php