]> www.infradead.org Git - users/jedix/linux-maple.git/commit
verification/dot2k: Simplify manual steps in monitor creation
authorGabriele Monaco <gmonaco@redhat.com>
Fri, 27 Dec 2024 14:47:50 +0000 (15:47 +0100)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Fri, 27 Dec 2024 19:21:28 +0000 (14:21 -0500)
commit9c6cfe80980056042f1f80d65c74806021708989
tree0970e989e047f9171e7c92e50ae3b74f0ce1c7c0
parentbc3d482dcc062963e7dc20565be2a887e5fc9a2d
verification/dot2k: Simplify manual steps in monitor creation

This patch reduces and simplifies the manual steps still needed in
creating a new RV monitor.

It extends the dot2k script to create a tracepoint snippet and a
Kconfig file for the newly generated monitor. Those files can be kept
in the monitor's directory but shall be included in the main tracepoint
header and Kconfig.
Together with the checklist, dot2k now suggests the lines to add to
those files for inclusion and the Makefile line to compile the new
monitor:

 Writing the monitor into the directory monitor_name
 Almost done, checklist
   - Edit the monitor_name/monitor_name.c to add the instrumentation
   - Edit kernel/trace/rv/rv_trace.h:
 Add this line where other tracepoints are included and DA_MON_EVENTS_ID is defined:
 #include <monitors/monitor_name/monitor_name_trace.h>

   - Edit kernel/trace/rv/Makefile:
 Add this line where other monitors are included:
 obj-$(CONFIG_RV_MON_MONITOR_NAME) += monitors/monitor_name/monitor_name.o

   - Edit kernel/trace/rv/Kconfig:
 Add this line where other monitors are included:
 source "kernel/trace/rv/monitors/monitor_name/Kconfig"

   - Move monitor_name/ to the kernel's monitor directory (kernel/trace/rv/monitors)

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-7-gmonaco@redhat.com
Signed-off-by: Gabriele Monaco <gmonaco@redhat.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
tools/verification/dot2/dot2k
tools/verification/dot2/dot2k.py
tools/verification/dot2/dot2k_templates/Kconfig [new file with mode: 0644]
tools/verification/dot2/dot2k_templates/main.c
tools/verification/dot2/dot2k_templates/trace.h [new file with mode: 0644]