ia64/xen-unstable

changeset 4183:cf77cd925ef3

bitkeeper revision 1.1248 (42386d77ZbpnLkZzlDMb6qSlQhdzdA)

Merge wyvis.research.intel-research.net:/home/irchomes/rneugeba/src/xeno/xen.bench
into wyvis.research.intel-research.net:/home/irchomes/rneugeba/src/xeno/xen.bench.shadow

Signed-off-by: michael.fetterman@cl.cam.ac.uk
author rneugeba@wyvis.research.intel-research.net
date Wed Mar 16 17:31:35 2005 +0000 (2005-03-16)
parents f3a1163f9d2b 0cf318b324fb
children 8f0c441d9e25
files linux-2.6.10-xen-sparse/arch/xen/i386/kernel/syscall_stats.c linux-2.6.10-xen-sparse/arch/xen/i386/mm/fault.c
line diff
     1.1 --- a/linux-2.6.10-xen-sparse/arch/xen/i386/kernel/syscall_stats.c	Wed Mar 16 17:30:37 2005 +0000
     1.2 +++ b/linux-2.6.10-xen-sparse/arch/xen/i386/kernel/syscall_stats.c	Wed Mar 16 17:31:35 2005 +0000
     1.3 @@ -19,12 +19,19 @@
     1.4  unsigned long syscall_stats[NR_syscalls];
     1.5  static unsigned char foobar[4];
     1.6  
     1.7 +unsigned long c_do_page_fault;
     1.8 +unsigned long c_minor_page_fault;
     1.9 +unsigned long c_major_page_fault;
    1.10 +
    1.11  /* a write just resests the counter */
    1.12  static ssize_t syscall_write(struct file *f, const  char *data,
    1.13                               size_t size, loff_t  *pos)
    1.14  {
    1.15      printk("resetting syscall stats\n");
    1.16      memset(&syscall_stats, 0, sizeof(syscall_stats));
    1.17 +    c_do_page_fault = 0;
    1.18 +    c_minor_page_fault = 0;
    1.19 +    c_major_page_fault = 0;
    1.20      return size;
    1.21  }
    1.22  
    1.23 @@ -36,6 +43,9 @@ static int show_syscall(struct seq_file 
    1.24          seq_printf(m, "%lu ", syscall_stats[i]);
    1.25      }
    1.26      seq_printf(m, "\n");
    1.27 +    seq_printf(m, "%lu %lu %lu\n", c_do_page_fault,
    1.28 +               c_minor_page_fault, c_major_page_fault);
    1.29 +    
    1.30      return 0;
    1.31  }
    1.32  
     2.1 --- a/linux-2.6.10-xen-sparse/arch/xen/i386/mm/fault.c	Wed Mar 16 17:30:37 2005 +0000
     2.2 +++ b/linux-2.6.10-xen-sparse/arch/xen/i386/mm/fault.c	Wed Mar 16 17:31:35 2005 +0000
     2.3 @@ -216,6 +216,11 @@ fastcall void do_invalid_op(struct pt_re
     2.4   *	bit 1 == 0 means read, 1 means write
     2.5   *	bit 2 == 0 means kernel, 1 means user-mode
     2.6   */
     2.7 +
     2.8 +extern unsigned long c_do_page_fault;
     2.9 +extern unsigned long c_minor_page_fault;
    2.10 +extern unsigned long c_major_page_fault;
    2.11 +
    2.12  fastcall void do_page_fault(struct pt_regs *regs, unsigned long error_code,
    2.13  			      unsigned long address)
    2.14  {
    2.15 @@ -226,6 +231,8 @@ fastcall void do_page_fault(struct pt_re
    2.16  	int write;
    2.17  	siginfo_t info;
    2.18  
    2.19 +    c_do_page_fault++;
    2.20 +
    2.21  	/* Set the "privileged fault" bit to something sane. */
    2.22  	error_code &= 3;
    2.23  	error_code |= (regs->xcs & 2) << 1;
    2.24 @@ -359,9 +366,11 @@ good_area:
    2.25  	switch (handle_mm_fault(mm, vma, address, write)) {
    2.26  		case VM_FAULT_MINOR:
    2.27  			tsk->min_flt++;
    2.28 +            c_minor_page_fault++;
    2.29  			break;
    2.30  		case VM_FAULT_MAJOR:
    2.31  			tsk->maj_flt++;
    2.32 +            c_major_page_fault++;
    2.33  			break;
    2.34  		case VM_FAULT_SIGBUS:
    2.35  			goto do_sigbus;