]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
dtrace: add some dtrace static probes that are easy to trigger
authorRandy Dunlap <randy.dunlap@oracle.com>
Tue, 28 Jun 2011 00:01:46 +0000 (17:01 -0700)
committerNick Alcock <nick.alcock@oracle.com>
Mon, 29 Jun 2015 21:39:52 +0000 (22:39 +0100)
See the static probes directory listing for a summary of
all dtrace static probes.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
drivers/tty/sysrq.c
kernel/module.c
kernel/signal.c

index 843f2cdc280b9d178d09469eb0363658d6a69805..8d659c381eaa77d4b421be691d2a1cec1174b648 100644 (file)
@@ -32,6 +32,7 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/suspend.h>
+#include <linux/sdt.h>
 #include <linux/writeback.h>
 #include <linux/swap.h>
 #include <linux/spinlock.h>
@@ -527,6 +528,9 @@ void __handle_sysrq(int key, bool check_mask)
        pr_info("SysRq : ");
 
         op_p = __sysrq_get_key_op(key);
+       DTRACE_PROBE3(__handle_sysrq,
+               int, key, int, check_mask,
+               int, orig_log_level);
         if (op_p) {
                /*
                 * Should we check for enabled operations (/proc/sysrq-trigger
index cfc9e843a924091e2be3d2a2bcef72a038737f64..90dac4ee90ecb1f322a045605efbff9d74df8651 100644 (file)
@@ -797,6 +797,10 @@ SYSCALL_DEFINE2(delete_module, const char __user *, name_user,
        char name[MODULE_NAME_LEN];
        int ret, forced = 0;
 
+       DTRACE_PROBE2(delete_module,
+               const char __user *, name_user,
+               unsigned int, flags);
+
        if (!capable(CAP_SYS_MODULE) || modules_disabled)
                return -EPERM;
 
@@ -3411,6 +3415,10 @@ SYSCALL_DEFINE3(init_module, void __user *, umod,
        int err;
        struct load_info info = { };
 
+       DTRACE_PROBE3(init_module,
+               void __user *, umod,
+               unsigned long, len, const char __user *, uargs);
+
        err = may_init_module();
        if (err)
                return err;
index d51c5ddd855c84b9b65d4a7ef22eedcdff2eeafa..5d366e7b1de2554b76e95fec0b76428706f611b8 100644 (file)
@@ -37,6 +37,7 @@
 
 #define CREATE_TRACE_POINTS
 #include <trace/events/signal.h>
+#include <linux/sdt.h>
 
 #include <asm/param.h>
 #include <asm/uaccess.h>
@@ -2341,6 +2342,11 @@ relock:
                        if (print_fatal_signals)
                                print_fatal_signal(ksig->info.si_signo);
                        proc_coredump_connector(current);
+                       DTRACE_PROBE4(get_signal_to_deliver,
+                               int, ksig->info.si_signo,
+                               struct pt_regs *, regs,
+                               char *, current->comm,
+                               int, task_pid_nr(current));
                        /*
                         * If it was able to dump core, this kills all
                         * other threads in the group and synchronizes with