From: William C. <wc...@re...> - 2006-03-29 21:49:09
|
John Levon wrote: > On Mon, Mar 27, 2006 at 11:09:57AM -0500, William Cohen wrote: > > >>I have gotten oprofile to make use of the new perfmon2 mechanism to >>collect samples. I currently have this running on my AMD64 laptop. The > > > What actual benefits does this bring? AIUI perfmon2 is not yet > sufficiently ported so that we can throw away all our near-duplicate > code, and neither is it clear that the patches as they stand are going > to be merged into Linus's kernel. To mainly see how far off the current perfmon2 patches were from supporting instrumentation tools such as OProfile. As I mentioned there are lots of rough edges in the current implementation. This was to get some feedback on concrete code and come up with something better. >>corrected. The patches borrow heavily from the previous ia64 >>oprofile/perfmon support. > > > Does this mean we have to run around doing userspace IPIs still? I still > want that fixed in perfmon. > > >>Rather than directly setting up the bits for the performance monitoring >>hardware libpfm is used to map the name to the appropriate bits. For >>processors with complicated constraints on the performance monitoring >>hardware this makes more sense than trying to duplicate the constraints >>mechanism in oprofile. > > > Does this support HT properly? That is, can it be made aware of the > requirement that we need to separate out the samples for each of the 2 > threads? > > >>libpfm: >>-make event mapping complete (lots of events missing for various processors) >>-libpfm isn't available on some procesors that perfmon supports (e.g. >>p4/ppc64) > > > What happened with the naming synchronisation effort? The naming inconsistencies between libpfm and oprofile are becoming apparent. For the events without unit masks there should be a agreed upon name. Within the performance monitoring documentation there has been inconsistent naming. There is also the philisophical difference that libpfm has no concept of event masks. There are just event names in libpfm. Thus, DISPATCHED_FPU_OPS with "Add pip ops" in oprofile becomes "DISPATCHED_FPU_OPS_ADD in libpfm. >>+ # need to get the appropriate perfmon module installed >>+ # FIXME need to remove them when they are not needed > > > Why isn't this done automatically in the kernel??? I would like to do that in the kernel. However, I didn't know how to do that off hand in the case that there are different modules that it could be dependent on based on the processor. >>+#define op_pfm_unload_context(fd) \ >>+ perfmonctl(fd, PFM_UNLOAD_CONTEXT, NULL, 0) >>+ >>+#else >>+ >>+/* wrapper to allow older perfmon interface to be used */ >>+#define op_pfm_create_context(ctx) pfm_create_context(ctx, NULL, 0) > > > So the new pfm hasn't bothered to provide a proper API?? This was to use the documented interface without removing the old perfmon interface. -Will |