The pcycle registers measure activity - a very coarse and simple PMU-like
feature.  The baseline had a "count the instructions per TB and scale a
counter" model (to be summed across vCPUs upon reg read).  But that's not
a good model and it adds work to all TBs.

Instead: we'll use time as a slightly better model, but only accumulating
when there's activity.  Using a clock is unfortunately less stable across
hosts and changes to translation, but still a net improvement all things
considered.

In v2:
- Removed "pcycle_freq_hz" property.
- Moved deletions into "remove packet-count PCYCLE implementation" patch
at the start of the series.
- Removed translator_io_start() from start/stop/wait/resume instructions:
these do not trigger I/O.
- added comment update for translator_io_start()

v1: 
https://lore.kernel.org/qemu-devel/[email protected]/

Brian Cain (4):
  target/hexagon: remove packet-count PCYCLE implementation
  hw/hexagon: model PCYCLE with virtual clock
  target/hexagon: mark clock-backed register reads as I/O
  exec: correct translator_io_start documentation

 include/exec/translator.h              |   5 +-
 include/hw/hexagon/hexagon_globalreg.h |   5 +
 target/hexagon/cpu.h                   |   2 -
 target/hexagon/cpu_helper.h            |   6 --
 target/hexagon/gen_tcg_sys.h           |   8 +-
 target/hexagon/helper.h                |   2 +
 target/hexagon/translate.h             |   2 -
 hw/hexagon/hexagon_globalreg.c         | 129 +++++++++++++++++++++++++
 target/hexagon/cpu.c                   |  10 +-
 target/hexagon/cpu_helper.c            |  79 ---------------
 target/hexagon/genptr.c                |  38 +++++++-
 target/hexagon/hexswi.c                |  10 +-
 target/hexagon/machine.c               |   2 +-
 target/hexagon/op_helper.c             |  45 +++++++++
 target/hexagon/translate.c             |  21 ----
 hw/hexagon/trace-events                |   1 +
 target/hexagon/hex_common.py           |   8 +-
 17 files changed, 244 insertions(+), 129 deletions(-)

-- 
2.34.1

Reply via email to