mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-18 23:29:57 +02:00

The presence of duplicate import lines appears to be a typo.
Removing them.
Link: https://lore.kernel.org/r/20230906155703.3917918-1-alessandro.carminati@gmail.com
Fixes: 24bce201d7
("tools/rv: Add dot2k")
Signed-off-by: Alessandro Carminati (Red Hat) <alessandro.carminati@gmail.com>
Signed-off-by: Daniel Bristot de Oliveira <bristot@kernel.org>
1.7 KiB
1.7 KiB
#!/usr/bin/env python3
SPDX-License-Identifier: GPL-2.0-only
Copyright (C) 2019-2022 Red Hat, Inc. Daniel Bristot de Oliveira bristot@kernel.org
dot2k: transform dot files into a monitor for the Linux kernel.
For further information, see:
Documentation/trace/rv/da_monitor_synthesis.rst
if name == 'main': from dot2.dot2k import dot2k import argparse import ntpath import os import platform import sys
parser = argparse.ArgumentParser(description='transform .dot file into kernel rv monitor')
parser.add_argument('-d', "--dot", dest="dot_file", required=True)
parser.add_argument('-t', "--monitor_type", dest="monitor_type", required=True)
parser.add_argument('-n', "--model_name", dest="model_name", required=False)
parser.add_argument("-D", "--description", dest="description", required=False)
params = parser.parse_args()
print("Opening and parsing the dot file %s" % params.dot_file)
try:
monitor=dot2k(params.dot_file, params.monitor_type)
except Exception as e:
print('Error: '+ str(e))
print("Sorry : :-(")
sys.exit(1)
# easier than using argparse action.
if params.model_name != None:
print(params.model_name)
print("Writing the monitor into the directory %s" % monitor.name)
monitor.print_files()
print("Almost done, checklist")
print(" - Edit the %s/%s.c to add the instrumentation" % (monitor.name, monitor.name))
print(" - Edit include/trace/events/rv.h to add the tracepoint entry")
print(" - Move it to the kernel's monitor directory")
print(" - Edit kernel/trace/rv/Makefile")
print(" - Edit kernel/trace/rv/Kconfig")