aboutsummaryrefslogtreecommitdiff
path: root/qemu-timer.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2015-05-21 15:12:29 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2015-06-05 17:09:58 +0200
commitdb94604b20278c1dc227a04e4c564d80230e6c3f (patch)
treee50ac998678fe6af599a7e52054556b978fb9c4a /qemu-timer.c
parente4afbf4fb4d026510700cb40bb72dea9aef14e3b (diff)
exec: optimize phys_page_set_level
phys_page_set_level is writing zeroes to a struct that has just been filled in by phys_map_node_alloc. Instead, tell phys_map_node_alloc whether to fill in the page "as a leaf" or "as a non-leaf". memcpy is faster than struct assignment, which copies each bitfield individually. A compiler bug (https://gcc.gnu.org/PR66391), and small memcpys like this one are special-cased anyway, and optimized to a register move, so just use the memcpy. This cuts the cost of phys_page_set_level from 25% to 5% when booting qboot. Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'qemu-timer.c')
0 files changed, 0 insertions, 0 deletions