|
Packit |
577717 |
--- linux-2.6.5-7.276.perfctr26/CREDITS.~1~ 2006-07-24 19:32:29.000000000 +0200
|
|
Packit |
577717 |
+++ linux-2.6.5-7.276.perfctr26/CREDITS 2008-06-22 22:40:33.000000000 +0200
|
|
Packit |
577717 |
@@ -2519,9 +2519,10 @@ S: Ottawa, Ontario
|
|
Packit |
577717 |
S: Canada K2P 0X8
|
|
Packit |
577717 |
|
|
Packit |
577717 |
N: Mikael Pettersson
|
|
Packit |
577717 |
-E: mikpe@csd.uu.se
|
|
Packit |
577717 |
-W: http://www.csd.uu.se/~mikpe/
|
|
Packit |
577717 |
+E: mikpe@it.uu.se
|
|
Packit |
577717 |
+W: http://user.it.uu.se/~mikpe/
|
|
Packit |
577717 |
D: Miscellaneous fixes
|
|
Packit |
577717 |
+D: Performance-monitoring counters driver
|
|
Packit |
577717 |
|
|
Packit |
577717 |
N: Reed H. Petty
|
|
Packit |
577717 |
E: rhp@draper.net
|
|
Packit |
577717 |
--- linux-2.6.5-7.276.perfctr26/Documentation/ioctl-number.txt.~1~ 2004-04-04 05:38:18.000000000 +0200
|
|
Packit |
577717 |
+++ linux-2.6.5-7.276.perfctr26/Documentation/ioctl-number.txt 2008-06-22 22:40:27.000000000 +0200
|
|
Packit |
577717 |
@@ -187,5 +187,7 @@ Code Seq# Include File Comments
|
|
Packit |
577717 |
0xB1 00-1F PPPoX <mailto:mostrows@styx.uwaterloo.ca>
|
|
Packit |
577717 |
0xCB 00-1F CBM serial IEC bus in development:
|
|
Packit |
577717 |
<mailto:michael.klein@puffin.lb.shuttle.de>
|
|
Packit |
577717 |
+0xD0 all performance counters see drivers/perfctr/
|
|
Packit |
577717 |
+ <mailto:mikpe@it.uu.se>
|
|
Packit |
577717 |
0xDD 00-3F ZFCP device driver see drivers/s390/scsi/
|
|
Packit |
577717 |
<mailto:aherrman@de.ibm.com>
|
|
Packit |
577717 |
--- linux-2.6.5-7.276.perfctr26/MAINTAINERS.~1~ 2006-07-24 19:32:43.000000000 +0200
|
|
Packit |
577717 |
+++ linux-2.6.5-7.276.perfctr26/MAINTAINERS 2008-06-22 22:40:33.000000000 +0200
|
|
Packit |
577717 |
@@ -1613,6 +1613,12 @@ M: george@mvista.com
|
|
Packit |
577717 |
L: linux-net@vger.kernel.org
|
|
Packit |
577717 |
S: Supported
|
|
Packit |
577717 |
|
|
Packit |
577717 |
+PERFORMANCE-MONITORING COUNTERS DRIVER
|
|
Packit |
577717 |
+P: Mikael Pettersson
|
|
Packit |
577717 |
+M: mikpe@it.uu.se
|
|
Packit |
577717 |
+W: http://user.it.uu.se/~mikpe/linux/perfctr/
|
|
Packit |
577717 |
+S: Maintained
|
|
Packit |
577717 |
+
|
|
Packit |
577717 |
PNP SUPPORT
|
|
Packit |
577717 |
P: Adam Belay
|
|
Packit |
577717 |
M: ambx1@neo.rr.com
|
|
Packit |
577717 |
--- linux-2.6.5-7.276.perfctr26/arch/i386/Kconfig.~1~ 2006-07-24 19:32:22.000000000 +0200
|
|
Packit |
577717 |
+++ linux-2.6.5-7.276.perfctr26/arch/i386/Kconfig 2008-06-22 22:40:27.000000000 +0200
|
|
Packit |
577717 |
@@ -857,6 +857,8 @@ config REGPARM
|
|
Packit |
577717 |
generate incorrect output with certain kernel constructs when
|
|
Packit |
577717 |
-mregparm=3 is used.
|
|
Packit |
577717 |
|
|
Packit |
577717 |
+source "drivers/perfctr/Kconfig"
|
|
Packit |
577717 |
+
|
|
Packit |
577717 |
endmenu
|
|
Packit |
577717 |
|
|
Packit |
577717 |
menu "Special options"
|
|
Packit |
577717 |
--- linux-2.6.5-7.276.perfctr26/arch/i386/kernel/entry.S.~1~ 2006-07-24 19:32:29.000000000 +0200
|
|
Packit |
577717 |
+++ linux-2.6.5-7.276.perfctr26/arch/i386/kernel/entry.S 2008-06-22 22:40:27.000000000 +0200
|
|
Packit |
577717 |
@@ -444,6 +444,16 @@ ENTRY(name) \
|
|
Packit |
577717 |
/* The include is where all of the SMP etc. interrupts come from */
|
|
Packit |
577717 |
#include "entry_arch.h"
|
|
Packit |
577717 |
|
|
Packit |
577717 |
+#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_KPERFCTR)
|
|
Packit |
577717 |
+ENTRY(perfctr_interrupt)
|
|
Packit |
577717 |
+ pushl $LOCAL_PERFCTR_VECTOR-256
|
|
Packit |
577717 |
+ SAVE_ALL
|
|
Packit |
577717 |
+ pushl %esp
|
|
Packit |
577717 |
+ call smp_perfctr_interrupt
|
|
Packit |
577717 |
+ addl $4, %esp
|
|
Packit |
577717 |
+ jmp ret_from_intr
|
|
Packit |
577717 |
+#endif
|
|
Packit |
577717 |
+
|
|
Packit |
577717 |
ENTRY(divide_error)
|
|
Packit |
577717 |
pushl $0 # no error code
|
|
Packit |
577717 |
pushl $do_divide_error
|
|
Packit |
577717 |
--- linux-2.6.5-7.276.perfctr26/arch/i386/kernel/i8259.c.~1~ 2006-07-24 19:32:08.000000000 +0200
|
|
Packit |
577717 |
+++ linux-2.6.5-7.276.perfctr26/arch/i386/kernel/i8259.c 2008-06-22 22:40:27.000000000 +0200
|
|
Packit |
577717 |
@@ -23,6 +23,7 @@
|
|
Packit |
577717 |
#include <asm/apic.h>
|
|
Packit |
577717 |
#include <asm/arch_hooks.h>
|
|
Packit |
577717 |
#include <asm/i8259.h>
|
|
Packit |
577717 |
+#include <asm/perfctr.h>
|
|
Packit |
577717 |
|
|
Packit |
577717 |
#include <linux/irq.h>
|
|
Packit |
577717 |
|
|
Packit |
577717 |
@@ -436,6 +437,8 @@ void __init init_IRQ(void)
|
|
Packit |
577717 |
*/
|
|
Packit |
577717 |
intr_init_hook();
|
|
Packit |
577717 |
|
|
Packit |
577717 |
+ perfctr_vector_init();
|
|
Packit |
577717 |
+
|
|
Packit |
577717 |
/*
|
|
Packit |
577717 |
* Set the clock to HZ Hz, we already have a valid
|
|
Packit |
577717 |
* vector now:
|
|
Packit |
577717 |
--- linux-2.6.5-7.276.perfctr26/arch/i386/kernel/process.c.~1~ 2006-07-24 19:32:43.000000000 +0200
|
|
Packit |
577717 |
+++ linux-2.6.5-7.276.perfctr26/arch/i386/kernel/process.c 2008-06-22 22:40:27.000000000 +0200
|
|
Packit |
577717 |
@@ -32,6 +32,7 @@
|
|
Packit |
577717 |
#include <linux/delay.h>
|
|
Packit |
577717 |
#include <linux/reboot.h>
|
|
Packit |
577717 |
#include <linux/init.h>
|
|
Packit |
577717 |
+#include <linux/perfctr.h>
|
|
Packit |
577717 |
#include <linux/mc146818rtc.h>
|
|
Packit |
577717 |
#include <linux/module.h>
|
|
Packit |
577717 |
#include <linux/kallsyms.h>
|
|
Packit |
577717 |
@@ -306,6 +307,7 @@ void exit_thread(void)
|
|
Packit |
577717 |
tss->io_bitmap_base = INVALID_IO_BITMAP_OFFSET;
|
|
Packit |
577717 |
put_cpu();
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
+ perfctr_exit_thread(&tsk->thread);
|
|
Packit |
577717 |
if (tsk->thread.debugreg[7])
|
|
Packit |
577717 |
dr_dec_use_count(tsk->thread.debugreg[7]);
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
@@ -372,6 +374,8 @@ int copy_thread(int nr, unsigned long cl
|
|
Packit |
577717 |
savesegment(fs,p->thread.fs);
|
|
Packit |
577717 |
savesegment(gs,p->thread.gs);
|
|
Packit |
577717 |
|
|
Packit |
577717 |
+ perfctr_copy_task(p, regs);
|
|
Packit |
577717 |
+
|
|
Packit |
577717 |
tsk = current;
|
|
Packit |
577717 |
if (unlikely(NULL != tsk->thread.io_bitmap_ptr)) {
|
|
Packit |
577717 |
p->thread.io_bitmap_ptr = kmalloc(IO_BITMAP_BYTES, GFP_KERNEL);
|
|
Packit |
577717 |
@@ -600,6 +604,9 @@ struct task_struct fastcall * __switch_t
|
|
Packit |
577717 |
*/
|
|
Packit |
577717 |
tss->io_bitmap_base = INVALID_IO_BITMAP_OFFSET;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
+
|
|
Packit |
577717 |
+ perfctr_resume_thread(next);
|
|
Packit |
577717 |
+
|
|
Packit |
577717 |
return prev_p;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
--- linux-2.6.5-7.276.perfctr26/arch/ppc/Kconfig.~1~ 2006-07-24 19:32:22.000000000 +0200
|
|
Packit |
577717 |
+++ linux-2.6.5-7.276.perfctr26/arch/ppc/Kconfig 2008-06-22 22:40:27.000000000 +0200
|
|
Packit |
577717 |
@@ -214,6 +214,8 @@ config NOT_COHERENT_CACHE
|
|
Packit |
577717 |
depends on 4xx || 8xx
|
|
Packit |
577717 |
default y
|
|
Packit |
577717 |
|
|
Packit |
577717 |
+source "drivers/perfctr/Kconfig"
|
|
Packit |
577717 |
+
|
|
Packit |
577717 |
endmenu
|
|
Packit |
577717 |
|
|
Packit |
577717 |
menu "Platform options"
|
|
Packit |
577717 |
--- linux-2.6.5-7.276.perfctr26/arch/ppc/kernel/head.S.~1~ 2006-07-24 19:32:03.000000000 +0200
|
|
Packit |
577717 |
+++ linux-2.6.5-7.276.perfctr26/arch/ppc/kernel/head.S 2008-06-22 22:40:27.000000000 +0200
|
|
Packit |
577717 |
@@ -502,7 +502,11 @@ SystemCall:
|
|
Packit |
577717 |
Trap_0f:
|
|
Packit |
577717 |
EXCEPTION_PROLOG
|
|
Packit |
577717 |
addi r3,r1,STACK_FRAME_OVERHEAD
|
|
Packit |
577717 |
+#ifdef CONFIG_PERFCTR_INTERRUPT_SUPPORT
|
|
Packit |
577717 |
+ EXC_XFER_EE(0xf00, do_perfctr_interrupt)
|
|
Packit |
577717 |
+#else
|
|
Packit |
577717 |
EXC_XFER_EE(0xf00, UnknownException)
|
|
Packit |
577717 |
+#endif
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/*
|
|
Packit |
577717 |
* Handle TLB miss for instruction on 603/603e.
|
|
Packit |
577717 |
--- linux-2.6.5-7.276.perfctr26/arch/ppc/kernel/process.c.~1~ 2006-07-24 19:32:29.000000000 +0200
|
|
Packit |
577717 |
+++ linux-2.6.5-7.276.perfctr26/arch/ppc/kernel/process.c 2008-06-22 22:40:27.000000000 +0200
|
|
Packit |
577717 |
@@ -36,6 +36,7 @@
|
|
Packit |
577717 |
#include <linux/init_task.h>
|
|
Packit |
577717 |
#include <linux/module.h>
|
|
Packit |
577717 |
#include <linux/kallsyms.h>
|
|
Packit |
577717 |
+#include <linux/perfctr.h>
|
|
Packit |
577717 |
#include <linux/mqueue.h>
|
|
Packit |
577717 |
|
|
Packit |
577717 |
#include <asm/pgtable.h>
|
|
Packit |
577717 |
@@ -255,7 +256,9 @@ struct task_struct *__switch_to(struct t
|
|
Packit |
577717 |
new->thread.regs->msr |= MSR_VEC;
|
|
Packit |
577717 |
new_thread = &new->thread;
|
|
Packit |
577717 |
old_thread = ¤t->thread;
|
|
Packit |
577717 |
+ perfctr_suspend_thread(&prev->thread);
|
|
Packit |
577717 |
last = _switch(old_thread, new_thread);
|
|
Packit |
577717 |
+ perfctr_resume_thread(¤t->thread);
|
|
Packit |
577717 |
local_irq_restore(s);
|
|
Packit |
577717 |
return last;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
@@ -314,6 +317,7 @@ void exit_thread(void)
|
|
Packit |
577717 |
last_task_used_math = NULL;
|
|
Packit |
577717 |
if (last_task_used_altivec == current)
|
|
Packit |
577717 |
last_task_used_altivec = NULL;
|
|
Packit |
577717 |
+ perfctr_exit_thread(¤t->thread);
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
void flush_thread(void)
|
|
Packit |
577717 |
@@ -400,6 +404,8 @@ copy_thread(int nr, unsigned long clone_
|
|
Packit |
577717 |
|
|
Packit |
577717 |
p->thread.last_syscall = -1;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
+ perfctr_copy_task(p, regs);
|
|
Packit |
577717 |
+
|
|
Packit |
577717 |
return 0;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
--- linux-2.6.5-7.276.perfctr26/arch/x86_64/Kconfig.~1~ 2006-07-24 19:32:43.000000000 +0200
|
|
Packit |
577717 |
+++ linux-2.6.5-7.276.perfctr26/arch/x86_64/Kconfig 2008-06-22 22:40:27.000000000 +0200
|
|
Packit |
577717 |
@@ -332,6 +332,8 @@ config X86_MCE
|
|
Packit |
577717 |
bool
|
|
Packit |
577717 |
default y
|
|
Packit |
577717 |
|
|
Packit |
577717 |
+source "drivers/perfctr/Kconfig"
|
|
Packit |
577717 |
+
|
|
Packit |
577717 |
endmenu
|
|
Packit |
577717 |
|
|
Packit |
577717 |
|
|
Packit |
577717 |
--- linux-2.6.5-7.276.perfctr26/arch/x86_64/kernel/entry.S.~1~ 2006-07-24 19:32:47.000000000 +0200
|
|
Packit |
577717 |
+++ linux-2.6.5-7.276.perfctr26/arch/x86_64/kernel/entry.S 2008-06-22 22:40:27.000000000 +0200
|
|
Packit |
577717 |
@@ -545,6 +545,11 @@ ENTRY(spurious_interrupt)
|
|
Packit |
577717 |
apicinterrupt SPURIOUS_APIC_VECTOR,smp_spurious_interrupt
|
|
Packit |
577717 |
#endif
|
|
Packit |
577717 |
|
|
Packit |
577717 |
+#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_KPERFCTR)
|
|
Packit |
577717 |
+ENTRY(perfctr_interrupt)
|
|
Packit |
577717 |
+ apicinterrupt LOCAL_PERFCTR_VECTOR,smp_perfctr_interrupt
|
|
Packit |
577717 |
+#endif
|
|
Packit |
577717 |
+
|
|
Packit |
577717 |
/*
|
|
Packit |
577717 |
* Exception entry points.
|
|
Packit |
577717 |
*/
|
|
Packit |
577717 |
--- linux-2.6.5-7.276.perfctr26/arch/x86_64/kernel/i8259.c.~1~ 2006-07-24 19:32:47.000000000 +0200
|
|
Packit |
577717 |
+++ linux-2.6.5-7.276.perfctr26/arch/x86_64/kernel/i8259.c 2008-06-22 22:40:27.000000000 +0200
|
|
Packit |
577717 |
@@ -23,6 +23,7 @@
|
|
Packit |
577717 |
#include <asm/delay.h>
|
|
Packit |
577717 |
#include <asm/desc.h>
|
|
Packit |
577717 |
#include <asm/apic.h>
|
|
Packit |
577717 |
+#include <asm/perfctr.h>
|
|
Packit |
577717 |
|
|
Packit |
577717 |
#include <linux/irq.h>
|
|
Packit |
577717 |
|
|
Packit |
577717 |
@@ -484,6 +485,8 @@ void __init init_IRQ(void)
|
|
Packit |
577717 |
set_intr_gate(ERROR_APIC_VECTOR, error_interrupt);
|
|
Packit |
577717 |
#endif
|
|
Packit |
577717 |
|
|
Packit |
577717 |
+ perfctr_vector_init();
|
|
Packit |
577717 |
+
|
|
Packit |
577717 |
/*
|
|
Packit |
577717 |
* Set the clock to HZ Hz, we already have a valid
|
|
Packit |
577717 |
* vector now:
|
|
Packit |
577717 |
--- linux-2.6.5-7.276.perfctr26/arch/x86_64/kernel/process.c.~1~ 2006-07-24 19:32:47.000000000 +0200
|
|
Packit |
577717 |
+++ linux-2.6.5-7.276.perfctr26/arch/x86_64/kernel/process.c 2008-06-22 22:40:27.000000000 +0200
|
|
Packit |
577717 |
@@ -32,6 +32,7 @@
|
|
Packit |
577717 |
#include <linux/delay.h>
|
|
Packit |
577717 |
#include <linux/irq.h>
|
|
Packit |
577717 |
#include <linux/ptrace.h>
|
|
Packit |
577717 |
+#include <linux/perfctr.h>
|
|
Packit |
577717 |
#include <linux/version.h>
|
|
Packit |
577717 |
|
|
Packit |
577717 |
#include <asm/uaccess.h>
|
|
Packit |
577717 |
@@ -259,6 +260,7 @@ void exit_thread(void)
|
|
Packit |
577717 |
(init_tss + smp_processor_id())->io_bitmap_base =
|
|
Packit |
577717 |
INVALID_IO_BITMAP_OFFSET;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
+ perfctr_exit_thread(&me->thread);
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
void flush_thread(void)
|
|
Packit |
577717 |
@@ -362,6 +364,8 @@ int copy_thread(int nr, unsigned long cl
|
|
Packit |
577717 |
asm("mov %%es,%0" : "=m" (p->thread.es));
|
|
Packit |
577717 |
asm("mov %%ds,%0" : "=m" (p->thread.ds));
|
|
Packit |
577717 |
|
|
Packit |
577717 |
+ perfctr_copy_task(p, regs);
|
|
Packit |
577717 |
+
|
|
Packit |
577717 |
if (unlikely(me->thread.io_bitmap_ptr != NULL)) {
|
|
Packit |
577717 |
p->thread.io_bitmap_ptr = kmalloc(IO_BITMAP_BYTES, GFP_KERNEL);
|
|
Packit |
577717 |
if (!p->thread.io_bitmap_ptr)
|
|
Packit |
577717 |
@@ -514,6 +518,8 @@ struct task_struct *__switch_to(struct t
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
+ perfctr_resume_thread(next);
|
|
Packit |
577717 |
+
|
|
Packit |
577717 |
return prev_p;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
--- linux-2.6.5-7.276.perfctr26/drivers/Makefile.~1~ 2006-07-24 19:32:47.000000000 +0200
|
|
Packit |
577717 |
+++ linux-2.6.5-7.276.perfctr26/drivers/Makefile 2008-06-22 22:40:27.000000000 +0200
|
|
Packit |
577717 |
@@ -51,6 +51,7 @@ obj-$(CONFIG_ISDN) += isdn/
|
|
Packit |
577717 |
obj-$(CONFIG_MCA) += mca/
|
|
Packit |
577717 |
obj-$(CONFIG_EISA) += eisa/
|
|
Packit |
577717 |
obj-$(CONFIG_CPU_FREQ) += cpufreq/
|
|
Packit |
577717 |
+obj-$(CONFIG_KPERFCTR) += perfctr/
|
|
Packit |
577717 |
obj-$(CONFIG_INFINIBAND) += infiniband/
|
|
Packit |
577717 |
obj-$(CONFIG_BLK_DEV_SGIIOC4) += sn/
|
|
Packit |
577717 |
obj-y += firmware/
|
|
Packit |
577717 |
--- linux-2.6.5-7.276.perfctr26/fs/exec.c.~1~ 2006-07-24 19:32:47.000000000 +0200
|
|
Packit |
577717 |
+++ linux-2.6.5-7.276.perfctr26/fs/exec.c 2008-06-22 22:40:33.000000000 +0200
|
|
Packit |
577717 |
@@ -47,6 +47,7 @@
|
|
Packit |
577717 |
#include <linux/security.h>
|
|
Packit |
577717 |
#include <linux/syscalls.h>
|
|
Packit |
577717 |
#include <linux/objrmap.h>
|
|
Packit |
577717 |
+#include <linux/perfctr.h>
|
|
Packit |
577717 |
#include <linux/ckrm.h>
|
|
Packit |
577717 |
#include <linux/audit.h>
|
|
Packit |
577717 |
#include <linux/trigevent_hooks.h>
|
|
Packit |
577717 |
@@ -889,6 +890,7 @@ int flush_old_exec(struct linux_binprm *
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
current->comm[i] = '\0';
|
|
Packit |
577717 |
|
|
Packit |
577717 |
+ perfctr_flush_thread(¤t->thread);
|
|
Packit |
577717 |
flush_thread();
|
|
Packit |
577717 |
|
|
Packit |
577717 |
if (bprm->e_uid != current->euid || bprm->e_gid != current->egid ||
|
|
Packit |
577717 |
--- linux-2.6.5-7.276.perfctr26/include/asm-i386/apic.h.~1~ 2006-07-24 19:32:43.000000000 +0200
|
|
Packit |
577717 |
+++ linux-2.6.5-7.276.perfctr26/include/asm-i386/apic.h 2008-06-22 22:40:27.000000000 +0200
|
|
Packit |
577717 |
@@ -101,6 +101,8 @@ extern unsigned int nmi_watchdog;
|
|
Packit |
577717 |
#define NMI_LOCAL_APIC 2
|
|
Packit |
577717 |
#define NMI_INVALID 3
|
|
Packit |
577717 |
|
|
Packit |
577717 |
+extern unsigned int nmi_perfctr_msr;
|
|
Packit |
577717 |
+
|
|
Packit |
577717 |
#endif /* CONFIG_X86_LOCAL_APIC */
|
|
Packit |
577717 |
|
|
Packit |
577717 |
#endif /* __ASM_APIC_H */
|
|
Packit |
577717 |
--- linux-2.6.5-7.276.perfctr26/include/asm-i386/mach-default/irq_vectors.h.~1~ 2006-07-24 19:32:43.000000000 +0200
|
|
Packit |
577717 |
+++ linux-2.6.5-7.276.perfctr26/include/asm-i386/mach-default/irq_vectors.h 2008-06-22 22:40:27.000000000 +0200
|
|
Packit |
577717 |
@@ -55,14 +55,15 @@
|
|
Packit |
577717 |
* sources per level' errata.
|
|
Packit |
577717 |
*/
|
|
Packit |
577717 |
#define LOCAL_TIMER_VECTOR 0xef
|
|
Packit |
577717 |
+#define LOCAL_PERFCTR_VECTOR 0xee
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/*
|
|
Packit |
577717 |
- * First APIC vector available to drivers: (vectors 0x30-0xee)
|
|
Packit |
577717 |
+ * First APIC vector available to drivers: (vectors 0x30-0xed)
|
|
Packit |
577717 |
* we start at 0x31 to spread out vectors evenly between priority
|
|
Packit |
577717 |
* levels. (0x80 is the syscall vector)
|
|
Packit |
577717 |
*/
|
|
Packit |
577717 |
#define FIRST_DEVICE_VECTOR 0x31
|
|
Packit |
577717 |
-#define FIRST_SYSTEM_VECTOR 0xef
|
|
Packit |
577717 |
+#define FIRST_SYSTEM_VECTOR 0xee
|
|
Packit |
577717 |
|
|
Packit |
577717 |
#define TIMER_IRQ 0
|
|
Packit |
577717 |
|
|
Packit |
577717 |
--- linux-2.6.5-7.276.perfctr26/include/asm-i386/mach-pc9800/irq_vectors.h.~1~ 2004-04-04 05:36:16.000000000 +0200
|
|
Packit |
577717 |
+++ linux-2.6.5-7.276.perfctr26/include/asm-i386/mach-pc9800/irq_vectors.h 2008-06-22 22:40:27.000000000 +0200
|
|
Packit |
577717 |
@@ -59,14 +59,15 @@
|
|
Packit |
577717 |
* sources per level' errata.
|
|
Packit |
577717 |
*/
|
|
Packit |
577717 |
#define LOCAL_TIMER_VECTOR 0xef
|
|
Packit |
577717 |
+#define LOCAL_PERFCTR_VECTOR 0xee
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/*
|
|
Packit |
577717 |
- * First APIC vector available to drivers: (vectors 0x30-0xee)
|
|
Packit |
577717 |
+ * First APIC vector available to drivers: (vectors 0x30-0xed)
|
|
Packit |
577717 |
* we start at 0x31 to spread out vectors evenly between priority
|
|
Packit |
577717 |
* levels. (0x80 is the syscall vector)
|
|
Packit |
577717 |
*/
|
|
Packit |
577717 |
#define FIRST_DEVICE_VECTOR 0x31
|
|
Packit |
577717 |
-#define FIRST_SYSTEM_VECTOR 0xef
|
|
Packit |
577717 |
+#define FIRST_SYSTEM_VECTOR 0xee
|
|
Packit |
577717 |
|
|
Packit |
577717 |
#define TIMER_IRQ 0
|
|
Packit |
577717 |
|
|
Packit |
577717 |
--- linux-2.6.5-7.276.perfctr26/include/asm-i386/mach-visws/irq_vectors.h.~1~ 2004-04-04 05:36:18.000000000 +0200
|
|
Packit |
577717 |
+++ linux-2.6.5-7.276.perfctr26/include/asm-i386/mach-visws/irq_vectors.h 2008-06-22 22:40:27.000000000 +0200
|
|
Packit |
577717 |
@@ -35,14 +35,15 @@
|
|
Packit |
577717 |
* sources per level' errata.
|
|
Packit |
577717 |
*/
|
|
Packit |
577717 |
#define LOCAL_TIMER_VECTOR 0xef
|
|
Packit |
577717 |
+#define LOCAL_PERFCTR_VECTOR 0xee
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/*
|
|
Packit |
577717 |
- * First APIC vector available to drivers: (vectors 0x30-0xee)
|
|
Packit |
577717 |
+ * First APIC vector available to drivers: (vectors 0x30-0xed)
|
|
Packit |
577717 |
* we start at 0x31 to spread out vectors evenly between priority
|
|
Packit |
577717 |
* levels. (0x80 is the syscall vector)
|
|
Packit |
577717 |
*/
|
|
Packit |
577717 |
#define FIRST_DEVICE_VECTOR 0x31
|
|
Packit |
577717 |
-#define FIRST_SYSTEM_VECTOR 0xef
|
|
Packit |
577717 |
+#define FIRST_SYSTEM_VECTOR 0xee
|
|
Packit |
577717 |
|
|
Packit |
577717 |
#define TIMER_IRQ 0
|
|
Packit |
577717 |
|
|
Packit |
577717 |
--- linux-2.6.5-7.276.perfctr26/include/asm-i386/processor.h.~1~ 2006-07-24 19:32:35.000000000 +0200
|
|
Packit |
577717 |
+++ linux-2.6.5-7.276.perfctr26/include/asm-i386/processor.h 2008-06-22 22:40:27.000000000 +0200
|
|
Packit |
577717 |
@@ -428,6 +428,8 @@ struct thread_struct {
|
|
Packit |
577717 |
unsigned int saved_fs, saved_gs;
|
|
Packit |
577717 |
/* IO permissions */
|
|
Packit |
577717 |
unsigned long *io_bitmap_ptr;
|
|
Packit |
577717 |
+/* performance counters */
|
|
Packit |
577717 |
+ struct vperfctr *perfctr;
|
|
Packit |
577717 |
};
|
|
Packit |
577717 |
|
|
Packit |
577717 |
#define INIT_THREAD { \
|
|
Packit |
577717 |
--- linux-2.6.5-7.276.perfctr26/include/asm-i386/system.h.~1~ 2006-07-24 19:32:43.000000000 +0200
|
|
Packit |
577717 |
+++ linux-2.6.5-7.276.perfctr26/include/asm-i386/system.h 2008-06-22 22:40:27.000000000 +0200
|
|
Packit |
577717 |
@@ -14,6 +14,7 @@ extern struct task_struct * FASTCALL(__s
|
|
Packit |
577717 |
|
|
Packit |
577717 |
#define switch_to(prev,next,last) do { \
|
|
Packit |
577717 |
unsigned long esi,edi; \
|
|
Packit |
577717 |
+ perfctr_suspend_thread(&(prev)->thread); \
|
|
Packit |
577717 |
asm volatile("pushfl\n\t" \
|
|
Packit |
577717 |
"pushl %%ebp\n\t" \
|
|
Packit |
577717 |
"movl %%esp,%0\n\t" /* save ESP */ \
|
|
Packit |
577717 |
--- linux-2.6.5-7.276.perfctr26/include/asm-ppc/processor.h.~1~ 2006-07-24 19:32:11.000000000 +0200
|
|
Packit |
577717 |
+++ linux-2.6.5-7.276.perfctr26/include/asm-ppc/processor.h 2008-06-22 22:40:27.000000000 +0200
|
|
Packit |
577717 |
@@ -119,6 +119,9 @@ struct thread_struct {
|
|
Packit |
577717 |
unsigned long vrsave;
|
|
Packit |
577717 |
int used_vr; /* set if process has used altivec */
|
|
Packit |
577717 |
#endif /* CONFIG_ALTIVEC */
|
|
Packit |
577717 |
+#ifdef CONFIG_PERFCTR_VIRTUAL
|
|
Packit |
577717 |
+ struct vperfctr *perfctr; /* performance counters */
|
|
Packit |
577717 |
+#endif
|
|
Packit |
577717 |
};
|
|
Packit |
577717 |
|
|
Packit |
577717 |
#define ARCH_MIN_TASKALIGN 16
|
|
Packit |
577717 |
--- linux-2.6.5-7.276.perfctr26/include/asm-x86_64/apic.h.~1~ 2006-07-24 19:32:43.000000000 +0200
|
|
Packit |
577717 |
+++ linux-2.6.5-7.276.perfctr26/include/asm-x86_64/apic.h 2008-06-22 22:40:27.000000000 +0200
|
|
Packit |
577717 |
@@ -97,6 +97,8 @@ extern unsigned int nmi_watchdog;
|
|
Packit |
577717 |
#define NMI_LOCAL_APIC 2
|
|
Packit |
577717 |
#define NMI_INVALID 3
|
|
Packit |
577717 |
|
|
Packit |
577717 |
+extern unsigned int nmi_perfctr_msr;
|
|
Packit |
577717 |
+
|
|
Packit |
577717 |
#endif /* CONFIG_X86_LOCAL_APIC */
|
|
Packit |
577717 |
|
|
Packit |
577717 |
#define esr_disable 0
|
|
Packit |
577717 |
--- linux-2.6.5-7.276.perfctr26/include/asm-x86_64/hw_irq.h.~1~ 2006-07-24 19:32:43.000000000 +0200
|
|
Packit |
577717 |
+++ linux-2.6.5-7.276.perfctr26/include/asm-x86_64/hw_irq.h 2008-06-22 22:40:27.000000000 +0200
|
|
Packit |
577717 |
@@ -65,14 +65,15 @@ struct hw_interrupt_type;
|
|
Packit |
577717 |
* sources per level' errata.
|
|
Packit |
577717 |
*/
|
|
Packit |
577717 |
#define LOCAL_TIMER_VECTOR 0xef
|
|
Packit |
577717 |
+#define LOCAL_PERFCTR_VECTOR 0xee
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/*
|
|
Packit |
577717 |
- * First APIC vector available to drivers: (vectors 0x30-0xee)
|
|
Packit |
577717 |
+ * First APIC vector available to drivers: (vectors 0x30-0xed)
|
|
Packit |
577717 |
* we start at 0x31 to spread out vectors evenly between priority
|
|
Packit |
577717 |
* levels. (0x80 is the syscall vector)
|
|
Packit |
577717 |
*/
|
|
Packit |
577717 |
#define FIRST_DEVICE_VECTOR 0x31
|
|
Packit |
577717 |
-#define FIRST_SYSTEM_VECTOR 0xef /* duplicated in irq.h */
|
|
Packit |
577717 |
+#define FIRST_SYSTEM_VECTOR 0xee /* duplicated in irq.h */
|
|
Packit |
577717 |
|
|
Packit |
577717 |
|
|
Packit |
577717 |
#ifndef __ASSEMBLY__
|
|
Packit |
577717 |
--- linux-2.6.5-7.276.perfctr26/include/asm-x86_64/irq.h.~1~ 2006-07-24 19:32:29.000000000 +0200
|
|
Packit |
577717 |
+++ linux-2.6.5-7.276.perfctr26/include/asm-x86_64/irq.h 2008-06-22 22:40:27.000000000 +0200
|
|
Packit |
577717 |
@@ -29,7 +29,7 @@
|
|
Packit |
577717 |
*/
|
|
Packit |
577717 |
#define NR_VECTORS 256
|
|
Packit |
577717 |
|
|
Packit |
577717 |
-#define FIRST_SYSTEM_VECTOR 0xef /* duplicated in hw_irq.h */
|
|
Packit |
577717 |
+#define FIRST_SYSTEM_VECTOR 0xee /* duplicated in hw_irq.h */
|
|
Packit |
577717 |
|
|
Packit |
577717 |
#ifdef CONFIG_PCI_USE_VECTOR
|
|
Packit |
577717 |
#define NR_IRQS FIRST_SYSTEM_VECTOR
|
|
Packit |
577717 |
--- linux-2.6.5-7.276.perfctr26/include/asm-x86_64/processor.h.~1~ 2006-07-24 19:32:40.000000000 +0200
|
|
Packit |
577717 |
+++ linux-2.6.5-7.276.perfctr26/include/asm-x86_64/processor.h 2008-06-22 22:40:27.000000000 +0200
|
|
Packit |
577717 |
@@ -261,6 +261,8 @@ struct thread_struct {
|
|
Packit |
577717 |
unsigned long *io_bitmap_ptr;
|
|
Packit |
577717 |
/* cached TLS descriptors. */
|
|
Packit |
577717 |
u64 tls_array[GDT_ENTRY_TLS_ENTRIES];
|
|
Packit |
577717 |
+/* performance counters */
|
|
Packit |
577717 |
+ struct vperfctr *perfctr;
|
|
Packit |
577717 |
};
|
|
Packit |
577717 |
|
|
Packit |
577717 |
#define INIT_THREAD {}
|
|
Packit |
577717 |
--- linux-2.6.5-7.276.perfctr26/include/asm-x86_64/system.h.~1~ 2006-07-24 19:32:40.000000000 +0200
|
|
Packit |
577717 |
+++ linux-2.6.5-7.276.perfctr26/include/asm-x86_64/system.h 2008-06-22 22:40:27.000000000 +0200
|
|
Packit |
577717 |
@@ -26,7 +26,8 @@
|
|
Packit |
577717 |
#define __EXTRA_CLOBBER \
|
|
Packit |
577717 |
,"rcx","rbx","rdx","r8","r9","r10","r11","r12","r13","r14","r15"
|
|
Packit |
577717 |
|
|
Packit |
577717 |
-#define switch_to(prev,next,last) \
|
|
Packit |
577717 |
+#define switch_to(prev,next,last) do { \
|
|
Packit |
577717 |
+ perfctr_suspend_thread(&(prev)->thread); \
|
|
Packit |
577717 |
asm volatile(SAVE_CONTEXT \
|
|
Packit |
577717 |
"movq %%rsp,%P[threadrsp](%[prev])\n\t" /* save RSP */ \
|
|
Packit |
577717 |
"movq %P[threadrsp](%[next]),%%rsp\n\t" /* restore RSP */ \
|
|
Packit |
577717 |
@@ -46,7 +47,8 @@
|
|
Packit |
577717 |
[tif_fork] "i" (TIF_FORK), \
|
|
Packit |
577717 |
[thread_info] "i" (offsetof(struct task_struct, thread_info)), \
|
|
Packit |
577717 |
[pda_pcurrent] "i" (offsetof(struct x8664_pda, pcurrent)) \
|
|
Packit |
577717 |
- : "memory", "cc" __EXTRA_CLOBBER)
|
|
Packit |
577717 |
+ : "memory", "cc" __EXTRA_CLOBBER); \
|
|
Packit |
577717 |
+} while (0)
|
|
Packit |
577717 |
|
|
Packit |
577717 |
extern void load_gs_index(unsigned);
|
|
Packit |
577717 |
|
|
Packit |
577717 |
--- linux-2.6.5-7.276.perfctr26/include/linux/config.h.~1~ 2004-04-04 05:38:19.000000000 +0200
|
|
Packit |
577717 |
+++ linux-2.6.5-7.276.perfctr26/include/linux/config.h 2008-06-22 22:40:27.000000000 +0200
|
|
Packit |
577717 |
@@ -3,4 +3,7 @@
|
|
Packit |
577717 |
|
|
Packit |
577717 |
#include <linux/autoconf.h>
|
|
Packit |
577717 |
|
|
Packit |
577717 |
+/* describe relevant differences from the base kernel */
|
|
Packit |
577717 |
+#define HAVE_EXPORT___put_task_struct 1
|
|
Packit |
577717 |
+
|
|
Packit |
577717 |
#endif
|
|
Packit |
577717 |
--- linux-2.6.5-7.276.perfctr26/kernel/exit.c.~1~ 2006-07-24 19:32:46.000000000 +0200
|
|
Packit |
577717 |
+++ linux-2.6.5-7.276.perfctr26/kernel/exit.c 2008-06-22 22:40:27.000000000 +0200
|
|
Packit |
577717 |
@@ -25,6 +25,7 @@
|
|
Packit |
577717 |
#include <linux/profile.h>
|
|
Packit |
577717 |
#include <linux/mount.h>
|
|
Packit |
577717 |
#include <linux/proc_fs.h>
|
|
Packit |
577717 |
+#include <linux/perfctr.h>
|
|
Packit |
577717 |
#include <linux/ckrm.h>
|
|
Packit |
577717 |
#include <linux/ckrm_tsk.h>
|
|
Packit |
577717 |
#include <linux/audit.h>
|
|
Packit |
577717 |
@@ -114,6 +115,7 @@ repeat:
|
|
Packit |
577717 |
p->parent->cmaj_flt += p->maj_flt + p->cmaj_flt;
|
|
Packit |
577717 |
p->parent->cnvcsw += p->nvcsw + p->cnvcsw;
|
|
Packit |
577717 |
p->parent->cnivcsw += p->nivcsw + p->cnivcsw;
|
|
Packit |
577717 |
+ perfctr_release_task(p);
|
|
Packit |
577717 |
sched_exit(p);
|
|
Packit |
577717 |
write_unlock_irq(&tasklist_lock);
|
|
Packit |
577717 |
spin_unlock(&p->proc_lock);
|
|
Packit |
577717 |
--- linux-2.6.5-7.276.perfctr26/kernel/sched.c.~1~ 2006-07-24 19:32:44.000000000 +0200
|
|
Packit |
577717 |
+++ linux-2.6.5-7.276.perfctr26/kernel/sched.c 2008-06-22 22:40:27.000000000 +0200
|
|
Packit |
577717 |
@@ -38,6 +38,7 @@
|
|
Packit |
577717 |
#include <linux/rcupdate.h>
|
|
Packit |
577717 |
#include <linux/cpu.h>
|
|
Packit |
577717 |
#include <linux/percpu.h>
|
|
Packit |
577717 |
+#include <linux/perfctr.h>
|
|
Packit |
577717 |
#include <linux/kthread.h>
|
|
Packit |
577717 |
#include <linux/cpuset.h>
|
|
Packit |
577717 |
#include <linux/stop_machine.h>
|
|
Packit |
577717 |
@@ -3688,6 +3689,8 @@ int set_cpus_allowed(task_t *p, cpumask_
|
|
Packit |
577717 |
migration_req_t req;
|
|
Packit |
577717 |
runqueue_t *rq;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
+ perfctr_set_cpus_allowed(p, new_mask);
|
|
Packit |
577717 |
+
|
|
Packit |
577717 |
rq = task_rq_lock(p, &flags);
|
|
Packit |
577717 |
if (any_online_cpu(new_mask) == NR_CPUS) {
|
|
Packit |
577717 |
ret = -EINVAL;
|
|
Packit |
577717 |
--- linux-2.6.5-7.276.perfctr26/kernel/timer.c.~1~ 2006-07-24 19:32:41.000000000 +0200
|
|
Packit |
577717 |
+++ linux-2.6.5-7.276.perfctr26/kernel/timer.c 2008-06-22 22:40:27.000000000 +0200
|
|
Packit |
577717 |
@@ -31,6 +31,7 @@
|
|
Packit |
577717 |
#include <linux/time.h>
|
|
Packit |
577717 |
#include <linux/jiffies.h>
|
|
Packit |
577717 |
#include <linux/cpu.h>
|
|
Packit |
577717 |
+#include <linux/perfctr.h>
|
|
Packit |
577717 |
#include <linux/delay.h>
|
|
Packit |
577717 |
#include <linux/diskdump.h>
|
|
Packit |
577717 |
#include <linux/trigevent_hooks.h>
|
|
Packit |
577717 |
@@ -848,6 +849,7 @@ void update_one_process(struct task_stru
|
|
Packit |
577717 |
do_process_times(p, user, system);
|
|
Packit |
577717 |
do_it_virt(p, user);
|
|
Packit |
577717 |
do_it_prof(p);
|
|
Packit |
577717 |
+ perfctr_sample_thread(&p->thread);
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/*
|