perf: Remove the nmi parameter from the swevent and overflow interface
Subsystems (13)
Commit-ID: a8b0ca17b80e92faab46ee7179ba9e99ccb61233 Gitweb: http://git.kernel.org/tip/a8b0ca17b80e92faab46ee7179ba9e99ccb61233 Author: Peter Zijlstra <[email protected]> AuthorDate: Mon, 27 Jun 2011 14:41:57 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Fri, 1 Jul 2011 11:06:35 +0200
perf: Remove the nmi parameter from the swevent and overflow interface
The nmi parameter indicated if we could do wakeups from the current context, if not, we would set some state and self-IPI and let the resulting interrupt do the wakeup.
For the various event classes:
- hardware: nmi=0; PMI is in fact an NMI or we run irq_work_run from the PMI-tail (ARM etc.)
- tracepoint: nmi=0; since tracepoint could be from NMI context.
- software: nmi=[0,1]; some, like the schedule thing cannot perform wakeups, and hence need 0.
As one can see, there is very little nmi=1 usage, and the down-side of not using it is that on some platforms some software events can have a jiffy delay in wakeup (when arch_irq_work_raise isn't implemented).
The up-side however is that we can remove the nmi parameter and save a bunch of conditionals in fast paths.
--- arch/alpha/kernel/perf_event.c | 2 +- arch/arm/kernel/perf_event_v6.c | 2 +- arch/arm/kernel/perf_event_v7.c | 2 +- arch/arm/kernel/perf_event_xscale.c | 4 +- arch/arm/kernel/ptrace.c | 2 +- arch/arm/kernel/swp_emulate.c | 2 +- arch/arm/mm/fault.c | 6 +- arch/mips/kernel/perf_event.c | 2 +- arch/mips/kernel/traps.c | 8 ++-- arch/mips/kernel/unaligned.c | 5 +- arch/mips/math-emu/cp1emu.c | 3 +- arch/mips/mm/fault.c | 8 +-- arch/powerpc/include/asm/emulated_ops.h | 4 +- arch/powerpc/kernel/perf_event.c | 6 +- arch/powerpc/kernel/perf_event_fsl_emb.c | 6 +- arch/powerpc/kernel/ptrace.c | 2 +- arch/powerpc/mm/fault.c | 6 +- arch/s390/mm/fault.c | 6 +- arch/sh/kernel/ptrace_32.c | 2 +- arch/sh/kernel/traps_32.c | 2 +- arch/sh/kernel/traps_64.c | 8 ++-- arch/sh/math-emu/math.c | 2 +- arch/sh/mm/fault_32.c | 6 +- arch/sh/mm/tlbflush_64.c | 6 +- arch/sparc/kernel/perf_event.c | 2 +- arch/sparc/kernel/unaligned_32.c | 4 +- arch/sparc/kernel/unaligned_64.c | 12 +++--- arch/sparc/kernel/visemul.c | 2 +- arch/sparc/math-emu/math_32.c | 2 +- arch/sparc/math-emu/math_64.c | 2 +- arch/sparc/mm/fault_32.c | 8 +-- arch/sparc/mm/fault_64.c | 8 +-- arch/x86/kernel/cpu/perf_event.c | 2 +- arch/x86/kernel/cpu/perf_event_intel.c | 2 +- arch/x86/kernel/cpu/perf_event_intel_ds.c | 4 +- arch/x86/kernel/cpu/perf_event_p4.c | 2 +- arch/x86/kernel/kgdb.c | 2 +- arch/x86/kernel/ptrace.c | 2 +- arch/x86/mm/fault.c | 6 +- include/linux/perf_event.h | 18 ++++----- kernel/events/core.c | 63 +++++++++++++---------------- kernel/events/internal.h | 1 - kernel/events/ring_buffer.c | 10 +--- kernel/sched.c | 2 +- kernel/watchdog.c | 2 +- samples/hw_breakpoint/data_breakpoint.c | 2 +- 46 files changed, 119 insertions(+), 141 deletions(-)
arch/alpha/kernel/perf_event.c +1 -1
@@ -847,7 +847,7 @@ static void alpha_perf_event_irq_handler(unsigned long la_ptr, data.period = event->hw.last_period;if (alpha_perf_event_set_period (event, hwc, idx)) { -if (perf_event_overflow (event,1 , &data, regs)) { +if (perf_event_overflow (event, &data, regs)) {/* Interrupts coming too quickly; "throttle" the * counter, i.e., disable it for a little while. */
arch/arm/kernel/perf_event_v6.c +1 -1
@@ -479,7 +479,7 @@ armv6pmu_handle_irq(int irq_num,if (!armpmu_event_set_period (event, hwc, idx))continue ; -if (perf_event_overflow (event,0 , &data, regs)) +if (perf_event_overflow (event, &data, regs)) armpmu->disable (hwc, idx); }
arch/arm/kernel/perf_event_v7.c +1 -1
@@ -787,7 +787,7 @@ static irqreturn_t armv7pmu_handle_irq(int irq_num, void *dev)if (!armpmu_event_set_period (event, hwc, idx))continue ; -if (perf_event_overflow (event,0 , &data, regs)) +if (perf_event_overflow (event, &data, regs)) armpmu->disable (hwc, idx); }
arch/arm/kernel/perf_event_xscale.c +2 -2
@@ -251,7 +251,7 @@ xscale1pmu_handle_irq(int irq_num, void *dev)if (!armpmu_event_set_period (event, hwc, idx))continue ; -if (perf_event_overflow (event,0 , &data, regs)) +if (perf_event_overflow (event, &data, regs)) armpmu->disable (hwc, idx); }
@@ -583,7 +583,7 @@ xscale2pmu_handle_irq(int irq_num, void *dev)if (!armpmu_event_set_period (event, hwc, idx))continue ; -if (perf_event_overflow (event,0 , &data, regs)) +if (perf_event_overflow (event, &data, regs)) armpmu->disable (hwc, idx); }
arch/arm/kernel/ptrace.c +1 -1
@@ -396,7 +396,7 @@ static long ptrace_hbp_idx_to_num(int idx)/* * Handle hitting a HW-breakpoint. */ -static void ptrace_hbptriggered (struct perf_event *bp,int unused, +static void ptrace_hbptriggered (struct perf_event *bp,struct perf_sample_data *data,struct pt_regs *regs) {
arch/arm/kernel/swp_emulate.c +1 -1
@@ -183,7 +183,7 @@ static int swp_handler(struct pt_regs *regs, unsigned int instr)unsigned int address, destreg, data, type;unsigned int res =0 ; -perf_sw_event (PERF_COUNT_SW_EMULATION_FAULTS ,1 ,0 , regs, regs->ARM_pc); +perf_sw_event (PERF_COUNT_SW_EMULATION_FAULTS ,1 , regs, regs->ARM_pc);if (current->pid != previous_pid) { pr_debug("\"%s\" (%ld) uses deprecated SWP{B} instruction\n",
arch/arm/mm/fault.c +3 -3
@@ -318,11 +318,11 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs) fault =__do_page_fault (mm, addr, fsr, tsk);up_read (&mm->mmap_sem); -perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS ,1 ,0 , regs, addr); +perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS ,1 , regs, addr);if (fault &VM_FAULT_MAJOR ) -perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MAJ ,1 ,0 , regs, addr); +perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MAJ ,1 , regs, addr);else if (fault &VM_FAULT_MINOR ) -perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MIN ,1 ,0 , regs, addr); +perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MIN ,1 , regs, addr);/* * Handle the "normal" case first - VM_FAULT_MAJOR / VM_FAULT_MINOR
arch/mips/kernel/perf_event.c +1 -1
@@ -527,7 +527,7 @@ handle_associated_event(struct cpu_hw_events *cpuc,if (!mipspmu_event_set_period (event, hwc, idx))return ; -if (perf_event_overflow (event,0 , data, regs)) +if (perf_event_overflow (event, data, regs)) mipspmu->disable_event (idx); }
arch/mips/kernel/traps.c +4 -4
@@ -578,12 +578,12 @@ static int simulate_llsc(struct pt_regs *regs, unsigned int opcode) {if ((opcode &OPCODE ) ==LL ) {perf_sw_event (PERF_COUNT_SW_EMULATION_FAULTS , -1 ,0 , regs,0 ); +1 , regs,0 );return simulate_ll (regs, opcode); }if ((opcode &OPCODE ) ==SC ) {perf_sw_event (PERF_COUNT_SW_EMULATION_FAULTS , -1 ,0 , regs,0 ); +1 , regs,0 );return simulate_sc (regs, opcode); }
@@ -602,7 +602,7 @@ static int simulate_rdhwr(struct pt_regs *regs, unsigned int opcode)int rd = (opcode &RD ) >>11 ;int rt = (opcode &RT ) >>16 ;perf_sw_event (PERF_COUNT_SW_EMULATION_FAULTS , -1 ,0 , regs,0 ); +1 , regs,0 );switch (rd) {case 0 :/* CPU number */ regs->regs[rt] =smp_processor_id ();
@@ -640,7 +640,7 @@ static int simulate_sync(struct pt_regs *regs, unsigned int opcode) {if ((opcode &OPCODE ) ==SPEC0 && (opcode &FUNC ) ==SYNC ) {perf_sw_event (PERF_COUNT_SW_EMULATION_FAULTS , -1 ,0 , regs,0 ); +1 , regs,0 );return 0 ; }
arch/mips/kernel/unaligned.c +2 -3
@@ -111,8 +111,7 @@ static void emulate_load_store_insn(struct pt_regs *regs,unsigned long value;unsigned int res; -perf_sw_event (PERF_COUNT_SW_EMULATION_FAULTS , -1 ,0 , regs,0 ); +perf_sw_event (PERF_COUNT_SW_EMULATION_FAULTS ,1 , regs,0 );/* * This load never faults.
@@ -517,7 +516,7 @@ asmlinkage void do_ade(struct pt_regs *regs)mm_segment_t seg;perf_sw_event (PERF_COUNT_SW_ALIGNMENT_FAULTS , -1 ,0 , regs, regs->cp0_badvaddr); +1 , regs, regs->cp0_badvaddr);/* * Did we catch a fault trying to load an instruction? * Or are we running in MIPS16 mode?
arch/mips/math-emu/cp1emu.c +1 -2
@@ -272,8 +272,7 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_struct *ctx, } emul: -perf_sw_event (PERF_COUNT_SW_EMULATION_FAULTS , -1 ,0 , xcp,0 ); +perf_sw_event (PERF_COUNT_SW_EMULATION_FAULTS ,1 , xcp,0 );MIPS_FPU_EMU_INC_STATS (emulated);switch (MIPSInst_OPCODE (ir)) {case ldc1_op:{
arch/mips/mm/fault.c +3 -5
@@ -145,7 +145,7 @@ good_area:* the fault. */ fault =handle_mm_fault (mm, vma, address, write ?FAULT_FLAG_WRITE :0 ); -perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS ,1 ,0 , regs, address); +perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS ,1 , regs, address);if (unlikely (fault &VM_FAULT_ERROR )) {if (fault &VM_FAULT_OOM ) goto out_of_memory;
@@ -154,12 +154,10 @@ good_area:BUG (); }if (fault &VM_FAULT_MAJOR ) { -perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MAJ , -1 ,0 , regs, address); +perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MAJ ,1 , regs, address); tsk->maj_flt++; }else { -perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MIN , -1 ,0 , regs, address); +perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MIN ,1 , regs, address); tsk->min_flt++; }
arch/powerpc/include/asm/emulated_ops.h +2 -2
@@ -78,14 +78,14 @@ extern void ppc_warn_emulated_print(const char *type);#define PPC_WARN_EMULATED (type, regs) \ do { \ perf_sw_event(PERF_COUNT_SW_EMULATION_FAULTS, \ - 1, 0, regs, 0); \ + 1, regs, 0); \ __PPC_WARN_EMULATED(type); \ } while (0)#define PPC_WARN_ALIGNMENT (type, regs) \ do { \ perf_sw_event(PERF_COUNT_SW_ALIGNMENT_FAULTS, \ - 1, 0, regs, regs->dar); \ + 1, regs, regs->dar); \ __PPC_WARN_EMULATED(type); \ } while (0)
arch/powerpc/kernel/perf_event.c +3 -3
@@ -1207,7 +1207,7 @@ struct pmu power_pmu = {* here so there is no possibility of being interrupted. */ static void record_and_restart (struct perf_event *event,unsigned long val, -struct pt_regs *regs,int nmi) +struct pt_regs *regs) {u64 period = event->hw.sample_period;s64 prev, delta, left;
@@ -1258,7 +1258,7 @@ static void record_and_restart(struct perf_event *event, unsigned long val,if (event->attr.sample_type &PERF_SAMPLE_ADDR )perf_get_data_addr (regs, &data.addr); -if (perf_event_overflow (event, nmi, &data, regs)) +if (perf_event_overflow (event, &data, regs))power_pmu_stop (event,0 ); } }
@@ -1346,7 +1346,7 @@ static void perf_event_interrupt(struct pt_regs *regs)if ((int )val <0 ) {/* event has overflowed */ found =1 ; -record_and_restart (event, val, regs, nmi); +record_and_restart (event, val, regs); } }
arch/powerpc/kernel/perf_event_fsl_emb.c +3 -3
@@ -568,7 +568,7 @@ static struct pmu fsl_emb_pmu = {* here so there is no possibility of being interrupted. */ static void record_and_restart (struct perf_event *event,unsigned long val, -struct pt_regs *regs,int nmi) +struct pt_regs *regs) {u64 period = event->hw.sample_period;s64 prev, delta, left;
@@ -616,7 +616,7 @@ static void record_and_restart(struct perf_event *event, unsigned long val,perf_sample_data_init (&data,0 ); data.period = event->hw.last_period; -if (perf_event_overflow (event, nmi, &data, regs)) +if (perf_event_overflow (event, &data, regs))fsl_emb_pmu_stop (event,0 ); } }
@@ -644,7 +644,7 @@ static void perf_event_interrupt(struct pt_regs *regs)if (event) {/* event has overflowed */ found =1 ; -record_and_restart (event, val, regs, nmi); +record_and_restart (event, val, regs); }else {/* * Disabled counter is negative,
arch/powerpc/kernel/ptrace.c +1 -1
@@ -882,7 +882,7 @@ void user_disable_single_step(struct task_struct *task) }#ifdef CONFIG_HAVE_HW_BREAKPOINT -void ptrace_triggered (struct perf_event *bp,int nmi, +void ptrace_triggered (struct perf_event *bp,struct perf_sample_data *data,struct pt_regs *regs) {struct perf_event_attr attr;
arch/powerpc/mm/fault.c +3 -3
@@ -173,7 +173,7 @@ int __kprobes do_page_fault(struct pt_regs *regs, unsigned long address,die ("Weird page fault" , regs,SIGSEGV ); } -perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS ,1 ,0 , regs, address); +perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS ,1 , regs, address);/* When running in the kernel we expect faults to occur only to * addresses in user space. All other faults represent errors in the
@@ -319,7 +319,7 @@ good_area: }if (ret &VM_FAULT_MAJOR ) { current->maj_flt++; -perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MAJ ,1 ,0 , +perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MAJ ,1 , regs, address);#ifdef CONFIG_PPC_SMLPAR if (firmware_has_feature (FW_FEATURE_CMO )) {
@@ -330,7 +330,7 @@ good_area:#endif }else { current->min_flt++; -perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MIN ,1 ,0 , +perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MIN ,1 , regs, address); }up_read (&mm->mmap_sem);
arch/s390/mm/fault.c +3 -3
@@ -299,7 +299,7 @@ static inline int do_exception(struct pt_regs *regs, int access, goto out; address = trans_exc_code & __FAIL_ADDR_MASK; -perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS ,1 ,0 , regs, address); +perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS ,1 , regs, address); flags =FAULT_FLAG_ALLOW_RETRY ;if (access ==VM_WRITE || (trans_exc_code & store_indication) ==0x400 ) flags |=FAULT_FLAG_WRITE ;
@@ -345,11 +345,11 @@ retry:if (flags &FAULT_FLAG_ALLOW_RETRY ) {if (fault &VM_FAULT_MAJOR ) { tsk->maj_flt++; -perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MAJ ,1 ,0 , +perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MAJ ,1 , regs, address); }else { tsk->min_flt++; -perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MIN ,1 ,0 , +perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MIN ,1 , regs, address); }if (fault &VM_FAULT_RETRY ) {
arch/sh/kernel/ptrace_32.c +1 -1
@@ -63,7 +63,7 @@ static inline int put_stack_long(struct task_struct *task, int offset,return 0 ; } -void ptrace_triggered (struct perf_event *bp,int nmi, +void ptrace_triggered (struct perf_event *bp,struct perf_sample_data *data,struct pt_regs *regs) {struct perf_event_attr attr;
arch/sh/kernel/traps_32.c +1 -1
@@ -393,7 +393,7 @@ int handle_unaligned_access(insn_size_t instruction, struct pt_regs *regs,*/ if (!expected) {unaligned_fixups_notify (current, instruction, regs); -perf_sw_event (PERF_COUNT_SW_ALIGNMENT_FAULTS ,1 ,0 , +perf_sw_event (PERF_COUNT_SW_ALIGNMENT_FAULTS ,1 , regs, address); }
arch/sh/kernel/traps_64.c +4 -4
@@ -434,7 +434,7 @@ static int misaligned_load(struct pt_regs *regs,return error; } -perf_sw_event (PERF_COUNT_SW_ALIGNMENT_FAULTS ,1 ,0 , regs, address); +perf_sw_event (PERF_COUNT_SW_ALIGNMENT_FAULTS ,1 , regs, address); destreg = (opcode >>4 ) &0x3f ;if (user_mode (regs)) {
@@ -512,7 +512,7 @@ static int misaligned_store(struct pt_regs *regs,return error; } -perf_sw_event (PERF_COUNT_SW_ALIGNMENT_FAULTS ,1 ,0 , regs, address); +perf_sw_event (PERF_COUNT_SW_ALIGNMENT_FAULTS ,1 , regs, address); srcreg = (opcode >>4 ) &0x3f ;if (user_mode (regs)) {
@@ -588,7 +588,7 @@ static int misaligned_fpu_load(struct pt_regs *regs,return error; } -perf_sw_event (PERF_COUNT_SW_EMULATION_FAULTS ,1 ,0 , regs, address); +perf_sw_event (PERF_COUNT_SW_EMULATION_FAULTS ,1 , regs, address); destreg = (opcode >>4 ) &0x3f ;if (user_mode (regs)) {
@@ -665,7 +665,7 @@ static int misaligned_fpu_store(struct pt_regs *regs,return error; } -perf_sw_event (PERF_COUNT_SW_EMULATION_FAULTS ,1 ,0 , regs, address); +perf_sw_event (PERF_COUNT_SW_EMULATION_FAULTS ,1 , regs, address); srcreg = (opcode >>4 ) &0x3f ;if (user_mode (regs)) {
arch/sh/math-emu/math.c +1 -1
@@ -620,7 +620,7 @@ int do_fpu_inst(unsigned short inst, struct pt_regs *regs)struct task_struct *tsk = current;struct sh_fpu_soft_struct *fpu = &(tsk->thread.xstate->softfpu); -perf_sw_event (PERF_COUNT_SW_EMULATION_FAULTS ,1 ,0 , regs,0 ); +perf_sw_event (PERF_COUNT_SW_EMULATION_FAULTS ,1 , regs,0 );if (!(task_thread_info (tsk)->status &TS_USEDFPU )) {/* initialize once. */
arch/sh/mm/fault_32.c +3 -3
@@ -160,7 +160,7 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,if ((regs->sr &SR_IMASK ) !=SR_IMASK )local_irq_enable (); -perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS ,1 ,0 , regs, address); +perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS ,1 , regs, address);/* * If we're in an interrupt, have no user context or are running
@@ -210,11 +210,11 @@ good_area: }if (fault &VM_FAULT_MAJOR ) { tsk->maj_flt++; -perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MAJ ,1 ,0 , +perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MAJ ,1 , regs, address); }else { tsk->min_flt++; -perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MIN ,1 ,0 , +perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MIN ,1 , regs, address); }
arch/sh/mm/tlbflush_64.c +3 -3
@@ -116,7 +116,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long writeaccess,/* Not an IO address, so reenable interrupts */ local_irq_enable (); -perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS ,1 ,0 , regs, address); +perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS ,1 , regs, address);/* * If we're in an interrupt or have no user
@@ -200,11 +200,11 @@ good_area:if (fault &VM_FAULT_MAJOR ) { tsk->maj_flt++; -perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MAJ ,1 ,0 , +perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MAJ ,1 , regs, address); }else { tsk->min_flt++; -perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MIN ,1 ,0 , +perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MIN ,1 , regs, address); }
arch/sparc/kernel/perf_event.c +1 -1
@@ -1277,7 +1277,7 @@ static int __kprobes perf_event_nmi_handler(struct notifier_block *self,if (!sparc_perf_event_set_period (event, hwc, idx))continue ; -if (perf_event_overflow (event,1 , &data, regs)) +if (perf_event_overflow (event, &data, regs))sparc_pmu_stop (event,0 ); }
arch/sparc/kernel/unaligned_32.c +2 -2
@@ -247,7 +247,7 @@ asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn)unsigned long addr =compute_effective_address (regs, insn);int err; -perf_sw_event (PERF_COUNT_SW_ALIGNMENT_FAULTS ,1 ,0 , regs, addr); +perf_sw_event (PERF_COUNT_SW_ALIGNMENT_FAULTS ,1 , regs, addr);switch (dir) {case load: err = do_int_load(fetch_reg_addr(((insn>>25)&0x1f),
@@ -338,7 +338,7 @@ asmlinkage void user_unaligned_trap(struct pt_regs *regs, unsigned int insn) } addr =compute_effective_address (regs, insn); -perf_sw_event (PERF_COUNT_SW_ALIGNMENT_FAULTS ,1 ,0 , regs, addr); +perf_sw_event (PERF_COUNT_SW_ALIGNMENT_FAULTS ,1 , regs, addr);switch (dir) {case load: err = do_int_load(fetch_reg_addr(((insn>>25)&0x1f),
arch/sparc/kernel/unaligned_64.c +6 -6
@@ -317,7 +317,7 @@ asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn) addr =compute_effective_address (regs, insn, ((insn >>25 ) &0x1f )); -perf_sw_event (PERF_COUNT_SW_ALIGNMENT_FAULTS ,1 ,0 , regs, addr); +perf_sw_event (PERF_COUNT_SW_ALIGNMENT_FAULTS ,1 , regs, addr);switch (asi) {case ASI_NL :case ASI_AIUPL :
@@ -384,7 +384,7 @@ int handle_popc(u32 insn, struct pt_regs *regs)int ret, i, rd = ((insn >>25 ) &0x1f );int from_kernel = (regs->tstate &TSTATE_PRIV ) !=0 ; -perf_sw_event (PERF_COUNT_SW_EMULATION_FAULTS ,1 ,0 , regs,0 ); +perf_sw_event (PERF_COUNT_SW_EMULATION_FAULTS ,1 , regs,0 );if (insn &0x2000 ) {maybe_flush_windows (0 ,0 , rd, from_kernel); value =sign_extend_imm13 (insn);
@@ -431,7 +431,7 @@ int handle_ldf_stq(u32 insn, struct pt_regs *regs)int asi =decode_asi (insn, regs);int flag = (freg <32 ) ?FPRS_DL :FPRS_DU ; -perf_sw_event (PERF_COUNT_SW_EMULATION_FAULTS ,1 ,0 , regs,0 ); +perf_sw_event (PERF_COUNT_SW_EMULATION_FAULTS ,1 , regs,0 );save_and_clear_fpu ();current_thread_info ()->xfsr[0 ] &= ~0x1c000 ;
@@ -554,7 +554,7 @@ void handle_ld_nf(u32 insn, struct pt_regs *regs)int from_kernel = (regs->tstate &TSTATE_PRIV ) !=0 ;unsigned long *reg; -perf_sw_event (PERF_COUNT_SW_EMULATION_FAULTS ,1 ,0 , regs,0 ); +perf_sw_event (PERF_COUNT_SW_EMULATION_FAULTS ,1 , regs,0 );maybe_flush_windows (0 ,0 , rd, from_kernel); reg =fetch_reg_addr (rd, regs);
@@ -586,7 +586,7 @@ void handle_lddfmna(struct pt_regs *regs, unsigned long sfar, unsigned long sfsrif (tstate &TSTATE_PRIV )die_if_kernel ("lddfmna from kernel" , regs); -perf_sw_event (PERF_COUNT_SW_ALIGNMENT_FAULTS ,1 ,0 , regs, sfar); +perf_sw_event (PERF_COUNT_SW_ALIGNMENT_FAULTS ,1 , regs, sfar);if (test_thread_flag (TIF_32BIT )) pc = (u32 )pc;if (get_user (insn, (u32 __user *) pc) != -EFAULT ) {
@@ -647,7 +647,7 @@ void handle_stdfmna(struct pt_regs *regs, unsigned long sfar, unsigned long sfsrif (tstate &TSTATE_PRIV )die_if_kernel ("stdfmna from kernel" , regs); -perf_sw_event (PERF_COUNT_SW_ALIGNMENT_FAULTS ,1 ,0 , regs, sfar); +perf_sw_event (PERF_COUNT_SW_ALIGNMENT_FAULTS ,1 , regs, sfar);if (test_thread_flag (TIF_32BIT )) pc = (u32 )pc;if (get_user (insn, (u32 __user *) pc) != -EFAULT ) {
arch/sparc/kernel/visemul.c +1 -1
@@ -802,7 +802,7 @@ int vis_emul(struct pt_regs *regs, unsigned int insn)BUG_ON (regs->tstate &TSTATE_PRIV ); -perf_sw_event (PERF_COUNT_SW_EMULATION_FAULTS ,1 ,0 , regs,0 ); +perf_sw_event (PERF_COUNT_SW_EMULATION_FAULTS ,1 , regs,0 );if (test_thread_flag (TIF_32BIT )) pc = (u32 )pc;
arch/sparc/math-emu/math_32.c +1 -1
@@ -164,7 +164,7 @@ int do_mathemu(struct pt_regs *regs, struct task_struct *fpt)int retcode =0 ;/* assume all succeed */ unsigned long insn; -perf_sw_event (PERF_COUNT_SW_EMULATION_FAULTS ,1 ,0 , regs,0 ); +perf_sw_event (PERF_COUNT_SW_EMULATION_FAULTS ,1 , regs,0 );#ifdef DEBUG_MATHEMU printk ("In do_mathemu()... pc is %08lx\n" , regs->pc);
arch/sparc/math-emu/math_64.c +1 -1
@@ -184,7 +184,7 @@ int do_mathemu(struct pt_regs *regs, struct fpustate *f)if (tstate &TSTATE_PRIV )die_if_kernel ("unfinished/unimplemented FPop from kernel" , regs); -perf_sw_event (PERF_COUNT_SW_EMULATION_FAULTS ,1 ,0 , regs,0 ); +perf_sw_event (PERF_COUNT_SW_EMULATION_FAULTS ,1 , regs,0 );if (test_thread_flag (TIF_32BIT )) pc = (u32 )pc;if (get_user (insn, (u32 __user *) pc) != -EFAULT ) {
arch/sparc/mm/fault_32.c +3 -5
@@ -251,7 +251,7 @@ asmlinkage void do_sparc_fault(struct pt_regs *regs, int text_fault, int write,if (in_atomic () || !mm) goto no_context; -perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS ,1 ,0 , regs, address); +perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS ,1 , regs, address);down_read (&mm->mmap_sem);
@@ -301,12 +301,10 @@ good_area: }if (fault &VM_FAULT_MAJOR ) { current->maj_flt++; -perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MAJ ,1 ,0 , - regs, address); +perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MAJ ,1 , regs, address); }else { current->min_flt++; -perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MIN ,1 ,0 , - regs, address); +perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MIN ,1 , regs, address); }up_read (&mm->mmap_sem);return ;
arch/sparc/mm/fault_64.c +3 -5
@@ -325,7 +325,7 @@ asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs)if (in_atomic () || !mm) goto intr_or_no_mm; -perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS ,1 ,0 , regs, address); +perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS ,1 , regs, address);if (!down_read_trylock (&mm->mmap_sem)) { if ((regs->tstate & TSTATE_PRIV) &&
@@ -433,12 +433,10 @@ good_area: }if (fault &VM_FAULT_MAJOR ) { current->maj_flt++; -perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MAJ ,1 ,0 , - regs, address); +perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MAJ ,1 , regs, address); }else { current->min_flt++; -perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MIN ,1 ,0 , - regs, address); +perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MIN ,1 , regs, address); }up_read (&mm->mmap_sem);
arch/x86/kernel/cpu/perf_event.c +1 -1
@@ -1339,7 +1339,7 @@ static int x86_pmu_handle_irq(struct pt_regs *regs)if (!x86_perf_event_set_period (event))continue ; -if (perf_event_overflow (event,1 , &data, regs)) +if (perf_event_overflow (event, &data, regs))x86_pmu_stop (event,0 ); }
arch/x86/kernel/cpu/perf_event_intel.c +1 -1
@@ -1003,7 +1003,7 @@ again: data.period = event->hw.last_period; -if (perf_event_overflow (event,1 , &data, regs)) +if (perf_event_overflow (event, &data, regs))x86_pmu_stop (event,0 ); }
arch/x86/kernel/cpu/perf_event_intel_ds.c +2 -2
@@ -340,7 +340,7 @@ static int intel_pmu_drain_bts_buffer(void)*/ perf_prepare_sample (&header, &data, event, ®s); -if (perf_output_begin (&handle, event, header.size * (top - at),1 ,1 )) +if (perf_output_begin (&handle, event, header.size * (top - at),1 ))return 1 ;for (; at < top; at++) {
@@ -616,7 +616,7 @@ static void __intel_pmu_pebs_event(struct perf_event *event,else regs.flags &= ~PERF_EFLAGS_EXACT ; -if (perf_event_overflow (event,1 , &data, ®s)) +if (perf_event_overflow (event, &data, ®s))x86_pmu_stop (event,0 ); }
arch/x86/kernel/cpu/perf_event_p4.c +1 -1
@@ -970,7 +970,7 @@ static int p4_pmu_handle_irq(struct pt_regs *regs)if (!x86_perf_event_set_period (event))continue ; -if (perf_event_overflow (event,1 , &data, regs)) +if (perf_event_overflow (event, &data, regs))x86_pmu_stop (event,0 ); }
arch/x86/kernel/kgdb.c +1 -1
@@ -608,7 +608,7 @@ int kgdb_arch_init(void)return register_die_notifier (&kgdb_notifier); } -static void kgdb_hw_overflow_handler (struct perf_event *event,int nmi, +static void kgdb_hw_overflow_handler (struct perf_event *event,struct perf_sample_data *data,struct pt_regs *regs) {struct task_struct *tsk = current;
arch/x86/kernel/ptrace.c +1 -1
@@ -528,7 +528,7 @@ static int genregs_set(struct task_struct *target,return ret; } -static void ptrace_triggered (struct perf_event *bp,int nmi, +static void ptrace_triggered (struct perf_event *bp,struct perf_sample_data *data,struct pt_regs *regs) {
arch/x86/mm/fault.c +3 -3
@@ -1059,7 +1059,7 @@ do_page_fault(struct pt_regs *regs, unsigned long error_code)if (unlikely (error_code &PF_RSVD ))pgtable_bad (regs, error_code, address); -perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS ,1 ,0 , regs, address); +perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS ,1 , regs, address);/* * If we're in an interrupt, have no user context or are running
@@ -1161,11 +1161,11 @@ good_area:if (flags &FAULT_FLAG_ALLOW_RETRY ) {if (fault &VM_FAULT_MAJOR ) { tsk->maj_flt++; -perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MAJ ,1 ,0 , +perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MAJ ,1 , regs, address); }else { tsk->min_flt++; -perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MIN ,1 ,0 , +perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MIN ,1 , regs, address); }if (fault &VM_FAULT_RETRY ) {
include/linux/perf_event.h +8 -10
@@ -682,7 +682,7 @@ enum perf_event_active_state {struct file ;struct perf_sample_data ; -typedef void (*perf_overflow_handler_t )(struct perf_event *,int , +typedef void (*perf_overflow_handler_t )(struct perf_event *,struct perf_sample_data *,struct pt_regs *regs);
@@ -925,7 +925,6 @@ struct perf_output_handle {unsigned long size;void *addr;int page; -int nmi;int sample; };
@@ -993,7 +992,7 @@ extern void perf_prepare_sample(struct perf_event_header *header,struct perf_event *event, struct pt_regs *regs); -extern int perf_event_overflow (struct perf_event *event,int nmi, +extern int perf_event_overflow (struct perf_event *event,struct perf_sample_data *data,struct pt_regs *regs);
@@ -1012,7 +1011,7 @@ static inline int is_software_event(struct perf_event *event)extern struct jump_label_key perf_swevent_enabled[PERF_COUNT_SW_MAX ]; -extern void __perf_sw_event (u32 ,u64 ,int ,struct pt_regs *,u64 ); +extern void __perf_sw_event (u32 ,u64 ,struct pt_regs *,u64 );#ifndef perf_arch_fetch_caller_regsstatic inline void perf_arch_fetch_caller_regs (struct pt_regs *regs,unsigned long ip) { }
@@ -1034,7 +1033,7 @@ static inline void perf_fetch_caller_regs(struct pt_regs *regs) } static __always_inline void -perf_sw_event (u32 event_id,u64 nr,int nmi,struct pt_regs *regs,u64 addr) +perf_sw_event (u32 event_id,u64 nr,struct pt_regs *regs,u64 addr) {struct pt_regs hot_regs;
@@ -1043,7 +1042,7 @@ perf_sw_event(u32 event_id, u64 nr, int nmi, struct pt_regs *regs, u64 addr)perf_fetch_caller_regs (&hot_regs); regs = &hot_regs; } -__perf_sw_event (event_id, nr, nmi, regs, addr); +__perf_sw_event (event_id, nr, regs, addr); } }
@@ -1057,7 +1056,7 @@ static inline void perf_event_task_sched_in(struct task_struct *task)static inline void perf_event_task_sched_out (struct task_struct *task,struct task_struct *next) { -perf_sw_event (PERF_COUNT_SW_CONTEXT_SWITCHES ,1 ,1 ,NULL ,0 ); +perf_sw_event (PERF_COUNT_SW_CONTEXT_SWITCHES ,1 ,NULL ,0 );__perf_event_task_sched_out (task, next); }
@@ -1119,7 +1118,7 @@ extern void perf_bp_event(struct perf_event *event, void *data);extern int perf_output_begin (struct perf_output_handle *handle,struct perf_event *event,unsigned int size, -int nmi,int sample); +int sample);extern void perf_output_end (struct perf_output_handle *handle);extern void perf_output_copy (struct perf_output_handle *handle,const void *buf,unsigned int len);
@@ -1143,8 +1142,7 @@ static inline int perf_event_task_disable(void) { return -EINVAL; }static inline int perf_event_task_enable (void ) {return -EINVAL ; }static inline void -perf_sw_event (u32 event_id,u64 nr,int nmi, -struct pt_regs *regs,u64 addr) { } +perf_sw_event (u32 event_id,u64 nr,struct pt_regs *regs,u64 addr) { }static inline void perf_bp_event (struct perf_event *event,void *data) { }
kernel/events/core.c +28 -35
201 lines not on this page · raw message
kernel/events/internal.h +0 -1
@@ -27,7 +27,6 @@ struct ring_buffer {void *data_pages[0 ]; }; -extern void rb_free (struct ring_buffer *rb);extern struct ring_buffer *rb_alloc (int nr_pages,long watermark,int cpu,int flags);
kernel/events/ring_buffer.c +3 -7
@@ -38,11 +38,8 @@ static void perf_output_wakeup(struct perf_output_handle *handle) {atomic_set (&handle->rb->poll,POLL_IN ); -if (handle->nmi) { - handle->event->pending_wakeup =1 ; -irq_work_queue (&handle->event->pending); - }else -perf_event_wakeup (handle->event); + handle->event->pending_wakeup =1 ; +irq_work_queue (&handle->event->pending); }/*
@@ -102,7 +99,7 @@ out:int perf_output_begin (struct perf_output_handle *handle,struct perf_event *event,unsigned int size, -int nmi,int sample) +int sample) {struct ring_buffer *rb;unsigned long tail, offset, head;
@@ -127,7 +124,6 @@ int perf_output_begin(struct perf_output_handle *handle, handle->rb = rb; handle->event = event; - handle->nmi = nmi; handle->sample = sample;if (!rb->nr_pages)
kernel/sched.c +1 -1
@@ -2220,7 +2220,7 @@ void set_task_cpu(struct task_struct *p, unsigned int new_cpu)if (task_cpu (p) != new_cpu) { p->se.nr_migrations++; -perf_sw_event (PERF_COUNT_SW_CPU_MIGRATIONS ,1 ,1 ,NULL ,0 ); +perf_sw_event (PERF_COUNT_SW_CPU_MIGRATIONS ,1 ,NULL ,0 ); }__set_task_cpu (p, new_cpu);
kernel/watchdog.c +1 -1
@@ -211,7 +211,7 @@ static struct perf_event_attr wd_hw_attr = { };/* Callback function for perf event subsystem */ -static void watchdog_overflow_callback (struct perf_event *event,int nmi, +static void watchdog_overflow_callback (struct perf_event *event,struct perf_sample_data *data,struct pt_regs *regs) {
samples/hw_breakpoint/data_breakpoint.c +1 -1
@@ -41,7 +41,7 @@ module_param_string(ksym, ksym_name, KSYM_NAME_LEN, S_IRUGO);MODULE_PARM_DESC (ksym,"Kernel symbol to monitor; this module will report any" " write operations on the kernel symbol" ); -static void sample_hbp_handler (struct perf_event *bp,int nmi, +static void sample_hbp_handler (struct perf_event *bp,struct perf_sample_data *data,struct pt_regs *regs) {
Hi Peter,
Quoted 21 lines · tip-bot for Peter Zijlstra
Commit-ID: a8b0ca17b80e92faab46ee7179ba9e99ccb61233 Gitweb: http://git.kernel.org/tip/a8b0ca17b80e92faab46ee7179ba9e99ccb61233 Author: Peter Zijlstra <[email protected]> AuthorDate: Mon, 27 Jun 2011 14:41:57 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Fri, 1 Jul 2011 11:06:35 +0200perf: Remove the nmi parameter from the swevent and overflow interface
The nmi parameter indicated if we could do wakeups from the current context, if not, we would set some state and self-IPI and let the resulting interrupt do the wakeup.
For the various event classes:
- hardware: nmi=0; PMI is in fact an NMI or we run
irq_work_runfrom the PMI-tail (ARM etc.)
- tracepoint: nmi=0; since tracepoint could be from NMI context.
- software: nmi=[0,1]; some, like the schedule thing cannot perform wakeups, and hence need 0.
Quoted 8 lines
As one can see, there is very little nmi=1 usage, and the down-side of not using it is that on some platforms some software events can have a jiffy delay in wakeup (when
arch_irq_work_raiseisn't implemented).The up-side however is that we can remove the nmi parameter and save a bunch of conditionals in fast paths.
Signed-off-by Peter Zijlstra <[email protected]>
Whilst you updated the arch code in this series, you forgot to update the oprofile perf backend. I think you want something as simple as:
drivers/oprofile/oprofile_perf.c +1 -1
@@ -31,7 +31,7 @@ static int num_counters;/* * Overflow callback for oprofile. */ -static void op_overflow_handler (struct perf_event *event,int unused, +static void op_overflow_handler (struct perf_event *event,struct perf_sample_data *data,struct pt_regs *regs) {int id;
although I haven't tried it.
Cheers,
Will
Quoted 28 lines · Will Deacon
Hi Peter,
Quoted 25 lines · tip-bot for Peter Zijlstra
Commit-ID: a8b0ca17b80e92faab46ee7179ba9e99ccb61233 Gitweb: http://git.kernel.org/tip/a8b0ca17b80e92faab46ee7179ba9e99ccb61233 Author: Peter Zijlstra <[email protected]> AuthorDate: Mon, 27 Jun 2011 14:41:57 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Fri, 1 Jul 2011 11:06:35 +0200perf: Remove the nmi parameter from the swevent and overflow interface
The nmi parameter indicated if we could do wakeups from the current context, if not, we would set some state and self-IPI and let the resulting interrupt do the wakeup.
For the various event classes:
- hardware: nmi=0; PMI is in fact an NMI or we run
irq_work_runfrom the PMI-tail (ARM etc.)
- tracepoint: nmi=0; since tracepoint could be from NMI context.
- software: nmi=[0,1]; some, like the schedule thing cannot perform wakeups, and hence need 0.As one can see, there is very little nmi=1 usage, and the down-side of not using it is that on some platforms some software events can have a jiffy delay in wakeup (when
arch_irq_work_raiseisn't implemented).
Quoted 7 lines
Quoted 4 lines
The up-side however is that we can remove the nmi parameter and save a bunch of conditionals in fast paths.
Signed-off-by Peter Zijlstra <[email protected]>Whilst you updated the arch code in this series, you forgot to update the oprofile perf backend.
Bah, I bet it skillfully hid from my grep-foo.
Quoted 9 lines
I think you want something as simple as:
drivers/oprofile/oprofile_perf.c +0
-0
drivers/oprofile/oprofile_perf.c static int num_counters; · line 37
Quoted 8 lines
drivers/oprofile/oprofile_perf.c +1
-1@@ -31,7 +31,7 @@ static int num_counters;/* * Overflow callback for oprofile. */ -static void op_overflow_handler (struct perf_event *event,int unused, +static void op_overflow_handler (struct perf_event *event,struct perf_sample_data *data,struct pt_regs *regs) {int id;
Yes, that is sufficient. Thanks!
Hi Peter,
Quoted 10 lines · Peter Zijlstra
Quoted 9 lines · Will Deacon
Quoted 8 lines · tip-bot for Peter Zijlstra
Commit-ID: a8b0ca17b80e92faab46ee7179ba9e99ccb61233 Gitweb: http://git.kernel.org/tip/a8b0ca17b80e92faab46ee7179ba9e99ccb61233 Author: Peter Zijlstra <[email protected]> AuthorDate: Mon, 27 Jun 2011 14:41:57 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Fri, 1 Jul 2011 11:06:35 +0200perf: Remove the nmi parameter from the swevent and overflow interface
[...]
Quoted 9 lines
Quoted 3 lines
Whilst you updated the arch code in this series, you forgot to update the oprofile perf backend.
Bah, I bet it skillfully hid from my grep-foo.
Quoted 3 lines
I think you want something as simple as:
Quoted 16 lines
Quoted 6 lines
drivers/oprofile/oprofile_perf.c +0
-0drivers/oprofile/oprofile_perf.c static int num_counters; · line 37
Quoted 8 lines
drivers/oprofile/oprofile_perf.c +1
-1@@ -31,7 +31,7 @@ static int num_counters;/* * Overflow callback for oprofile. */ -static void op_overflow_handler (struct perf_event *event,int unused, +static void op_overflow_handler (struct perf_event *event,struct perf_sample_data *data,struct pt_regs *regs) {int id;Yes, that is sufficient. Thanks!
I can't see this in next. Are you happy taking this or do you want me to post it to the list as a standalone patch?
Cheers,
Will
Quoted 17 lines · Will Deacon
Quoted 8 lines
Quoted 8 lines
drivers/oprofile/oprofile_perf.c +0
-0@@ -31,7 +31,7 @@ static int num_counters;/* * Overflow callback for oprofile. */ Quoted 8 lines
drivers/oprofile/oprofile_perf.c static int num_counters; · line 37
Quoted 6 lines
drivers/oprofile/oprofile_perf.c +1
-1-static void op_overflow_handler (struct perf_event *event,int unused, +static void op_overflow_handler (struct perf_event *event,struct perf_sample_data *data,struct pt_regs *regs) {int id;Yes, that is sufficient. Thanks!
Quoted 2 lines
I can't see this in next. Are you happy taking this or do you want me to post it to the list as a standalone patch?
I just handed it to Ingo (who's back from vacation), it should show up today or tomorrow.
[tip:perf/core] perf: Remove the nmi parameter from the oprofile_perf backend
In reply to Will DeaconCommit-ID: 7fcfd1abd6480d3b9ef17f5759c175e036e835cf Gitweb: http://git.kernel.org/tip/7fcfd1abd6480d3b9ef17f5759c175e036e835cf Author: Will Deacon <[email protected]> AuthorDate: Fri, 8 Jul 2011 18:34:42 +0100 Committer: Ingo Molnar <[email protected]> CommitDate: Thu, 21 Jul 2011 20:41:58 +0200
perf: Remove the nmi parameter from the oprofile_perf backend
In commit a8b0ca17b80e ("perf: Remove the nmi parameter from the swevent and overflow interface") one site was overlooked.
--- drivers/oprofile/oprofile_perf.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/oprofile/oprofile_perf.c +1 -1
@@ -31,7 +31,7 @@ static int num_counters;/* * Overflow callback for oprofile. */ -static void op_overflow_handler (struct perf_event *event,int unused, +static void op_overflow_handler (struct perf_event *event,struct perf_sample_data *data,struct pt_regs *regs) {int id;