[PULL,2/3] qxl: fix modular builds with dtrace
diff mbox series

Message ID 20200721140245.14634-3-kraxel@redhat.com
State New
Headers show
  • [PULL,1/3] xhci: fix valid.max_access_size to access address registers
Related show

Commit Message

Gerd Hoffmann July 21, 2020, 2:02 p.m. UTC
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>
 hw/display/qxl.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff mbox series

diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index d5627119ec62..11871340e75d 100644
--- a/hw/display/qxl.c
+++ b/hw/display/qxl.c
@@ -1762,7 +1762,16 @@  async_common:
         qxl_set_mode(d, val, 0);
     case QXL_IO_LOG:
+        /*
+         * FIXME
+         * trace_event_get_state_backends() does not work for modules,
+         * it leads to "undefined symbol: qemu_qxl_io_log_semaphore"
+         */
+        if (true) {
         if (trace_event_get_state_backends(TRACE_QXL_IO_LOG) || d->guestdebug) {
             /* We cannot trust the guest to NUL terminate d->ram->log_buf */
             char *log_buf = g_strndup((const char *)d->ram->log_buf,