<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bwlp/qemu.git/scripts/tracetool, branch master</title>
<subtitle>Experimental fork of QEMU with video encoding patches</subtitle>
<id>https://git.openslx.org/bwlp/qemu.git/atom/scripts/tracetool?h=master</id>
<link rel='self' href='https://git.openslx.org/bwlp/qemu.git/atom/scripts/tracetool?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/'/>
<updated>2022-04-01T11:06:07+00:00</updated>
<entry>
<title>trace: fix compilation with lttng-ust &gt;= 2.13</title>
<updated>2022-04-01T11:06:07+00:00</updated>
<author>
<name>Marc-André Lureau</name>
</author>
<published>2022-03-28T08:47:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=e32aaa5a19e24233180042f84a0235a209de71cc'/>
<id>urn:sha1:e32aaa5a19e24233180042f84a0235a209de71cc</id>
<content type='text'>
On Fedora 36, with lttng-ust 2.13.1, compilation fails with:

In file included from trace/trace-ust-all.h:49085,
                 from trace/trace-ust-all.c:13:
/usr/include/lttng/tracepoint-event.h:67:10: error: #include expects "FILENAME" or &lt;FILENAME&gt;
   67 | #include LTTNG_UST_TRACEPOINT_INCLUDE
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

In lttng-ust commit 41858e2b6e8 ("Fix: don't do macro expansion in
tracepoint file name") from 2012, starting from lttng-ust 2.1, the API
was changed to expect TRACEPOINT_INCLUDE to be defined as a string.

In lttng-ust commit d2966b4b0b2 ("Remove TRACEPOINT_INCLUDE_FILE
macro"), in 2021, the compatibility macro was removed.

Use the "new" API from 2012, and bump the version requirement to 2.1 to
fix compilation with &gt;= 2.13.

According to repology, all distributions we support have &gt;= 2.1 (centos
8 has oldest with 2.8.1 afaict)

Signed-off-by: Marc-André Lureau &lt;marcandre.lureau@redhat.com&gt;
Reviewed-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Message-Id: &lt;20220328084717.367993-2-marcandre.lureau@redhat.com&gt;
Signed-off-by: Thomas Huth &lt;thuth@redhat.com&gt;
</content>
</entry>
<entry>
<title>tracing: excise the tcg related from tracetool</title>
<updated>2022-02-09T12:08:42+00:00</updated>
<author>
<name>Alex Bennée</name>
</author>
<published>2022-02-04T20:43:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=126d4123c50a78a99e04196126d42627911ef5b8'/>
<id>urn:sha1:126d4123c50a78a99e04196126d42627911ef5b8</id>
<content type='text'>
Now we have no TCG trace events and no longer handle them in the code
we can remove the handling from the tracetool to generate them. vcpu
tracing is still available although the existing syscall event is an
exercise in redundancy (plugins and -strace can also get the
information).

Signed-off-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Reviewed-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Cc: Luis Vilanova &lt;vilanova@imperial.ac.uk&gt;
Cc: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Message-Id: &lt;20220204204335.1689602-21-alex.bennee@linaro.org&gt;
</content>
</entry>
<entry>
<title>scripts/tracetool: Replace the word 'whitelist'</title>
<updated>2021-03-09T21:14:26+00:00</updated>
<author>
<name>Philippe Mathieu-Daudé</name>
</author>
<published>2021-03-03T18:46:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=54fa79b793fcf00625be235588703fb3adbcd104'/>
<id>urn:sha1:54fa79b793fcf00625be235588703fb3adbcd104</id>
<content type='text'>
Follow the inclusive terminology from the "Conscious Language in your
Open Source Projects" guidelines [*] and replace the words "whitelist"
appropriately.

[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md

Reviewed-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
Reviewed-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Reviewed-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Reviewed-by: Thomas Huth &lt;thuth@redhat.com&gt;
Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Reviewed-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Message-Id: &lt;20210303184644.1639691-3-philmd@redhat.com&gt;
Signed-off-by: Laurent Vivier &lt;laurent@vivier.eu&gt;
</content>
</entry>
<entry>
<title>trace: make the 'log' backend timestamp configurable</title>
<updated>2021-02-01T10:50:55+00:00</updated>
<author>
<name>Stefan Hajnoczi</name>
</author>
<published>2021-01-25T11:35:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=418ed14268f797a5142b60cd557cd598eb548c66'/>
<id>urn:sha1:418ed14268f797a5142b60cd557cd598eb548c66</id>
<content type='text'>
Timestamps in tracing output can be distracting. Make it possible to
control tid/timestamp printing with -msg timestamp=on|off. The default
is no tid/timestamps. Previously they were always printed.

Suggested-by: BALATON Zoltan &lt;balaton@eik.bme.hu&gt;
Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Tested-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Tested-by: BALATON Zoltan &lt;balaton@eik.bme.hu&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Message-id: 20210125113507.224287-3-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
</content>
</entry>
<entry>
<title>tracetool: also strip %l and %ll from systemtap format strings</title>
<updated>2021-02-01T10:50:55+00:00</updated>
<author>
<name>Daniel P. Berrangé</name>
</author>
<published>2021-01-06T13:02:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=09612de7e9adbe9666a8fa4cc60bab0a29a68ed1'/>
<id>urn:sha1:09612de7e9adbe9666a8fa4cc60bab0a29a68ed1</id>
<content type='text'>
All variables are 64-bit and so %l / %ll are not required, and the
latter is actually invalid:

  $ sudo stap -e 'probe begin{printf ("BEGIN")}'  -I .
  parse error: invalid or missing conversion specifier
          saw: operator ',' at ./qemu-system-x86_64-log.stp:15118:101
       source:     printf("%d@%d vhost_vdpa_set_log_base dev: %p base: 0x%x size: %llu
refcnt: %d fd: %d log: %p\n", pid(), gettimeofday_ns(), dev, base, size, refcnt, fd, log)

                       ^

Signed-off-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
Reviewed-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Tested-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
Message-id: 20210106130239.1004729-1-berrange@redhat.com

[Fixed "simiarly" typo found by Laurent Vivier &lt;lvivier@redhat.com&gt;
--Stefan]

Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
</content>
</entry>
<entry>
<title>tracetool: fix "PRI" macro decoding</title>
<updated>2021-02-01T10:50:54+00:00</updated>
<author>
<name>Laurent Vivier</name>
</author>
<published>2021-01-05T19:17:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=9f4e519fd7acbdb027d22e13e4f1cd8e79969dec'/>
<id>urn:sha1:9f4e519fd7acbdb027d22e13e4f1cd8e79969dec</id>
<content type='text'>
macro is not reset after use, so the format decoded is always the
one of the first "PRI" in the format string.

For instance:

  vhost_vdpa_set_config(void *dev, uint32_t offset, uint32_t size, \
                        uint32_t flags) "dev: %p offset: %"PRIu32" \
                        size: %"PRIu32" flags: 0x%"PRIx32

generates:

  printf("%d@%d vhost_vdpa_set_config dev: %p offset: %u size: %u \
          flags: 0x%u\n", pid(), gettimeofday_ns(), dev, offset, \
          size, flags)

for the "flags" parameter, we can see a "0x%u" rather than a "0x%x"
because the first macro was "PRIu32" (for offset).

In the loop, macro becomes "PRIu32PRIu32PRIx32", and c_macro_to_format()
returns always macro[3] ('u' in this case). This patch resets macro after
the format has been decoded.

Signed-off-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Reviewed-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
Message-id: 20210105191721.120463-3-lvivier@redhat.com
Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
</content>
</entry>
<entry>
<title>tracetool: show trace-events filename/lineno in fmt string errors</title>
<updated>2021-01-04T14:24:58+00:00</updated>
<author>
<name>Stefan Hajnoczi</name>
</author>
<published>2020-08-27T14:29:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=7fb48c0ee1bbf5cc4c905e900b054096250e9f39'/>
<id>urn:sha1:7fb48c0ee1bbf5cc4c905e900b054096250e9f39</id>
<content type='text'>
The compiler encounters trace event format strings in generated code.
Format strings are error-prone and therefore clear compiler errors are
important.

Use the #line directive to show the trace-events filename and line
number in format string errors:
https://gcc.gnu.org/onlinedocs/gcc-10.2.0/cpp/Line-Control.html

For example, if the cpu_in trace event's %u is changed to %p the
following error is reported:

  trace-events:29:18: error: format ‘%p’ expects argument of type ‘void *’, but argument 7 has type ‘unsigned int’ [-Werror=format=]

Line 29 in trace-events is where cpu_in is defined. This works for any
trace-events file in the QEMU source tree and the correct path is
displayed.

Unfortunately there does not seem to be a way to set the column, so "18"
is not the right character on that line.

Suggested-by: Peter Maydell &lt;peter.maydell@linaro.org&gt;
Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Reviewed-by: Peter Maydell &lt;peter.maydell@linaro.org&gt;
Message-Id: &lt;20200827142915.108730-5-stefanha@redhat.com&gt;
</content>
</entry>
<entry>
<title>tracetool: add input filename and line number to Event</title>
<updated>2021-01-04T14:24:58+00:00</updated>
<author>
<name>Stefan Hajnoczi</name>
</author>
<published>2020-08-27T14:29:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=4e66c9ef643b5f6bc01de33eac6fa0335e4c0753'/>
<id>urn:sha1:4e66c9ef643b5f6bc01de33eac6fa0335e4c0753</id>
<content type='text'>
Store the input filename and line number in Event.

A later patch will use this to improve error messages.

Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;f4bug@amsat.org&gt;
Reviewed-by: Peter Maydell &lt;peter.maydell@linaro.org&gt;
Message-Id: &lt;20200827142915.108730-4-stefanha@redhat.com&gt;
</content>
</entry>
<entry>
<title>tracetool: add out_lineno and out_next_lineno to out()</title>
<updated>2021-01-04T14:24:58+00:00</updated>
<author>
<name>Stefan Hajnoczi</name>
</author>
<published>2020-08-27T14:29:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=294170c1ddda454f2d8de65a4a26346fb2a7f715'/>
<id>urn:sha1:294170c1ddda454f2d8de65a4a26346fb2a7f715</id>
<content type='text'>
Make the output file line number and next line number available to
out().

A later patch will use this to improve error messages.

Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Reviewed-by: Peter Maydell &lt;peter.maydell@linaro.org&gt;
Message-Id: &lt;20200827142915.108730-3-stefanha@redhat.com&gt;
</content>
</entry>
<entry>
<title>tracetool: add output filename command-line argument</title>
<updated>2021-01-04T14:24:58+00:00</updated>
<author>
<name>Stefan Hajnoczi</name>
</author>
<published>2020-08-27T14:29:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=c05012a365c2d7d42d205b1efa895bf2144bab88'/>
<id>urn:sha1:c05012a365c2d7d42d205b1efa895bf2144bab88</id>
<content type='text'>
The tracetool.py script writes to stdout. This means the output filename
is not available to the script. Add the output filename to the
command-line so that the script has access to the filename.

This also simplifies the tracetool.py invocation. It's no longer
necessary to use meson's custom_build(capture : true) to save output.

Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;f4bug@amsat.org&gt;
Reviewed-by: Peter Maydell &lt;peter.maydell@linaro.org&gt;
Message-Id: &lt;20200827142915.108730-2-stefanha@redhat.com&gt;
</content>
</entry>
</feed>
