summaryrefslogtreecommitdiffstats
path: root/arch/um/kernel/trap_user.c
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2005-09-03 15:57:12 -0700
committerLinus Torvalds <torvalds@evo.osdl.org>2005-09-05 00:06:19 -0700
commit96e59245e1abf3ea2e98c4b9ee2ebd975db653db (patch)
treebaf413905e87b039f83d81d24e8dcbd2dca06e49 /arch/um/kernel/trap_user.c
parent49f9ebc894ecdb985475060d051a571dc231cce7 (diff)
downloadop-kernel-dev-96e59245e1abf3ea2e98c4b9ee2ebd975db653db.zip
op-kernel-dev-96e59245e1abf3ea2e98c4b9ee2ebd975db653db.tar.gz
[PATCH] uml: remove debugging code from page fault path
This eliminates the segfault info ring buffer, which added a system call to each page fault, and which hadn't been useful for debugging in ages. Signed-off-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/kernel/trap_user.c')
-rw-r--r--arch/um/kernel/trap_user.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/arch/um/kernel/trap_user.c b/arch/um/kernel/trap_user.c
index f825a6e..e9ccd6b 100644
--- a/arch/um/kernel/trap_user.c
+++ b/arch/um/kernel/trap_user.c
@@ -40,35 +40,14 @@ void kill_child_dead(int pid)
} while(1);
}
-/* Unlocked - don't care if this is a bit off */
-int nsegfaults = 0;
-
-struct {
- unsigned long address;
- int is_write;
- int pid;
- unsigned long sp;
- int is_user;
-} segfault_record[1024];
-
void segv_handler(int sig, union uml_pt_regs *regs)
{
- int index, max;
struct faultinfo * fi = UPT_FAULTINFO(regs);
if(UPT_IS_USER(regs) && !SEGV_IS_FIXABLE(fi)){
bad_segv(*fi, UPT_IP(regs));
return;
}
- max = sizeof(segfault_record)/sizeof(segfault_record[0]);
- index = next_trap_index(max);
-
- nsegfaults++;
- segfault_record[index].address = FAULT_ADDRESS(*fi);
- segfault_record[index].pid = os_getpid();
- segfault_record[index].is_write = FAULT_WRITE(*fi);
- segfault_record[index].sp = UPT_SP(regs);
- segfault_record[index].is_user = UPT_IS_USER(regs);
segv(*fi, UPT_IP(regs), UPT_IS_USER(regs), regs);
}
OpenPOWER on IntegriCloud