Skip to contentSkip to conversation

ltt for 2.6.10 : kernel/ events

PATCH In review Karim Yaghmour 1 participant 1 message Jan 14, 2005

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 3/8 ltt for 2.6.10 : kernel/ events

kernel/exit.c +5 -0
@@ -24,6 +24,7 @@
 #include <linux/profile.h>
 #include <linux/mount.h>
 #include <linux/proc_fs.h>
+#include <linux/ltt-events.h>
 #include <linux/mempolicy.h>
 #include <linux/syscalls.h>
 
@@ -811,6 +812,8 @@ fastcall NORET_TYPE void do_exit(long co
 		acct_process(code);
 	__exit_mm(tsk);
 
+	ltt_ev_process_exit(0, 0);
+
 	exit_sem(tsk);
 	__exit_files(tsk);
 	__exit_fs(tsk);
@@ -1316,6 +1319,8 @@ static long do_wait(pid_t pid, int optio
 	struct task_struct *tsk;
 	int flag, retval;
 
+	ltt_ev_process(LTT_EV_PROCESS_WAIT, pid, 0);
+
 	add_wait_queue(&current->wait_chldexit,&wait);
 repeat:
 	/*
kernel/fork.c +3 -0
@@ -39,6 +39,7 @@
 #include <linux/audit.h>
 #include <linux/profile.h>
 #include <linux/rmap.h>
+#include <linux/ltt-events.h>
 
 #include <asm/pgtable.h>
 #include <asm/pgalloc.h>
@@ -1159,6 +1160,8 @@ long do_fork(unsigned long clone_flags,
 			ptrace_notify ((trace << 8) | SIGTRAP);
 		}
 
+		ltt_ev_process(LTT_EV_PROCESS_FORK, p->pid, 0);
+
 		if (clone_flags & CLONE_VFORK) {
 			wait_for_completion(&vfork);
 			if (unlikely (current->ptrace & PT_TRACE_VFORK_DONE))
kernel/irq/handle.c +5 -0
@@ -11,6 +11,7 @@
 #include <linux/random.h>
 #include <linux/interrupt.h>
 #include <linux/kernel_stat.h>
+#include <linux/ltt-events.h>
 
 #include "internals.h"
 
@@ -91,6 +92,8 @@ fastcall int handle_IRQ_event(unsigned i
 {
 	int ret, retval = 0, status = 0;
 
+	ltt_ev_irq_entry(irq, !(user_mode(regs)));
+
 	if (!(action->flags & SA_INTERRUPT))
 		local_irq_enable();
 
@@ -106,6 +109,8 @@ fastcall int handle_IRQ_event(unsigned i
 		add_interrupt_randomness(irq);
 	local_irq_disable();
 
+	ltt_ev_irq_exit();
+
 	return retval;
 }
 
kernel/itimer.c +4 -0
@@ -11,6 +11,7 @@
 #include <linux/interrupt.h>
 #include <linux/syscalls.h>
 #include <linux/time.h>
+#include <linux/ltt-events.h>
 
 #include <asm/uaccess.h>
 
@@ -69,6 +70,8 @@ void it_real_fn(unsigned long __data)
 	struct task_struct * p = (struct task_struct *) __data;
 	unsigned long interval;
 
+	ltt_ev_timer(LTT_EV_TIMER_EXPIRED, 0, 0, 0);
+
 	send_group_sig_info(SIGALRM, SEND_SIG_PRIV, p);
 	interval = p->it_real_incr;
 	if (interval) {
@@ -88,6 +91,7 @@ int do_setitimer(int which, struct itime
 	j = timeval_to_jiffies(&value->it_value);
 	if (ovalue && (k = do_getitimer(which, ovalue)) < 0)
 		return k;
+	ltt_ev_timer(LTT_EV_TIMER_SETITIMER, which, i, j);
 	switch (which) {
 		case ITIMER_REAL:
 			del_timer_sync(&current->real_timer);
kernel/Makefile +1 -0
@@ -17,6 +17,7 @@ obj-$(CONFIG_MODULES) += module.o
 obj-$(CONFIG_KALLSYMS) += kallsyms.o
 obj-$(CONFIG_PM) += power/
 obj-$(CONFIG_BSD_PROCESS_ACCT) += acct.o
+obj-$(CONFIG_LTT) += ltt-core.o
 obj-$(CONFIG_COMPAT) += compat.o
 obj-$(CONFIG_IKCONFIG) += configs.o
 obj-$(CONFIG_IKCONFIG_PROC) += configs.o
kernel/sched.c +4 -0
@@ -44,6 +44,7 @@
 #include <linux/seq_file.h>
 #include <linux/syscalls.h>
 #include <linux/times.h>
+#include <linux/ltt-events.h>
 #include <asm/tlb.h>
 
 #include <asm/unistd.h>
@@ -317,6 +318,8 @@ static runqueue_t *task_rq_lock(task_t *
 {
 	struct runqueue *rq;
 
+	ltt_ev_process(LTT_EV_PROCESS_WAKEUP, p->pid, p->state);
+
 repeat_lock_task:
 	local_irq_save(*flags);
 	rq = task_rq(p);
@@ -2685,6 +2688,7 @@ switch_tasks:
 		++*switch_count;
 
 		prepare_arch_switch(rq, next);
+		ltt_ev_schedchange(prev, next);
 		prev = context_switch(rq, prev, next);
 		barrier();
 
kernel/signal.c +3 -0
@@ -22,6 +22,7 @@
 #include <linux/security.h>
 #include <linux/syscalls.h>
 #include <linux/ptrace.h>
+#include <linux/ltt-events.h>
 #include <asm/param.h>
 #include <asm/uaccess.h>
 #include <asm/unistd.h>
@@ -833,6 +834,8 @@ specific_send_sig_info(int sig, struct s
 	if (sig_ignored(t, sig))
 		goto out;
 
+	ltt_ev_process(LTT_EV_PROCESS_SIGNAL, sig, t->pid);
+
 	/* Support queueing exactly one non-rt signal, so that we
 	   can get more detailed information about the cause of
 	   the signal. */
kernel/softirq.c +8 -0
@@ -16,6 +16,7 @@
 #include <linux/cpu.h>
 #include <linux/kthread.h>
 #include <linux/rcupdate.h>
+#include <linux/ltt-events.h>
 
 #include <asm/irq.h>
 /*
@@ -92,6 +93,7 @@ restart:
 
 	do {
 		if (pending & 1) {
+			ltt_ev_soft_irq(LTT_EV_SOFT_IRQ_SOFT_IRQ, (h - softirq_vec));
 			h->action(h);
 			rcu_bh_qsctr_inc(cpu);
 		}
@@ -246,6 +248,9 @@ static void tasklet_action(struct softir
 			if (!atomic_read(&t->count)) {
 				if (!test_and_clear_bit(TASKLET_STATE_SCHED, &t->state))
 					BUG();
+
+				ltt_ev_soft_irq(LTT_EV_SOFT_IRQ_TASKLET_ACTION, (unsigned long) (t->func));
+
 				t->func(t->data);
 				tasklet_unlock(t);
 				continue;
@@ -279,6 +284,9 @@ static void tasklet_hi_action(struct sof
 			if (!atomic_read(&t->count)) {
 				if (!test_and_clear_bit(TASKLET_STATE_SCHED, &t->state))
 					BUG();
+
+				ltt_ev_soft_irq(LTT_EV_SOFT_IRQ_TASKLET_HI_ACTION, (unsigned long) (t->func));
+
 				t->func(t->data);
 				tasklet_unlock(t);
 				continue;
kernel/timer.c +4 -0
@@ -32,6 +32,7 @@
 #include <linux/jiffies.h>
 #include <linux/cpu.h>
 #include <linux/syscalls.h>
+#include <linux/ltt-events.h>
 
 #include <asm/uaccess.h>
 #include <asm/unistd.h>
@@ -923,6 +924,8 @@ static void run_timer_softirq(struct sof
 {
 	tvec_base_t *base = &__get_cpu_var(tvec_bases);
 
+	ltt_ev(LTT_EV_KERNEL_TIMER, NULL);
+
 	if (time_after_eq(jiffies, base->timer_jiffies))
 		__run_timers(base);
 }
@@ -1081,6 +1084,7 @@ asmlinkage long sys_getegid(void)
 
 static void process_timeout(unsigned long __data)
 {
+	ltt_ev_timer(LTT_EV_TIMER_EXPIRED, 0, 0, 0);
 	wake_up_process((task_t *)__data);
 }