Hi Stephane,

On Tue July 10 2007 9:59 am, Stephane Eranian wrote:
> On Tue, Jul 10, 2007 at 08:44:31AM -0500, Kevin Corry wrote:
> > Base PowerPC changes to support the new Cell PMU module. Most notably,
> > this adds a table of function pointers to the pfm_arch_pmu_info
> > structure, which
>
> I was tempted to do this as well for x86 to try and cleanup the
> arch/perfmon.c file, esepcially with regards to features such as PEBS.

The i386 code seems to do this to a limited extent already. There are function 
pointers for pfm_stop_save() and pfm_has_ovfl(), and they get initialized in 
pfm_arch_pmu_config_init(). However, the PMU-specific implementations of 
those routines are still in perfmon.c. It would obviously be pretty simple to 
move those routines to the PMU-specific files, but perfmon.c would still have 
to know the names of those routines to do the initialization.

By putting pointers to the routines in each PMU-specific pfm_arch_pmu_info 
structure, the core perfmon.c doesn't need to know anything about any 
specific PMU except the name of the kernel module.

> Following the Itanium model, I would expect perfmon.c to contain only
> architected PMU code and then hooks for model specific features which would
> then be burried into the PMU description modules. That would make it for a
> much more flexible environment. The difficulties is where you draw the line
> between perfmon.c and the description module.

So, do you agree with this approach for the PowerPC code? Is there anything 
you'd prefer be done differently?

Thanks,
-- 
Kevin Corry
[EMAIL PROTECTED]
http://www.ibm.com/linux/
_______________________________________________
perfmon mailing list
[email protected]
http://www.hpl.hp.com/hosted/linux/mail-archives/perfmon/

Reply via email to