Christoph,

On Sun, Jul 01, 2007 at 08:57:14AM +0200, Christoph Pospiech wrote:
> 
> I have been porting an application from perfctr (and also from AIX with 
> bos.pmapi) to perfmon2. I was looking for something like a "short 
> description", that was available for the other two platforms. More precisely 
> I was looking for a two to six word string, that is more informative than the 
> name of the event, but shorter than the description, which can span several 
> lines.
> 
Libpfm does not have provision for something in between the event name and the 
description. The level of details of the description depends on the PMU model.
Some event tables are automatically generated from the documentation, others
were manually typed in. That is why the "mileage" may vary.

> I was looking in the header files perfmon.h and pfmlib.h, but couldn't find 
> anything. I worked around by writing a string manipulation subroutine that 
> took the description returned by pfm_get_event_description, removed 
> initial "Number of" and "Total number of", and chopped off the string at the 
> first "." or ",". Not surprisingly, my mileage varied.
> 
> Any better solution that that ? If not there, could it be added to the libpfm 
> API ?
You could build this like you did but I don't think you can provide any 
guarantee
on the results. The better option would be to add an interface for "short 
description".
Existing tables could be extended, but default to event names if short 
description
not present.

> 
> Having said this, I really appreciate the detailed descriptions, as they are 
> very precise. But I am looking for the choice between short and detailed.

Thanks.

-- 
-Stephane
_______________________________________________
perfmon mailing list
[email protected]
http://www.hpl.hp.com/hosted/linux/mail-archives/perfmon/

Reply via email to