I need to read the values for the counter to count L2 cache misses. I have tried pfm_find_full_event(). But this function only takes the string specifying the name of the event and the event identifier but takes no parameter for the unit mask. There are some other functions, such as, pfm_get_event_mask_name or pfm_get_event_mask_description. But I cannot use these to read the counters calues. Which interface should I use to specify the unit mask to read the particular counter value? For example, for L2 cache misses the event is L2_LINES_IN has four masks.The values of the unit maska are:  0 for this core, 1 for both cores, 2 for all inclusive and 3 fr hardware prefetch only. How can I specify which unit mask I need to consider?