2021-05-17 23:16:58 +08:00
|
|
|
# See docs/devel/tracing.rst for syntax documentation.
|
2016-06-16 16:39:48 +08:00
|
|
|
|
2019-03-15 02:09:26 +08:00
|
|
|
# aio-posix.c
|
2018-09-13 01:10:39 +08:00
|
|
|
run_poll_handlers_begin(void *ctx, int64_t max_ns, int64_t timeout) "ctx %p max_ns %"PRId64 " timeout %"PRId64
|
|
|
|
run_poll_handlers_end(void *ctx, bool progress, int64_t timeout) "ctx %p progress %d new timeout %"PRId64
|
2017-02-13 21:52:18 +08:00
|
|
|
poll_shrink(void *ctx, int64_t old, int64_t new) "ctx %p old %"PRId64" new %"PRId64
|
|
|
|
poll_grow(void *ctx, int64_t old, int64_t new) "ctx %p old %"PRId64" new %"PRId64
|
2020-03-06 01:08:06 +08:00
|
|
|
poll_add(void *ctx, void *node, int fd, unsigned revents) "ctx %p node %p fd %d revents 0x%x"
|
|
|
|
poll_remove(void *ctx, void *node, int fd) "ctx %p node %p fd %d"
|
2017-02-13 21:52:18 +08:00
|
|
|
|
2019-03-15 02:09:26 +08:00
|
|
|
# async.c
|
2017-02-13 21:52:19 +08:00
|
|
|
aio_co_schedule(void *ctx, void *co) "ctx %p co %p"
|
|
|
|
aio_co_schedule_bh_cb(void *ctx, void *co) "ctx %p co %p"
|
2023-04-28 05:10:07 +08:00
|
|
|
reentrant_aio(void *ctx, const char *name) "ctx %p name %s"
|
2017-02-13 21:52:19 +08:00
|
|
|
|
2019-03-15 02:09:26 +08:00
|
|
|
# thread-pool.c
|
2017-02-13 21:52:18 +08:00
|
|
|
thread_pool_submit(void *pool, void *req, void *opaque) "pool %p req %p opaque %p"
|
|
|
|
thread_pool_complete(void *pool, void *req, void *opaque, int ret) "pool %p req %p opaque %p ret %d"
|
|
|
|
thread_pool_cancel(void *req, void *opaque) "req %p opaque %p"
|
|
|
|
|
2019-03-15 02:09:26 +08:00
|
|
|
# buffer.c
|
2016-09-15 01:03:41 +08:00
|
|
|
buffer_resize(const char *buf, size_t olen, size_t len) "%s: old %zd, new %zd"
|
|
|
|
buffer_move_empty(const char *buf, size_t len, const char *from) "%s: %zd bytes from %s"
|
|
|
|
buffer_move(const char *buf, size_t len, const char *from) "%s: %zd bytes from %s"
|
|
|
|
buffer_free(const char *buf, size_t len) "%s: capacity %zd"
|
|
|
|
|
2019-03-15 02:09:29 +08:00
|
|
|
# filemonitor-inotify.c
|
2019-03-19 23:47:47 +08:00
|
|
|
qemu_file_monitor_add_watch(void *mon, const char *dirpath, const char *filename, void *cb, void *opaque, int64_t id) "File monitor %p add watch dir='%s' file='%s' cb=%p opaque=%p id=%" PRId64
|
|
|
|
qemu_file_monitor_remove_watch(void *mon, const char *dirpath, int64_t id) "File monitor %p remove watch dir='%s' id=%" PRId64
|
2018-06-09 00:24:57 +08:00
|
|
|
qemu_file_monitor_new(void *mon, int fd) "File monitor %p created fd=%d"
|
|
|
|
qemu_file_monitor_enable_watch(void *mon, const char *dirpath, int id) "File monitor %p enable watch dir='%s' id=%u"
|
2020-09-17 15:50:24 +08:00
|
|
|
qemu_file_monitor_disable_watch(void *mon, const char *dirpath, int id) "File monitor %p disable watch dir='%s' id=%u"
|
2018-06-09 00:24:57 +08:00
|
|
|
qemu_file_monitor_event(void *mon, const char *dirpath, const char *filename, int mask, unsigned int id) "File monitor %p event dir='%s' file='%s' mask=0x%x id=%u"
|
2019-03-19 23:47:47 +08:00
|
|
|
qemu_file_monitor_dispatch(void *mon, const char *dirpath, const char *filename, int ev, void *cb, void *opaque, int64_t id) "File monitor %p dispatch dir='%s' file='%s' ev=%d cb=%p opaque=%p id=%" PRId64
|
2018-06-09 00:24:57 +08:00
|
|
|
|
2019-03-15 02:09:26 +08:00
|
|
|
# qemu-coroutine.c
|
2017-04-10 20:06:12 +08:00
|
|
|
qemu_aio_coroutine_enter(void *ctx, void *from, void *to, void *opaque) "ctx %p from %p to %p opaque %p"
|
2016-09-15 01:03:42 +08:00
|
|
|
qemu_coroutine_yield(void *from, void *to) "from %p to %p"
|
|
|
|
qemu_coroutine_terminate(void *co) "self %p"
|
|
|
|
|
2019-03-15 02:09:26 +08:00
|
|
|
# qemu-coroutine-lock.c
|
2017-02-14 02:12:39 +08:00
|
|
|
qemu_co_mutex_lock_uncontended(void *mutex, void *self) "mutex %p self %p"
|
2016-09-15 01:03:42 +08:00
|
|
|
qemu_co_mutex_lock_entry(void *mutex, void *self) "mutex %p self %p"
|
|
|
|
qemu_co_mutex_lock_return(void *mutex, void *self) "mutex %p self %p"
|
|
|
|
qemu_co_mutex_unlock_entry(void *mutex, void *self) "mutex %p self %p"
|
|
|
|
qemu_co_mutex_unlock_return(void *mutex, void *self) "mutex %p self %p"
|
|
|
|
|
2019-03-15 02:09:29 +08:00
|
|
|
# oslib-posix.c
|
2020-08-06 22:13:34 +08:00
|
|
|
# oslib-win32.c
|
2016-06-16 16:39:48 +08:00
|
|
|
qemu_memalign(size_t alignment, size_t size, void *ptr) "alignment %zu size %zu ptr %p"
|
|
|
|
qemu_anon_ram_alloc(size_t size, void *ptr) "size %zu ptr %p"
|
|
|
|
qemu_vfree(void *ptr) "ptr %p"
|
|
|
|
qemu_anon_ram_free(void *ptr, size_t size) "ptr %p size %zu"
|
|
|
|
|
2019-03-15 02:09:26 +08:00
|
|
|
# hbitmap.c
|
2016-06-16 16:39:48 +08:00
|
|
|
hbitmap_iter_skip_words(const void *hb, void *hbi, uint64_t pos, unsigned long cur) "hb %p hbi %p pos %"PRId64" cur 0x%lx"
|
|
|
|
hbitmap_reset(void *hb, uint64_t start, uint64_t count, uint64_t sbit, uint64_t ebit) "hb %p items %"PRIu64",%"PRIu64" bits %"PRIu64"..%"PRIu64
|
|
|
|
hbitmap_set(void *hb, uint64_t start, uint64_t count, uint64_t sbit, uint64_t ebit) "hb %p items %"PRIu64",%"PRIu64" bits %"PRIu64"..%"PRIu64
|
2017-01-13 02:07:54 +08:00
|
|
|
|
2019-03-15 02:09:26 +08:00
|
|
|
# lockcnt.c
|
2017-01-13 02:07:54 +08:00
|
|
|
lockcnt_fast_path_attempt(const void *lockcnt, int expected, int new) "lockcnt %p fast path %d->%d"
|
|
|
|
lockcnt_fast_path_success(const void *lockcnt, int expected, int new) "lockcnt %p fast path %d->%d succeeded"
|
|
|
|
lockcnt_unlock_attempt(const void *lockcnt, int expected, int new) "lockcnt %p unlock %d->%d"
|
|
|
|
lockcnt_unlock_success(const void *lockcnt, int expected, int new) "lockcnt %p unlock %d->%d succeeded"
|
|
|
|
lockcnt_futex_wait_prepare(const void *lockcnt, int expected, int new) "lockcnt %p preparing slow path %d->%d"
|
|
|
|
lockcnt_futex_wait(const void *lockcnt, int val) "lockcnt %p waiting on %d"
|
|
|
|
lockcnt_futex_wait_resume(const void *lockcnt, int new) "lockcnt %p after wait: %d"
|
|
|
|
lockcnt_futex_wake(const void *lockcnt) "lockcnt %p waking up one waiter"
|
trace: add qemu mutex lock and unlock trace events
These trace events were very useful to help me to understand and find a
reordering issue in vfio, for example:
qemu_mutex_lock locked mutex 0x10905ad8
vfio_region_write (0001:03:00.0:region1+0xc0, 0x2020c, 4)
qemu_mutex_unlock unlocked mutex 0x10905ad8
qemu_mutex_lock locked mutex 0x10905ad8
vfio_region_write (0001:03:00.0:region1+0xc4, 0xa0000, 4)
qemu_mutex_unlock unlocked mutex 0x10905ad8
that also helped me to see the desired result after the fix:
qemu_mutex_lock locked mutex 0x10905ad8
vfio_region_write (0001:03:00.0:region1+0xc0, 0x2000c, 4)
vfio_region_write (0001:03:00.0:region1+0xc4, 0xb0000, 4)
qemu_mutex_unlock unlocked mutex 0x10905ad8
So it could be a good idea to have these traces implemented. It's worth
mentioning that they should be surgically enabled during the debugging,
otherwise it can flood the trace logs with lock/unlock messages.
How to use it:
trace-event qemu_mutex_lock on|off
trace-event qemu_mutex_unlock on|off
or
trace-event qemu_mutex* on|off
Signed-off-by: Jose Ricardo Ziviani <joserz@linux.vnet.ibm.com>
Message-Id: <1493054398-26013-1-git-send-email-joserz@linux.vnet.ibm.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
[Also handle trylock, cond_wait and win32; trace "unlocked" while still
in the critical section, so that "unlocked" always comes before the
next "locked" tracepoint. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-04-25 01:19:58 +08:00
|
|
|
|
2019-08-19 20:48:21 +08:00
|
|
|
# qemu-sockets.c
|
|
|
|
socket_listen(int num) "backlog: %d"
|
|
|
|
|
2019-03-15 02:09:29 +08:00
|
|
|
# qemu-thread-common.h
|
2020-08-06 22:13:34 +08:00
|
|
|
# qemu-thread-posix.c
|
|
|
|
# qemu-thread-win32.c
|
2018-01-11 16:27:16 +08:00
|
|
|
qemu_mutex_lock(void *mutex, const char *file, const int line) "waiting on mutex %p (%s:%d)"
|
|
|
|
qemu_mutex_locked(void *mutex, const char *file, const int line) "taken mutex %p (%s:%d)"
|
|
|
|
qemu_mutex_unlock(void *mutex, const char *file, const int line) "released mutex %p (%s:%d)"
|
2018-01-16 14:08:54 +08:00
|
|
|
|
2019-03-15 02:09:26 +08:00
|
|
|
# vfio-helpers.c
|
2018-01-16 14:08:54 +08:00
|
|
|
qemu_vfio_dma_reset_temporary(void *s) "s %p"
|
|
|
|
qemu_vfio_ram_block_added(void *s, void *p, size_t size) "s %p host %p size 0x%zx"
|
|
|
|
qemu_vfio_ram_block_removed(void *s, void *p, size_t size) "s %p host %p size 0x%zx"
|
2020-11-03 10:07:32 +08:00
|
|
|
qemu_vfio_dump_mapping(void *host, uint64_t iova, size_t size) "vfio mapping %p to iova 0x%08" PRIx64 " size 0x%zx"
|
2018-01-16 14:08:54 +08:00
|
|
|
qemu_vfio_find_mapping(void *s, void *p) "s %p host %p"
|
2020-08-21 01:10:06 +08:00
|
|
|
qemu_vfio_new_mapping(void *s, void *host, size_t size, int index, uint64_t iova) "s %p host %p size 0x%zx index %d iova 0x%"PRIx64
|
2020-11-03 10:07:31 +08:00
|
|
|
qemu_vfio_do_mapping(void *s, void *host, uint64_t iova, size_t size) "s %p host %p <-> iova 0x%"PRIx64 " size 0x%zx"
|
|
|
|
qemu_vfio_dma_map(void *s, void *host, size_t size, bool temporary, uint64_t *iova) "s %p host %p size 0x%zx temporary %d &iova %p"
|
|
|
|
qemu_vfio_dma_mapped(void *s, void *host, uint64_t iova, size_t size) "s %p host %p <-> iova 0x%"PRIx64" size 0x%zx"
|
2018-01-16 14:08:54 +08:00
|
|
|
qemu_vfio_dma_unmap(void *s, void *host) "s %p host %p"
|
2020-11-03 10:07:28 +08:00
|
|
|
qemu_vfio_pci_read_config(void *buf, int ofs, int size, uint64_t region_ofs, uint64_t region_size) "read cfg ptr %p ofs 0x%x size 0x%x (region addr 0x%"PRIx64" size 0x%"PRIx64")"
|
|
|
|
qemu_vfio_pci_write_config(void *buf, int ofs, int size, uint64_t region_ofs, uint64_t region_size) "write cfg ptr %p ofs 0x%x size 0x%x (region addr 0x%"PRIx64" size 0x%"PRIx64")"
|
2020-11-03 10:07:29 +08:00
|
|
|
qemu_vfio_region_info(const char *desc, uint64_t region_ofs, uint64_t region_size, uint32_t cap_offset) "region '%s' addr 0x%"PRIx64" size 0x%"PRIx64" cap_ofs 0x%"PRIx32
|
2020-11-03 10:07:30 +08:00
|
|
|
qemu_vfio_pci_map_bar(int index, uint64_t region_ofs, uint64_t region_size, int ofs, void *host) "map region bar#%d addr 0x%"PRIx64" size 0x%"PRIx64" ofs 0x%x host %p"
|
2021-01-29 18:14:04 +08:00
|
|
|
|
|
|
|
#userfaultfd.c
|
2023-02-08 04:57:11 +08:00
|
|
|
uffd_detect_open_mode(int mode) "%d"
|
2021-01-29 18:14:04 +08:00
|
|
|
uffd_query_features_nosys(int err) "errno: %i"
|
|
|
|
uffd_query_features_api_failed(int err) "errno: %i"
|
|
|
|
uffd_create_fd_nosys(int err) "errno: %i"
|
|
|
|
uffd_create_fd_api_failed(int err) "errno: %i"
|
|
|
|
uffd_create_fd_api_noioctl(uint64_t ioctl_req, uint64_t ioctl_supp) "ioctl_req: 0x%" PRIx64 "ioctl_supp: 0x%" PRIx64
|
|
|
|
uffd_register_memory_failed(void *addr, uint64_t length, uint64_t mode, int err) "addr: %p length: %" PRIu64 " mode: 0x%" PRIx64 " errno: %i"
|
|
|
|
uffd_unregister_memory_failed(void *addr, uint64_t length, int err) "addr: %p length: %" PRIu64 " errno: %i"
|
2021-06-24 18:38:19 +08:00
|
|
|
|
|
|
|
# module.c
|
|
|
|
module_load_module(const char *name) "file %s"
|
|
|
|
module_lookup_object_type(const char *name) "name %s"
|