Hi,
In this version the tedious repetition was taken away from the
code by using a helper that increments the PMCs based on specified
conditions.
As far as Avocado test goes, the performance is the same as the previous
version. All PMU-EBB kernel selftests are also passing. Basically we have
the same benefits from v1 but 150+ lines shorter.
changes from v1:
- former patches 2-6: removed
- new patch 2:
* added inc_spr_if_cond() helper
- new patch 3:
* add insn count for PMCs 1-4
- patch 4 (former 7):
* use a loop to reduce code repetition when checking for counter
overflows
- v1 link: https://lists.gnu.org/archive/html/qemu-devel/2021-12/msg03871.html