• Will Deacon's avatar
    ARM: 6069/1: perf-events: use numeric ID to identify PMU · 181193f3
    Will Deacon authored
    The ARM perf-events framework provides support for a number of different
    PMUs using struct arm_pmu. The char *name field of this struct can be
    used to identify the PMU, but this is cumbersome if used outside of perf.
    
    This patch replaces the name string for a PMU with an enum, which holds
    a unique ID for the PMU being represented. This ID can be used to index
    an array of names within perf, so no functionality is lost. The presence
    of the ID field, allows other kernel subsystems [currently oprofile] to
    use their own mappings for the PMU name.
    
    Cc: Jean Pihet <jpihet@mvista.com>
    Acked-by: default avatarJamie Iles <jamie.iles@picochip.com>
    Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
    Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
    181193f3
perf_event.h 1.16 KB