def type_string(self):
        '''
        Returns the names of the flags that are set in the Type field

        It can be used to format the counter.
        '''
        type = self.get_info()['type']
        type_list = []
        for member in dir(self):
            if member.startswith("PERF_"):
                bit = getattr(self, member)
                if bit and bit & type:
                    type_list.append(member[5:])
        return type_list
Returns the names of the flags that are set in the Type field

        It can be used to format the counter.