]> git.ipfire.org Git - thirdparty/linux.git/commit
verification/dot2k: Auto patch current kernel source
authorGabriele Monaco <gmonaco@redhat.com>
Fri, 27 Dec 2024 14:47:51 +0000 (15:47 +0100)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Fri, 27 Dec 2024 19:39:35 +0000 (14:39 -0500)
commitde6f45c2dd226269fe9886290a139533c817c5bc
tree4fca1811724c6c00c3280b30d2cc5e5ab8c68092
parent9c6cfe80980056042f1f80d65c74806021708989
verification/dot2k: Auto patch current kernel source

dot2k suggests a list of changes to the kernel tree while adding a
monitor: edit tracepoints header, Makefile, Kconfig and moving the
monitor folder. Those changes can be easily run automatically.

Add a flag to dot2k to alter the kernel source.

The kernel source directory can be either assumed from the PWD, or from
the running kernel, if installed.
This feature works best if the kernel tree is a git repository, so that
its easier to make sure there are no unintended changes.

The main RV files (e.g. Makefile) have now a comment placeholder that
can be useful for manual editing (e.g. to know where to add new
monitors) and it is used by the script to append the required lines.

We also slightly adapt the file handling functions in dot2k: __open_file
is now called __read_file and also closes the file before returning the
content; __create_file is now a more general __write_file, we no longer
return on FileExistsError (not thrown while opening), a new
__create_file simply calls __write_file specifying the monitor folder in
the path.

Cc: Juri Lelli <juri.lelli@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: John Kacur <jkacur@redhat.com>
Link: https://lore.kernel.org/20241227144752.362911-8-gmonaco@redhat.com
Signed-off-by: Gabriele Monaco <gmonaco@redhat.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/rv/Kconfig
kernel/trace/rv/Makefile
kernel/trace/rv/rv_trace.h
tools/verification/dot2/dot2k
tools/verification/dot2/dot2k.py