oprofile perfmon support take 2
PATCH 1/1 oprofile perfmon support take 2
My previous patch was buggy; due to the way interaction with userspace works, we could have left samples arriving after the sample buffers were deleted. The simplest solution is to block samples if they arrive.
regards
john
Index: linux-cvs//arch/ia64/oprofile/Makefile =================================RCS file: /home/cvs/linux-2.5/arch/ia64/oprofile/Makefile,v retrieving revision 1.2
/arch/ia64/oprofile/Makefile +1 -0
@@ -7,3 +7,4 @@ DRIVER_OBJS := $(addprefix ../../../driv timer_int.o ) oprofile-y := $(DRIVER_OBJS) init.o +oprofile-$(CONFIG_PERFMON) += perfmon.o
Index: linux-cvs//arch/ia64/oprofile/init.c =================================RCS file: /home/cvs/linux-2.5/arch/ia64/oprofile/init.c,v retrieving revision 1.2
/arch/ia64/oprofile/init.c +8 -1
@@ -12,14 +12,21 @@#include <linux/init.h> #include <linux/errno.h> -extern void timer_init (struct oprofile_operations ** ops); +extern int perfmon_init (struct oprofile_operations ** ops); +extern void perfmon_exit (void );int __init oprofile_arch_init (struct oprofile_operations ** ops) { +#ifdef CONFIG_PERFMON +return perfmon_init (ops); +#endif return -ENODEV ; }void oprofile_arch_exit (void ) { +#ifdef CONFIG_PERFMON +perfmon_exit (); +#endif }
arch/ia64/oprofile/perfmon.c new file +105 -0
105 lines not on this page · raw message