qemu-e2k/include/qom
Andreas Färber 0d6d1ab499 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 6e42be7cd1.

Reported-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-31 19:28:38 +02:00
..
cpu.h cpu: Avoid QOM casts for CPU() 2014-03-31 19:28:38 +02:00
object_interfaces.h add optional 2nd stage initialization to -object/object-add commands 2014-01-28 12:47:02 -05:00
object.h qom: Add check() argument to object_property_add_link() 2014-03-19 22:23:13 +01:00
qom-qobject.h qom: move include files to include/qom/ 2012-12-19 08:31:32 +01:00