The goal of perfmon2 is to provide access to the hardware performance counters present in all modern processors with focus on becoming flexible, generic and extendible. It currently isn't part of the standard Linux kernel and in beta status.