From a9b460cfe9193d2a7e4ef92e75485957602b239d Mon Sep 17 00:00:00 2001 From: David Brazdil Date: Sat, 24 Sep 2022 00:43:41 +0100 Subject: [PATCH] pkvm: Prefix metrics when running on A0 chip A0 and B0 chips have different performance characteristics when it comes to the hypervisor because B0 waits for SysMMU_SYNCs to complete during every memory ownership transaction. Set debug.hypervisor.metrics_tag=hwrev_a0 on PROTO1.x and EVT1.0 devices. EVT1.1 and later are B0 and benchmarks are representative of production devices. This is only done on userdebug/eng builds. Test: 'getprop | grep hypervisor' on A0/B0 devices Change-Id: I0c81a0e4706a13cd63358de23048087a9190b9da --- conf/init.debug.rc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/conf/init.debug.rc b/conf/init.debug.rc index b7512e4e..4d5e4c77 100644 --- a/conf/init.debug.rc +++ b/conf/init.debug.rc @@ -32,3 +32,12 @@ on post-fs-data chown bluetooth system /dev/logbuffer_btlpm chown bluetooth system /dev/logbuffer_btpower chown bluetooth system /dev/logbuffer_tty18 + +# pKVM performance is different on A0 and B0 chips. +# Add extra tag to metrics collected on A0 to separate the results. +on property:ro.revision=PROTO1.0 + setprop debug.hypervisor.metrics_tag "hwrev_a0" +on property:ro.revision=PROTO1.1 + setprop debug.hypervisor.metrics_tag "hwrev_a0" +on property:ro.revision=EVT1.0 + setprop debug.hypervisor.metrics_tag "hwrev_a0"