import re


def get_perf_event(data, separator="      "):
    """
    From data, Read the numbers provided by perf
    :param data: The output to process
    :param separator: In perf, it is usally number+<separator>+descriptor>
    :return: A dict of all the values found by perf
    """

    data = str(data)
    result = dict()

    line = re.findall("\d+(?:,\d+)*" + separator + "(?:[^\s]+)", data)
    for counter in line:
        value = re.findall("\d+(?:,\d+)*", counter)[0]
        name = re.findall("\d+(?:,\d+)*" + separator + "([^\s]+)", counter)[0]
        result[name] = int(value.replace(',', ''))

    return result