diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2020-07-20 12:03:50 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2020-07-21 10:56:47 +0200 |
commit | d97df4b84bc42613cf9a03619de453ebd0be30b7 (patch) | |
tree | c897fd10b22d27621acf3322a37775360197f480 /hw | |
parent | 8e67fda2dd6202ccec093fda561107ba14830a17 (diff) |
qxl: fix modular builds with dtrace
Checking the enable/disable state of tracepoints via
trace_event_get_state_backends() does not work for modules.
qxl checks the state for a small optimization (avoid g_strndup
call in case log_buf will not be used anyway), so we can just
drop that check for modular builds.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20200720100352.2477-2-kraxel@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/display/qxl.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/hw/display/qxl.c b/hw/display/qxl.c index d5627119ec..11871340e7 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -1762,7 +1762,16 @@ async_common: qxl_set_mode(d, val, 0); break; case QXL_IO_LOG: +#ifdef CONFIG_MODULES + /* + * FIXME + * trace_event_get_state_backends() does not work for modules, + * it leads to "undefined symbol: qemu_qxl_io_log_semaphore" + */ + if (true) { +#else if (trace_event_get_state_backends(TRACE_QXL_IO_LOG) || d->guestdebug) { +#endif /* We cannot trust the guest to NUL terminate d->ram->log_buf */ char *log_buf = g_strndup((const char *)d->ram->log_buf, sizeof(d->ram->log_buf)); |