Skip to content

Re-write PPC64 PMU instruction count using TCG Ops

Daniel Henrique Barboza qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 3 repliesIn review
  2. v18 patches 3 repliesSuperseded

Changes in v2 from the cover letter

- 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

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5target/ppc: introduce power8-pmu-insn-cnt.c.inctarget/ppc/power8-pmu-insn-cnt.c.inc target/ppc/translate.c+56 -420 replies
2/5target/ppc/power8-pmu-insn-cnt: introduce inc_spr_if_cond()target/ppc/power8-pmu-insn-cnt.c.inc+34 -91 reply
3/5target/ppc/power8-pmu-insn-cnt: add PMCs1-4 insn counttarget/ppc/power8-pmu-insn-cnt.c.inc+62 -00 replies
4/5target/ppc/power8-pmu-insn-cnt: add pmu_check_overflow()target/ppc/helper.h target/ppc/power8-pmu-insn-cnt.c.inc target/ppc/power8-pmu.c+85 -00 replies
5/5target/ppc/power8-pmu.c: remove helper_insns_inc()target/ppc/helper.h target/ppc/power8-pmu-insn-cnt.c.inc target/ppc/power8-pmu.c+0 -650 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/5] Re-write PPC64 PMU instruction count using TCG Ops

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

Daniel Henrique Barboza (5):
target/ppc: introduce power8-pmu-insn-cnt.c.inc target/ppc/power8-pmu-insn-cnt: introduce inc_spr_if_cond() target/ppc/power8-pmu-insn-cnt: add PMCs1-4 insn count target/ppc/power8-pmu-insn-cnt: add pmu_check_overflow() target/ppc/power8-pmu.c: remove helper_insns_inc()

 target/ppc/helper.h                  |   2 +-
 target/ppc/power8-pmu-insn-cnt.c.inc | 213 +++++++++++++++++++++++++++
 target/ppc/power8-pmu.c              |  60 +-------
 target/ppc/translate.c               |  44 +-----
 4 files changed, 220 insertions(+), 99 deletions(-)
 create mode 100644 target/ppc/power8-pmu-insn-cnt.c.inc
Signature · 1 line
2.33.1