Hi Stephane,

Why couldn't find event transparently decode event masks?

phil

On Tue, 2006-08-22 at 03:28 -0700, Stephane Eranian wrote:
> hello,
> 
> As we expose unit masks directly to pplications using the libpfm,
> some interfaces must be extended and/or added to make it easier
> to managed unit masks.
> 
> For instance, in the latest release we have issues on Pentium 4
> for the following function:
>       - pfm_get_cycle_event(): the default cycle event on P4 has a unit
>         mask defined, yet the function does not return it.
> 
> It is not too difficult to see that the other functions might have a
> problems too, such as :
>       - pfm_get_retired_event()
> 
> Similarly, it would be nice to have function that knows directly how to
> deal with event+unit mask all at once:
>       - pfm_find_event()
>       - pfm_get_event_name()
> 
> Let's take the example of pfm_find_event() which takes a string and
> returns in a parameter, the event descriptor. It would be nice to have
> another function (to maintain some backward compatiblity) that can take
> an event string of the form "event_name:unit_mask1:unit_mask2" and return
> both the event descriptor and the list of unit mask descriptors. The
> function prototype could look as follows:
>       int pfm_find_event_and_masks(char *str, pfmlib_event_t *e);
> 
> We could do the same thing for pfm_get_event_name():
>       int pfm_get_event_and_masks_name(pfmlib_event_t *e, char *str, size_t 
> maxlen);
> 
> As for get_cycle_event and get_inst_retired_event, they could be modified
> similarly:
>       - int pfm_get_cycle_event(pfmlib_event_t *e);
>       - int pfm_get_inst_retired_event(pfmlib_event_t *e);
> 
> Any opinion?
> Anybody interested?
> 
> PS: some of the libpfm examples would need to be updated accordingly.
> 

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

Reply via email to