diff options
author | Emilio G. Cota <cota@braap.org> | 2018-08-16 23:29:49 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2018-08-23 18:46:25 +0200 |
commit | 996e8d9a45f74fd59a8aa5fa78102e1d8981a945 (patch) | |
tree | aed1547f9fa9c40978697004363c0f281e0b6068 /include/qemu | |
parent | 0a22777c7120deafcfc5d680227293145f6f062c (diff) | |
download | qemu-996e8d9a45f74fd59a8aa5fa78102e1d8981a945.zip qemu-996e8d9a45f74fd59a8aa5fa78102e1d8981a945.tar.gz qemu-996e8d9a45f74fd59a8aa5fa78102e1d8981a945.tar.bz2 |
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>
Diffstat (limited to 'include/qemu')
-rw-r--r-- | include/qemu/qsp.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/qemu/qsp.h b/include/qemu/qsp.h index 209480b..f8c6c96 100644 --- a/include/qemu/qsp.h +++ b/include/qemu/qsp.h @@ -24,5 +24,6 @@ void qsp_report(FILE *f, fprintf_function cpu_fprintf, size_t max, bool qsp_is_enabled(void); void qsp_enable(void); void qsp_disable(void); +void qsp_reset(void); #endif /* QEMU_QSP_H */ |