From: Randy Dunlap Date: Tue, 28 Jun 2011 00:01:46 +0000 (-0700) Subject: dtrace: add some dtrace static probes that are easy to trigger X-Git-Tag: v4.1.12-92~313^2~184 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=e14c92e23c7620d93774fd9ebc2f4596d7772c3d;p=users%2Fjedix%2Flinux-maple.git dtrace: add some dtrace static probes that are easy to trigger See the static probes directory listing for a summary of all dtrace static probes. Signed-off-by: Randy Dunlap --- diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c index 843f2cdc280b..8d659c381eaa 100644 --- a/drivers/tty/sysrq.c +++ b/drivers/tty/sysrq.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -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 diff --git a/kernel/module.c b/kernel/module.c index cfc9e843a924..90dac4ee90ec 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -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; diff --git a/kernel/signal.c b/kernel/signal.c index d51c5ddd855c..5d366e7b1de2 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -37,6 +37,7 @@ #define CREATE_TRACE_POINTS #include +#include #include #include @@ -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