iseries profiling support
Anton Blanchard
anton at samba.org
Fri Jul 16 00:52:47 EST 2004
Hi,
Is anyone using the dprofile facility on iseries these days? If not we
can remove some code.
Anton
===== arch/ppc64/kernel/asm-offsets.c 1.21 vs edited =====
--- 1.21/arch/ppc64/kernel/asm-offsets.c Fri Jul 2 15:23:46 2004
+++ edited/arch/ppc64/kernel/asm-offsets.c Tue Jul 13 22:40:07 2004
@@ -91,11 +91,6 @@
DEFINE(PACATOC, offsetof(struct paca_struct, kernel_toc));
DEFINE(PACAPROCENABLED, offsetof(struct paca_struct, proc_enabled));
DEFINE(PACADEFAULTDECR, offsetof(struct paca_struct, default_decr));
- DEFINE(PACAPROFENABLED, offsetof(struct paca_struct, prof_enabled));
- DEFINE(PACAPROFLEN, offsetof(struct paca_struct, prof_len));
- DEFINE(PACAPROFSHIFT, offsetof(struct paca_struct, prof_shift));
- DEFINE(PACAPROFBUFFER, offsetof(struct paca_struct, prof_buffer));
- DEFINE(PACAPROFSTEXT, offsetof(struct paca_struct, prof_stext));
DEFINE(PACA_EXGEN, offsetof(struct paca_struct, exgen));
DEFINE(PACA_EXMC, offsetof(struct paca_struct, exmc));
DEFINE(PACA_EXSLB, offsetof(struct paca_struct, exslb));
===== arch/ppc64/kernel/head.S 1.67 vs edited =====
--- 1.67/arch/ppc64/kernel/head.S Mon Jul 5 20:27:11 2004
+++ edited/arch/ppc64/kernel/head.S Tue Jul 13 22:41:02 2004
@@ -317,36 +317,11 @@
label##_Iseries: \
mtspr SPRG1,r13; /* save r13 */ \
EXCEPTION_PROLOG_ISERIES_1(PACA_EXGEN); \
- lbz r10,PACAPROFENABLED(r13); \
- cmpwi r10,0; \
- bne- label##_Iseries_profile; \
-label##_Iseries_prof_ret: \
lbz r10,PACAPROCENABLED(r13); \
cmpwi 0,r10,0; \
beq- label##_Iseries_masked; \
EXCEPTION_PROLOG_ISERIES_2; \
b label##_common; \
-label##_Iseries_profile: \
- ld r12,PACALPPACA+LPPACASRR1(r13); \
- andi. r12,r12,MSR_PR; /* Test if in kernel */ \
- bne label##_Iseries_prof_ret; \
- ld r11,PACALPPACA+LPPACASRR0(r13); \
- ld r12,PACAPROFSTEXT(r13); /* _stext */ \
- subf r11,r12,r11; /* offset into kernel */ \
- lwz r12,PACAPROFSHIFT(r13); \
- srd r11,r11,r12; \
- lwz r12,PACAPROFLEN(r13); /* profile table length - 1 */ \
- cmpd r11,r12; /* off end? */ \
- ble 1f; \
- mr r11,r12; /* force into last entry */ \
-1: sldi r11,r11,2; /* convert to offset */ \
- ld r12,PACAPROFBUFFER(r13);/* profile buffer */ \
- add r12,r12,r11; \
-2: lwarx r11,0,r12; /* atomically increment */ \
- addi r11,r11,1; \
- stwcx. r11,0,r12; \
- bne- 2b; \
- b label##_Iseries_prof_ret
#ifdef DO_SOFT_DISABLE
#define DISABLE_INTS \
===== arch/ppc64/kernel/iSeries_setup.c 1.27 vs edited =====
--- 1.27/arch/ppc64/kernel/iSeries_setup.c Fri Jul 2 15:23:46 2004
+++ edited/arch/ppc64/kernel/iSeries_setup.c Tue Jul 13 22:38:29 2004
@@ -36,6 +36,7 @@
#include <asm/pgtable.h>
#include <asm/mmu_context.h>
#include <asm/cputable.h>
+#include <asm/sections.h>
#include <asm/time.h>
#include "iSeries_setup.h"
@@ -54,17 +55,12 @@
#include <asm/iSeries/mf.h>
/* Function Prototypes */
-extern void abort(void);
extern void ppcdbg_initialize(void);
-extern void iSeries_pcibios_init(void);
extern void tce_init_iSeries(void);
static void build_iSeries_Memory_Map(void);
static void setup_iSeries_cache_sizes(void);
static void iSeries_bolt_kernel(unsigned long saddr, unsigned long eaddr);
-extern void build_valid_hpte(unsigned long vsid, unsigned long ea, unsigned long pa,
- pte_t *ptep, unsigned hpteflags, unsigned bolted);
-static void iSeries_setup_dprofile(void);
extern void iSeries_setup_arch(void);
extern void iSeries_pci_final_fixup(void);
@@ -77,16 +73,10 @@
static unsigned long tbFreqMhz;
static unsigned long tbFreqMhzHundreths;
-unsigned long dprof_shift;
-unsigned long dprof_len;
-unsigned int *dprof_buffer;
-
int piranha_simulator;
int boot_cpuid;
-extern char _end[];
-
extern int rd_size; /* Defined in drivers/block/rd.c */
extern unsigned long klimit;
extern unsigned long embedded_sysmap_start;
@@ -366,30 +356,6 @@
}
*p = 0;
- if (strstr(cmd_line, "dprofile=")) {
- for (q = cmd_line; (p = strstr(q, "dprofile=")) != 0; ) {
- unsigned long size, new_klimit;
-
- q = p + 9;
- if ((p > cmd_line) && (p[-1] != ' '))
- continue;
- dprof_shift = simple_strtoul(q, &q, 0);
- dprof_len = (unsigned long)_etext -
- (unsigned long)_stext;
- dprof_len >>= dprof_shift;
- size = ((dprof_len * sizeof(unsigned int)) +
- (PAGE_SIZE-1)) & PAGE_MASK;
- dprof_buffer = (unsigned int *)((klimit +
- (PAGE_SIZE-1)) & PAGE_MASK);
- new_klimit = ((unsigned long)dprof_buffer) + size;
- lmb_reserve(__pa(klimit), (new_klimit-klimit));
- klimit = new_klimit;
- memset(dprof_buffer, 0, size);
- }
- }
-
- iSeries_setup_dprofile();
-
mf_init();
mf_initialized = 1;
mb();
@@ -834,22 +800,6 @@
if (embedded_sysmap_end)
klimit = KERNELBASE + ((embedded_sysmap_end + 4095) &
0xfffffffffffff000);
- }
-}
-
-static void iSeries_setup_dprofile(void)
-{
- if (dprof_buffer) {
- unsigned i;
-
- for (i = 0; i < NR_CPUS; ++i) {
- paca[i].prof_shift = dprof_shift;
- paca[i].prof_len = dprof_len - 1;
- paca[i].prof_buffer = dprof_buffer;
- paca[i].prof_stext = (unsigned *)_stext;
- mb();
- paca[i].prof_enabled = 1;
- }
}
}
===== arch/ppc64/kernel/irq.c 1.62 vs edited =====
--- 1.62/arch/ppc64/kernel/irq.c Fri Jul 2 15:23:46 2004
+++ edited/arch/ppc64/kernel/irq.c Tue Jul 13 22:42:12 2004
@@ -803,18 +803,6 @@
*mask = new_value;
-#ifdef CONFIG_PPC_ISERIES
- {
- unsigned i;
- for (i=0; i<NR_CPUS; ++i) {
- if ( paca[i].prof_buffer && cpu_isset(i, new_value) )
- paca[i].prof_enabled = 1;
- else
- paca[i].prof_enabled = 0;
- }
- }
-#endif
-
return full_count;
}
===== arch/ppc64/kernel/misc.S 1.83 vs edited =====
--- 1.83/arch/ppc64/kernel/misc.S Thu Jun 17 15:46:06 2004
+++ edited/arch/ppc64/kernel/misc.S Tue Jul 13 23:59:50 2004
@@ -453,12 +449,6 @@
bdnz 00b
sync
blr
-
-_GLOBAL(abs)
- cmpi 0,r3,0
- bge 10f
- neg r3,r3
-10: blr
_GLOBAL(_get_PVR)
mfspr r3,PVR
===== arch/ppc64/kernel/smp.c 1.71 vs edited =====
--- 1.71/arch/ppc64/kernel/smp.c Fri Jul 2 15:23:46 2004
+++ edited/arch/ppc64/kernel/smp.c Tue Jul 13 23:37:04 2004
@@ -586,10 +586,7 @@
void smp_local_timer_interrupt(struct pt_regs * regs)
{
- if (!--(get_paca()->prof_counter)) {
- update_process_times(user_mode(regs));
- (get_paca()->prof_counter)=get_paca()->prof_multiplier;
- }
+ update_process_times(user_mode(regs));
}
void smp_message_recv(int msg, struct pt_regs *regs)
@@ -825,8 +822,6 @@
/* Fixup boot cpu */
smp_store_cpu_info(boot_cpuid);
cpu_callin_map[boot_cpuid] = 1;
- paca[boot_cpuid].prof_counter = 1;
- paca[boot_cpuid].prof_multiplier = 1;
#ifndef CONFIG_PPC_ISERIES
paca[boot_cpuid].next_jiffy_update_tb = tb_last_stamp = get_tb();
@@ -872,8 +867,6 @@
if (system_state == SYSTEM_BOOTING && !cpu_present_at_boot(cpu))
return -ENOENT;
- paca[cpu].prof_counter = 1;
- paca[cpu].prof_multiplier = 1;
paca[cpu].default_decr = tb_ticks_per_jiffy / decr_overclock;
if (!(cur_cpu_spec->cpu_features & CPU_FTR_SLB)) {
===== include/asm-ppc64/paca.h 1.19 vs edited =====
--- 1.19/include/asm-ppc64/paca.h Fri Jul 2 15:23:46 2004
+++ edited/include/asm-ppc64/paca.h Tue Jul 13 22:32:42 2004
@@ -99,21 +99,6 @@
*/
struct ItLpPaca lppaca __attribute__((aligned(0x80)));
struct ItLpRegSave reg_save;
-
- /*
- * iSeries profiling support
- *
- * FIXME: do we still want this, or can we ditch it in favour
- * of oprofile?
- */
- u32 *prof_buffer; /* iSeries profiling buffer */
- u32 *prof_stext; /* iSeries start of kernel text */
- u32 prof_multiplier;
- u32 prof_counter;
- u32 prof_shift; /* iSeries shift for profile
- * bucket size */
- u32 prof_len; /* iSeries length of profile */
- u8 prof_enabled; /* 1=iSeries profiling enabled */
};
#endif /* _PPC64_PACA_H */
** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/
More information about the Linuxppc64-dev
mailing list