Kevin, On Tue, Jul 10, 2007 at 10:54:59AM -0500, Kevin Corry wrote: > 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
True. That is the part I'd like to cleanup. I don't think it belongs to perfmon.c > 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. > Yes, that was my point about "draw the line", i.e., how to best abstract the needs of the various x86 modules. > 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. > Yes. > > 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? > Yes, I think that's the best way of doing this. Now people may argue about indirect function on the context switch path. But this is due to the hardware complexity we have to deal with. Thus the importance of having a true PMU architecture. -- -Stephane _______________________________________________ perfmon mailing list [email protected] http://www.hpl.hp.com/hosted/linux/mail-archives/perfmon/
