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

TOMOYO Linux Cross Reference
Linux/tools/verification/dot2/dot2k_templates/main_per_cpu.c

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 ] ~

  1 // SPDX-License-Identifier: GPL-2.0
  2 #include <linux/ftrace.h>
  3 #include <linux/tracepoint.h>
  4 #include <linux/kernel.h>
  5 #include <linux/module.h>
  6 #include <linux/init.h>
  7 #include <linux/rv.h>
  8 #include <rv/instrumentation.h>
  9 #include <rv/da_monitor.h>
 10 
 11 #define MODULE_NAME "MODEL_NAME"
 12 
 13 /*
 14  * XXX: include required tracepoint headers, e.g.,
 15  * #include <linux/trace/events/sched.h>
 16  */
 17 #include <trace/events/rv.h>
 18 
 19 /*
 20  * This is the self-generated part of the monitor. Generally, there is no need
 21  * to touch this section.
 22  */
 23 #include "MODEL_NAME.h"
 24 
 25 /*
 26  * Declare the deterministic automata monitor.
 27  *
 28  * The rv monitor reference is needed for the monitor declaration.
 29  */
 30 static struct rv_monitor rv_MODEL_NAME;
 31 DECLARE_DA_MON_PER_CPU(MODEL_NAME, MIN_TYPE);
 32 
 33 /*
 34  * This is the instrumentation part of the monitor.
 35  *
 36  * This is the section where manual work is required. Here the kernel events
 37  * are translated into model's event.
 38  *
 39  */
 40 TRACEPOINT_HANDLERS_SKEL
 41 static int enable_MODEL_NAME(void)
 42 {
 43         int retval;
 44 
 45         retval = da_monitor_init_MODEL_NAME();
 46         if (retval)
 47                 return retval;
 48 
 49 TRACEPOINT_ATTACH
 50 
 51         return 0;
 52 }
 53 
 54 static void disable_MODEL_NAME(void)
 55 {
 56         rv_MODEL_NAME.enabled = 0;
 57 
 58 TRACEPOINT_DETACH
 59 
 60         da_monitor_destroy_MODEL_NAME();
 61 }
 62 
 63 /*
 64  * This is the monitor register section.
 65  */
 66 static struct rv_monitor rv_MODEL_NAME = {
 67         .name = "MODEL_NAME",
 68         .description = "auto-generated MODEL_NAME",
 69         .enable = enable_MODEL_NAME,
 70         .disable = disable_MODEL_NAME,
 71         .reset = da_monitor_reset_all_MODEL_NAME,
 72         .enabled = 0,
 73 };
 74 
 75 static int __init register_MODEL_NAME(void)
 76 {
 77         rv_register_monitor(&rv_MODEL_NAME);
 78         return 0;
 79 }
 80 
 81 static void __exit unregister_MODEL_NAME(void)
 82 {
 83         rv_unregister_monitor(&rv_MODEL_NAME);
 84 }
 85 
 86 module_init(register_MODEL_NAME);
 87 module_exit(unregister_MODEL_NAME);
 88 
 89 MODULE_LICENSE("GPL");
 90 MODULE_AUTHOR("dot2k: auto-generated");
 91 MODULE_DESCRIPTION("MODEL_NAME");
 92 

~ [ 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