From: William C. <wc...@re...> - 2010-08-23 14:31:54
|
On 08/23/2010 08:42 AM, Remi Savoye wrote: > Hello all. > > I would like to make an estimation about the efforts I could need to port oProfile to another architecture, SH4. > > Is it as complex as Valgrind ? > How long hours do you think is needed for this ? > Is someone interested in starting such a project ? > > Thanks. > Regards. Hi Remi, In theory oprofile should work in timer mode on most processors with little or no work. There appears to be some support alread in the kernel SH processor. Looking at the arch/sh/Kconfig in the upstream kernels there is a line in the SUPERH section of the file: select HAVE_OPROFILE If possible you, see if the oprofile in timer mode is sufficient. That should be the quickest and easiest way to make use of oprofile on SH processor. Check to see if there is a CONFIG_OPROFILE=y or CONFIG_OPROFILE=m in the kernel config file. If it isn't there try to build a kernel with CONFIG_OPROFILE=y or CONFIG_OPROFILE=m. Access to the actual performance monitoring hardware on the processor would require more work. However, it would be less involved that Valgrind. Valgrind has to understand the instructions to take them apart, insert instrumentation, and generate new instructions. OProfile needs to have something identify the processor type in the kernel, code to set up performance monitoring hardware, and handle the interrupts created by the performance monitoring hardware. The user space needs lists to map the event names to numbers. The rest of oprofile generically handles the transport of samples from kernel to user space and mapping the samples to the executable code. -Will PS I don't know how much experience you have with the kernel. If you are looking for more information to get familiar with the kernel, the site http://kernelnewbies.org/ is helpful. |