From: Will C. <wc...@re...> - 2003-04-17 13:52:35
|
I have revised the patch based on the comments I got. I eliminated the spurious include and the I shortened the variable name to oprofile_timer. I kept the oprofile prefix because the variable is outside the module. I talked to Richard Henderson about adding the the same support to the Alpha. He is willing to add it to the oprofile support for the Alpha. I don't have an Alpha machine, so I can't really develop the code. Richard said that it would be easier for him to add the Alpha version if the patch was in the kernel. What needs to be done to get the patch into the 2.5 development kernel? -Will William Cohen wrote: > Philippe Elie wrote: > >> Will Cohen wrote: >> >>> There are cases where it is useful to force the oprofile to use timer >>> mode even when there is performance monitoring hardware available on >>> the processor: >>> >>> -testing and debugging timer int code on a machine that has supported >>> perfmon hardware. >>> >>> -machines where the performance monitoring hardware does not provide >>> a time-based measure in the performance monitoring hardware, e.g. Athlon >>> >>> -when doing comparisons between different processor architectures, >>> e.g. using same software and trying to find out why one machine has >>> worse performance. >> >> >> >> - help us and user to check than on arch with cycle count we get >> the correct resultat >> >>> >>> I have a small patch to the 2.5 oprofile driver which provides a >>> oprofile_force_timer flag, that allows insmod to force the use of the >>> timer for i386. What do people think of this patch? >> >> >> >> I like it. John it's your area ? > > > I thought there might be some utility for it. > >>> --- linux-20030409/arch/i386/oprofile/init.c.timer 2003-04-10 >>> 10:43:30.000000000 -0400 >>> +++ linux-20030409/arch/i386/oprofile/init.c 2003-04-10 >>> 13:51:59.000000000 -0400 >>> @@ -7,6 +7,7 @@ >>> * @author John Levon <le...@mo...> >>> */ >>> >>> +#include <linux/sched.h> >> >> >> >> spurious diff ? > > > yes, the <linux/sched.h> was a leftover from some earlier attempts. > > -Will > >> >>> #include <linux/oprofile.h> >>> #include <linux/init.h> >>> @@ -22,7 +23,7 @@ >>> int __init oprofile_arch_init(struct oprofile_operations ** ops) >>> { >>> #ifdef CONFIG_X86_LOCAL_APIC >>> - if (!nmi_init(ops)) >>> + if (oprofile_force_timer || (!nmi_init(ops))) >>> #endif >>> timer_init(ops); >>> return 0; >> >> >> >> regards, >> Phil >> >> >> >> ------------------------------------------------------- >> This SF.net email is sponsored by: Etnus, makers of TotalView, The >> debugger for complex code. Debugging C/C++ programs can leave you >> feeling lost and disoriented. TotalView can help you find your way. >> Available on major UNIX and Linux platforms. Try it free. www.etnus.com >> _______________________________________________ >> oprofile-list mailing list >> opr...@li... >> https://lists.sourceforge.net/lists/listinfo/oprofile-list >> > > |