[profile]: [3/23] mips profiling cleanups

From: William Lee Irwin III (wli_at_holomorphy.com)
Date: 06/22/04

  • Next message: Garreth Jeremiah: "RE: Don't want to share interrupts"
    To: linux-kernel@vger.kernel.org
    Date:	Tue, 22 Jun 2004 08:16:44 -0700
    
    

    Convert MIPS to use profiling_on() and profile_tick().

    Index: prof-2.6.7/arch/mips/kernel/time.c
    ===================================================================
    --- prof-2.6.7.orig/arch/mips/kernel/time.c 2004-06-15 22:19:22.000000000 -0700
    +++ prof-2.6.7/arch/mips/kernel/time.c 2004-06-22 07:25:45.377264776 -0700
    @@ -24,6 +24,7 @@
     #include <linux/spinlock.h>
     #include <linux/interrupt.h>
     #include <linux/module.h>
    +#include <linux/profile.h>
     
     #include <asm/bootinfo.h>
     #include <asm/cpu.h>
    @@ -417,22 +418,8 @@
      */
     void local_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
     {
    - if (!user_mode(regs)) {
    - if (prof_buffer && current->pid) {
    - unsigned long pc = regs->cp0_epc;
    -
    - pc -= (unsigned long) _stext;
    - pc >>= prof_shift;
    - /*
    - * Dont ignore out-of-bounds pc values silently,
    - * put them into the last histogram slot, so if
    - * present, they will show up as a sharp peak.
    - */
    - if (pc > prof_len - 1)
    - pc = prof_len - 1;
    - atomic_inc((atomic_t *)&prof_buffer[pc]);
    - }
    - }
    + if (!user_mode(regs) && profiling_on() && current->pid)
    + profile_tick(regs->cp0_epc);
     
     #ifdef CONFIG_SMP
             /* in UP mode, update_process_times() is invoked by do_timer() */
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Garreth Jeremiah: "RE: Don't want to share interrupts"

    Relevant Pages

    • Re: [PATCH 3/39] NLKD - early/late CPU up/down notification
      ... >> warnings) when one can already at compile time. ... >we want to not use #ifdef at all if we can ever help it. ... realized that the warning messages from the modpost build stage are very ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [2.6 patch] drivers/acpi: remove unused exported functions
      ... > future patches, but sometimes Real Life gets in the way and the ... > programmer stalls development for some time, no problem, just ifdef it. ... There had been need of rain for many days. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Cpufreq for opteron
      ... > The fact most of users are already inside ifdef blocks themselves ... I converted lprintk and tprintk to dprintk. ... When do you have a heart between your knees? ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • [2.6 patch] AFS: afs_voltypes isnt always required (fwd)
      ... #ifdef CONFIG_AFS_FSCACHE ... send the line "unsubscribe linux-kernel" in ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • [PATCH 2/3] RCU: rcu_assign_pointer() removal of memory barriers
      ... * substituting pointer. ... must be visible to another weakly ordered CPU before ... #ifdef CONFIG_NET_ESTIMATOR ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)