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.
Brian Cain (2):
hw/hexagon: model PCYCLE counter
target/hexagon: mark clock-backed register reads as I/O
include/hw/hexagon/hexagon_globalreg.h | 6 ++
target/hexagon/cpu.h | 2 -
target/hexagon/cpu_helper.h | 6 --
target/hexagon/gen_tcg_sys.h | 12 ++-
target/hexagon/helper.h | 2 +
target/hexagon/translate.h | 2 -
hw/hexagon/hexagon_globalreg.c | 142 ++++++++++++++++++++++++-
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 +-
16 files changed, 259 insertions(+), 127 deletions(-)
--
2.34.1