[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 0/4] [RfC] fix tracing for modules
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH v2 0/4] [RfC] fix tracing for modules |
Date: |
Mon, 30 Nov 2020 16:56:14 +0000 |
On Tue, Nov 24, 2020 at 05:02:51PM +0100, Gerd Hoffmann wrote:
> First version that actually works. Only qxl covered for this RfC, other
> modules will follow once the basics are hashed out.
>
> More context:
> https://bugzilla.redhat.com/show_bug.cgi?id=1898700
> https://bugzilla.redhat.com/show_bug.cgi?id=1869642
>
> take care,
> Gerd
>
> Gerd Hoffmann (4):
> meson: add trace_events_config[]
> meson: move up hw subdir (specifically before trace subdir)
> meson: add module_trace & module_trace_src
> meson: move qxl trace events to separate file
Awesome, thank you for working on this!
I noticed an issue with simpletrace: the trace file does not contain
qxl_* TRACE_RECORD_TYPE_MAPPING records when ./configure
--enable-modules is used. This happens because st_write_event_mapping()
is called before the qxl module calls trace_event_register_group().
(The mapping records describe the integer ID to string name mapping used
in a simpletrace file.)
You can check this using "grep -a qxl_ trace-$LAST_QEMU_PID" after
running qemu --device qxl built with ./configure --enable-modules
--enable-trace-backend=simple.
Remove --enable-modules and the file will contain the qxl_ trace events.
This means the trace file is broken because the simpletrace records
cannot be mapped to a trace event name.
One way to solve this is by modifying trace_event_register_group() to
call into trace/simple.c (maybe with a TraceEventIter initialized to
iterate over the newly registered trace events group?).
Alternatively, simpletrace.c might be able to emit
TRACE_RECORD_TYPE_MAPPING on demand instead of ahead of time.
Stefan
signature.asc
Description: PGP signature