mirror of
https://github.com/torvalds/linux.git
synced 2025-04-12 06:49:52 +00:00

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>
14 lines
359 B
C
14 lines
359 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
/*
|
|
* Snippet to be included in rv_trace.h
|
|
*/
|
|
|
|
#ifdef CONFIG_RV_MON_%%MODEL_NAME_UP%%
|
|
DEFINE_EVENT(event_%%MONITOR_CLASS%%, event_%%MODEL_NAME%%,
|
|
%%TRACEPOINT_ARGS_SKEL_EVENT%%);
|
|
|
|
DEFINE_EVENT(error_%%MONITOR_CLASS%%, error_%%MODEL_NAME%%,
|
|
%%TRACEPOINT_ARGS_SKEL_ERROR%%);
|
|
#endif /* CONFIG_RV_MON_%%MODEL_NAME_UP%% */
|