Re: [Qemu-devel] [RFC 4/7] break/watchpoints: store inside array

2016-06-17 Thread Paolo Bonzini
On 17/06/2016 18:33, Alex Bennée wrote: > @@ -807,18 +807,17 @@ int cpu_watchpoint_insert_with_ref(CPUState *cpu, vaddr > addr, vaddr len, > wp->flags = flags; > wp->ref = ref; > } else { > -wp = g_malloc(sizeof(*wp)); > - > -wp->vaddr = addr; > -wp

[Qemu-devel] [RFC 4/7] break/watchpoints: store inside array

2016-06-17 Thread Alex Bennée
Instead of dynamically allocating each break/watchpoint just include in the array. This will make it easier to use RCU to update the array as well as make the scanning of the current list more cache-line friendly. Signed-off-by: Alex Bennée --- cpu-exec.c | 2 +- exec.c