mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
trace: Trace qemu_malloc() and qemu_vmalloc()
It is often useful to instrument memory management functions in order to find leaks or performance problems. This patch adds trace events for the memory allocation primitives. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
This commit is contained in:
parent
81a97d9d97
commit
cd245a1932
3 changed files with 38 additions and 8 deletions
10
trace-events
10
trace-events
|
@ -27,3 +27,13 @@
|
|||
# system may not have the necessary headers included.
|
||||
#
|
||||
# The <format-string> should be a sprintf()-compatible format string.
|
||||
|
||||
# qemu-malloc.c
|
||||
disable qemu_malloc(size_t size, void *ptr) "size %zu ptr %p"
|
||||
disable qemu_realloc(void *ptr, size_t size, void *newptr) "ptr %p size %zu newptr %p"
|
||||
disable qemu_free(void *ptr) "ptr %p"
|
||||
|
||||
# osdep.c
|
||||
disable qemu_memalign(size_t alignment, size_t size, void *ptr) "alignment %zu size %zu ptr %p"
|
||||
disable qemu_valloc(size_t size, void *ptr) "size %zu ptr %p"
|
||||
disable qemu_vfree(void *ptr) "ptr %p"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue