From: Dave J. <da...@us...> - 2001-08-20 19:46:17
|
Update of /cvsroot/oprofile/oprofile In directory usw-pr-cvs1:/tmp/cvs-serv23028 Modified Files: ChangeLog oprofile.c Log Message: * pp/oprofpp.c: use EXIT_FAILURE | EXIT_SUCCESS in exit() calls. * oprofile.c: Make non-exported functions static and remove some duplicate definitions. Index: ChangeLog =================================================================== RCS file: /cvsroot/oprofile/oprofile/ChangeLog,v retrieving revision 1.87 retrieving revision 1.88 diff -u -d -r1.87 -r1.88 --- ChangeLog 2001/08/19 20:23:02 1.87 +++ ChangeLog 2001/08/20 19:46:13 1.88 @@ -1,3 +1,10 @@ +2001-08-20 Dave Jones <da...@su...> + + * pp/oprofpp.c: use EXIT_FAILURE | EXIT_SUCCESS + in exit() calls. + * oprofile.c: Make non-exported functions static + and remove duplicate definitions. + 2001-08-19 John Levon <mo...@co...> * dae/op_start: handle celeries in cpu type Index: oprofile.c =================================================================== RCS file: /cvsroot/oprofile/oprofile/oprofile.c,v retrieving revision 1.73 retrieving revision 1.74 diff -u -d -r1.73 -r1.74 --- oprofile.c 2001/08/19 20:09:17 1.73 +++ oprofile.c 2001/08/20 19:46:13 1.74 @@ -39,16 +39,16 @@ pid_t pgrp_filter; /* the MSRs we need */ -uint ctrlreg0 = MSR_IA32_EVNTSEL0; -uint ctrlreg1 = MSR_IA32_EVNTSEL1; -uint ctrlreg2 = MSR_K7_PERFCTL2; -uint ctrlreg3 = MSR_K7_PERFCTL3; -uint ctrreg0 = MSR_IA32_PERFCTR0; -uint ctrreg1 = MSR_IA32_PERFCTR1; -uint ctrreg2 = MSR_K7_PERFCTR2; -uint ctrreg3 = MSR_K7_PERFCTR3; +static u32 ctrlreg0 = MSR_IA32_EVNTSEL0; +static u32 ctrlreg1 = MSR_IA32_EVNTSEL1; +static u32 ctrlreg2 = MSR_K7_PERFCTL2; +static u32 ctrlreg3 = MSR_K7_PERFCTL3; +static u32 ctrreg0 = MSR_IA32_PERFCTR0; +static u32 ctrreg1 = MSR_IA32_PERFCTR1; +static u32 ctrreg2 = MSR_K7_PERFCTR2; +static u32 ctrreg3 = MSR_K7_PERFCTR3; -u32 prof_on __cacheline_aligned; +static u32 prof_on __cacheline_aligned; static int op_major; int cpu_type; @@ -61,15 +61,6 @@ extern spinlock_t map_lock; -extern unsigned int ctrlreg0; -extern unsigned int ctrlreg1; -extern unsigned int ctrlreg2; -extern unsigned int ctrlreg3; -extern unsigned int ctrreg0; -extern unsigned int ctrreg1; -extern unsigned int ctrreg2; -extern unsigned int ctrreg3; - /* ---------------- NMI handler ------------------ */ /* FIXME: this whole handler would probably be better in straight asm */ @@ -152,14 +143,14 @@ /* this masking code is unsafe and nasty but might deal with the small * race when installing the NMI entry into the IDT */ -void mask_lvtpc(void * e) +static void mask_lvtpc(void * e) { ulong v = apic_read(APIC_LVTPC); lvtpc_masked = v & APIC_LVT_MASKED; apic_write(APIC_LVTPC, v | APIC_LVT_MASKED); } -void unmask_lvtpc(void * e) +static void unmask_lvtpc(void * e) { if (!lvtpc_masked) apic_write(APIC_LVTPC, apic_read(APIC_LVTPC) & ~APIC_LVT_MASKED); @@ -560,7 +551,7 @@ /* we have to have another thread because we can't * do wake_up() from NMI due to no locking */ -int oprof_thread(void *arg) +static int oprof_thread(void *arg) { int i; @@ -592,7 +583,7 @@ return 0; } -void oprof_start_thread(void) +static void oprof_start_thread(void) { init_completion(&threadstop); diethreaddie = 0; @@ -600,7 +591,7 @@ printk(KERN_ERR "oprofile: couldn't spawn wakeup thread.\n"); } -void oprof_stop_thread(void) +static void oprof_stop_thread(void) { diethreaddie = 1; kill_proc(SIGKILL, threadpid, 1); @@ -1124,7 +1115,7 @@ /* NOTE: we do *not* support sysctl() syscall */ -int __init init_sysctl(void) +static int __init init_sysctl(void) { ctl_table *next = &oprof_table[nr_oprof_static]; ctl_table *counter_table[OP_MAX_COUNTERS + 1]; @@ -1166,7 +1157,7 @@ return -EFAULT; } -void __exit cleanup_sysctl(void) +static void __exit cleanup_sysctl(void) { int i; ctl_table *next = &oprof_table[nr_oprof_static]; |