aboutsummaryrefslogtreecommitdiff
path: root/qdev-monitor.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2014-03-28 16:25:07 +0100
committerAndreas Färber <afaerber@suse.de>2014-03-31 19:28:38 +0200
commit0d6d1ab4990b6e8c6f24e9b1308801d657d411ad (patch)
treee80fcd044516d50dadf27226fb25facebb783e0a /qdev-monitor.c
parentc8c14bcb72e436fb4aff99b4b2b92e44f2e715b5 (diff)
downloadqemu-0d6d1ab4990b6e8c6f24e9b1308801d657d411ad.zip
qemu-0d6d1ab4990b6e8c6f24e9b1308801d657d411ad.tar.gz
qemu-0d6d1ab4990b6e8c6f24e9b1308801d657d411ad.tar.bz2
cpu: Avoid QOM casts for CPU()
CPU address spaces touching load and store helpers as well as the movement of (almost) all fields from CPU_COMMON to CPUState have led to a noticeable increase of CPU() usage in "hot" paths for both TCG and KVM. While CPU()'s OBJECT_CHECK() might help detect development errors, i.e. in form of crashes due to QOM vs. non-QOM mismatches rather than QOM type mismatches, it is not really needed at runtime since mostly used in CPU-specific paths, coming from a target-specific CPU subtype. If that pointer is damaged, other errors are highly likely to occur elsewhere anyway. Keep the CPU() macro for a consistent developer experience and for flexibility to exchange its implementation, but turn it into a pure, unchecked C cast for now. Compare commit 6e42be7cd10260fd3a006d94f6c870692bf7a2c0. Reported-by: Laurent Desnogues <laurent.desnogues@gmail.com> Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'qdev-monitor.c')
0 files changed, 0 insertions, 0 deletions