[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 16/24] modules: add tracepoints
From: |
Gerd Hoffmann |
Subject: |
[PATCH v3 16/24] modules: add tracepoints |
Date: |
Fri, 18 Jun 2021 06:53:45 +0200 |
One for module load and one for qom type lookup.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
util/module.c | 3 +++
util/trace-events | 4 ++++
2 files changed, 7 insertions(+)
diff --git a/util/module.c b/util/module.c
index a9ec2da9972e..acaaecad56c9 100644
--- a/util/module.c
+++ b/util/module.c
@@ -24,6 +24,7 @@
#ifdef CONFIG_MODULE_UPGRADES
#include "qemu-version.h"
#endif
+#include "trace.h"
typedef struct ModuleEntry
{
@@ -176,6 +177,7 @@ static int module_load_file(const char *fname, bool
mayfail, bool export_symbols
ret = 0;
}
+ trace_module_load_module(fname);
QTAILQ_FOREACH_SAFE(e, &dso_init_list, node, next) {
QTAILQ_REMOVE(&dso_init_list, e, node);
g_free(e);
@@ -294,6 +296,7 @@ void module_load_qom_one(const char *type)
return;
}
+ trace_module_lookup_object_type(type);
for (modinfo = module_info; modinfo->name != NULL; modinfo++) {
if (!modinfo->objs) {
continue;
diff --git a/util/trace-events b/util/trace-events
index 806cac14a762..c8f53d7d9fc3 100644
--- a/util/trace-events
+++ b/util/trace-events
@@ -100,3 +100,7 @@ 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"
+
+# module.c
+module_load_module(const char *name) "file %s"
+module_lookup_object_type(const char *name) "name %s"
--
2.31.1
- [PATCH v3 05/24] modules: add virtio-gpu module annotations, (continued)
- [PATCH v3 05/24] modules: add virtio-gpu module annotations, Gerd Hoffmann, 2021/06/18
- [PATCH v3 06/24] modules: add chardev module annotations, Gerd Hoffmann, 2021/06/18
- [PATCH v3 07/24] modules: add audio module annotations, Gerd Hoffmann, 2021/06/18
- [PATCH v3 08/24] modules: add usb-redir module annotations, Gerd Hoffmann, 2021/06/18
- [PATCH v3 09/24] modules: add ccid module annotations, Gerd Hoffmann, 2021/06/18
- [PATCH v3 11/24] modules: add s390x module annotations, Gerd Hoffmann, 2021/06/18
- [PATCH v3 10/24] modules: add ui module annotations, Gerd Hoffmann, 2021/06/18
- [PATCH v3 12/24] modules: add block module annotations, Gerd Hoffmann, 2021/06/18
- [PATCH v3 14/24] modules: use modinfo for qom load, Gerd Hoffmann, 2021/06/18
- [PATCH v3 16/24] modules: add tracepoints,
Gerd Hoffmann <=
- [PATCH v3 13/24] modules: use modinfo for dependencies, Gerd Hoffmann, 2021/06/18
- [PATCH v3 15/24] modules: use modinfo for qemu opts load, Gerd Hoffmann, 2021/06/18
- [PATCH v3 18/24] modules: check arch on qom lookup, Gerd Hoffmann, 2021/06/18
- [PATCH v3 17/24] modules: check arch and block load on mismatch, Gerd Hoffmann, 2021/06/18
- [PATCH v3 20/24] accel: autoload modules, Gerd Hoffmann, 2021/06/18
- [PATCH v3 19/24] modules: target-specific module build infrastructure, Gerd Hoffmann, 2021/06/18
- [PATCH v3 21/24] accel: add qtest module annotations, Gerd Hoffmann, 2021/06/18
- [PATCH v3 23/24] accel: add tcg module annotations, Gerd Hoffmann, 2021/06/18