public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
To: akpm@linux-foundation.org, Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org
Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Subject: [patch-early-RFC 05/10] LTTng instrumentation PPC
Date: Wed, 05 Dec 2007 21:56:55 -0500	[thread overview]
Message-ID: <20071206025946.819429839@polymtl.ca> (raw)
In-Reply-To: 20071206025650.451824066@polymtl.ca

[-- Attachment #1: lttng-instrumentation-ppc.patch --]
[-- Type: text/plain, Size: 3143 bytes --]

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
---
 arch/ppc/kernel/misc.S  |    2 +-
 arch/ppc/kernel/time.c  |    4 ++++
 arch/ppc/kernel/traps.c |    3 +++
 arch/ppc/mm/fault.c     |    3 +++
 4 files changed, 11 insertions(+), 1 deletion(-)

Index: linux-2.6-lttng/arch/ppc/kernel/misc.S
===================================================================
--- linux-2.6-lttng.orig/arch/ppc/kernel/misc.S	2007-11-13 09:25:23.000000000 -0500
+++ linux-2.6-lttng/arch/ppc/kernel/misc.S	2007-11-13 09:50:11.000000000 -0500
@@ -868,7 +868,7 @@ _GLOBAL(_get_SP)
  * Create a kernel thread
  *   kernel_thread(fn, arg, flags)
  */
-_GLOBAL(kernel_thread)
+_GLOBAL(original_kernel_thread)
 	stwu	r1,-16(r1)
 	stw	r30,8(r1)
 	stw	r31,12(r1)
Index: linux-2.6-lttng/arch/ppc/kernel/time.c
===================================================================
--- linux-2.6-lttng.orig/arch/ppc/kernel/time.c	2007-11-13 09:25:23.000000000 -0500
+++ linux-2.6-lttng/arch/ppc/kernel/time.c	2007-11-13 09:50:11.000000000 -0500
@@ -139,7 +139,10 @@ void timer_interrupt(struct pt_regs * re
 	if (atomic_read(&ppc_n_lost_interrupts) != 0)
 		do_IRQ(regs);
 
+	trace_mark(kernel_arch_trap_entry, "trap_id %ld ip #p%ld",
+		regs->trap, instruction_pointer(regs));
 	old_regs = set_irq_regs(regs);
+
 	irq_enter();
 
 	while ((next_dec = tb_ticks_per_jiffy - tb_delta(&jiffy_stamp)) <= 0) {
@@ -192,6 +195,7 @@ void timer_interrupt(struct pt_regs * re
 
 	irq_exit();
 	set_irq_regs(old_regs);
+	trace_mark(kernel_arch_trap_exit, MARK_NOARGS);
 }
 
 /*
Index: linux-2.6-lttng/arch/ppc/kernel/traps.c
===================================================================
--- linux-2.6-lttng.orig/arch/ppc/kernel/traps.c	2007-11-13 09:25:23.000000000 -0500
+++ linux-2.6-lttng/arch/ppc/kernel/traps.c	2007-11-13 09:50:11.000000000 -0500
@@ -108,11 +108,14 @@ void _exception(int signr, struct pt_reg
 		debugger(regs);
 		die("Exception in kernel mode", regs, signr);
 	}
+	trace_mark(kernel_arch_trap_entry, "trap_id %ld ip #p%ld", regs->trap,
+		instruction_pointer(regs));
 	info.si_signo = signr;
 	info.si_errno = 0;
 	info.si_code = code;
 	info.si_addr = (void __user *) addr;
 	force_sig_info(signr, &info, current);
+	trace_mark(kernel_arch_trap_exit, MARK_NOARGS);
 
 	/*
 	 * Init gets no signals that it doesn't have a handler for.
Index: linux-2.6-lttng/arch/ppc/mm/fault.c
===================================================================
--- linux-2.6-lttng.orig/arch/ppc/mm/fault.c	2007-11-13 09:25:23.000000000 -0500
+++ linux-2.6-lttng/arch/ppc/mm/fault.c	2007-11-13 09:50:11.000000000 -0500
@@ -250,7 +250,10 @@ good_area:
 	 * the fault.
 	 */
  survive:
+ 	trace_mark(kernel_arch_trap_entry, "trap_id %ld ip #p%ld",
+		regs->trap, instruction_pointer(regs));
 	fault = handle_mm_fault(mm, vma, address, is_write);
+	trace_mark(kernel_arch_trap_exit, MARK_NOARGS);
 	if (unlikely(fault & VM_FAULT_ERROR)) {
 		if (fault & VM_FAULT_OOM)
 			goto out_of_memory;

-- 
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68

  parent reply	other threads:[~2007-12-06  3:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-06  2:56 [patch-early-RFC 00/10] LTTng architecture dependent instrumentation Mathieu Desnoyers
2007-12-06  2:56 ` [patch-early-RFC 01/10] LTTng - ARM instrumentation Mathieu Desnoyers
2007-12-06  2:56 ` [patch-early-RFC 02/10] LTTng - x86_32 instrumentation Mathieu Desnoyers
2007-12-06  2:56 ` [patch-early-RFC 03/10] LTTng - MIPS instrumentation Mathieu Desnoyers
2007-12-06  2:56 ` [patch-early-RFC 04/10] LTTng instrumentation Powerpc Mathieu Desnoyers
2007-12-06  2:56 ` Mathieu Desnoyers [this message]
2007-12-06  2:56 ` [patch-early-RFC 06/10] LTTng - instrumentation SH Mathieu Desnoyers
2007-12-06  2:56 ` [patch-early-RFC 07/10] LTTng instrumentation SH64 Mathieu Desnoyers
2007-12-06  2:56 ` [patch-early-RFC 08/10] LTTng Sparc instrumentation Mathieu Desnoyers
2007-12-06  2:56 ` [patch-early-RFC 09/10] LTTng - x86_64 instrumentation Mathieu Desnoyers
2007-12-06  2:57 ` [patch-early-RFC 10/10] LTTng - s390 instrumentation Mathieu Desnoyers
2007-12-06 10:11 ` [patch-early-RFC 00/10] LTTng architecture dependent instrumentation Ingo Molnar
2007-12-06 14:19   ` Mathieu Desnoyers
2007-12-08 19:05   ` Mathieu Desnoyers
2007-12-10  0:28     ` Mathieu Desnoyers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071206025946.819429839@polymtl.ca \
    --to=mathieu.desnoyers@polymtl.ca \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox