]> git.proxmox.com Git - mirror_qemu.git/commit - trace/control.c
trace: Allocate cpu->trace_dstate in place
authorLluís Vilanova <vilanova@ac.upc.edu>
Tue, 4 Jul 2017 08:34:19 +0000 (10:34 +0200)
committerStefan Hajnoczi <stefanha@redhat.com>
Mon, 17 Jul 2017 12:10:45 +0000 (13:10 +0100)
commitd01c05c955f7736952c13d85edaae0b262b7a0a3
tree2f0f246640d0c12e7d762f776fa1c90200c9e85e
parent4871b51b9241b10f4fd8e04bbb21577886795e25
trace: Allocate cpu->trace_dstate in place

There's little point in dynamically allocating the bitmap if we
know at compile-time the max number of events we want to support.
Thus, make room in the struct for the bitmap, which will make things
easier later: this paves the way for upcoming changes, in which
we'll use a u32 to fully capture cpu->trace_dstate.

This change also increases performance by saving a dereference and
improving locality--note that this is important since upcoming work
makes reading this bitmap fairly common.

Signed-off-by: Emilio G. Cota <cota@braap.org>
Reviewed-by: Lluís Vilanova <vilanova@ac.upc.edu>
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
Message-id: 149915725977.6295.15069969323605305641.stgit@frigg.lan
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
include/qom/cpu.h
qom/cpu.c
trace/control.c