|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /proc/21573/root/usr/share/systemtap/runtime/ |
Upload File : |
#include <trace/events/sched.h>
#include <trace/events/syscalls.h>
#include <linux/task_work.h>
// The utrace-less task_finder needs either:
// - 5 specific tracepoints
// - 4 specific tracepoints and ftrace_set_filter()
// Both scenarios need <linux/task_work.h>.
//
// Check scenario #1.
void __sched_process_fork(void *cb_data __attribute__((unused)),
struct task_struct *parent __attribute__((unused)),
struct task_struct *child __attribute__((unused)))
{
return;
}
void __sched_process_exit(void *cb_data __attribute__((unused)),
struct task_struct *task __attribute__((unused)))
{
return;
}
void __sched_process_exec(void *cb_data __attribute__ ((unused)),
struct task_struct *task __attribute__((unused)),
pid_t old_pid __attribute__((unused)),
struct linux_binprm *bprm __attribute__((unused)))
{
return;
}
void __sys_enter(void *cb_data __attribute__ ((unused)),
struct pt_regs *regs __attribute__((unused)),
long id __attribute__((unused)))
{
return;
}
void __sys_exit(void *cb_data __attribute__ ((unused)),
struct pt_regs *regs __attribute__((unused)),
long ret __attribute__((unused)))
{
return;
}
void __autoconf_func(void)
{
struct task_work work;
(void) register_trace_sched_process_fork(__sched_process_fork, NULL);
(void) register_trace_sched_process_exit(__sched_process_exit, NULL);
(void) register_trace_sched_process_exec(__sched_process_exec, NULL);
(void) register_trace_sys_enter(__sys_enter, NULL);
(void) register_trace_sys_exit(__sys_exit, NULL);
init_task_work(&work, NULL, NULL);
}