]> git.proxmox.com Git - mirror_qemu.git/commit
qsp: add qsp_reset
authorEmilio G. Cota <cota@braap.org>
Fri, 17 Aug 2018 03:29:49 +0000 (23:29 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 23 Aug 2018 16:46:25 +0000 (18:46 +0200)
commit996e8d9a45f74fd59a8aa5fa78102e1d8981a945
treeaed1547f9fa9c40978697004363c0f281e0b6068
parent0a22777c7120deafcfc5d680227293145f6f062c
qsp: add qsp_reset

I first implemented this by deleting all entries in the global
hash table. But doing that safely slows down profiling, since
we'd need to introduce rcu_read_lock/unlock in the fast path.

What's implemented here avoids messing with the thread-local
data in the global hash table. It achieves this by taking a snapshot
of the current state, so that subsequent reports present the delta
wrt to the snapshot.

Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
include/qemu/qsp.h
util/qsp.c