<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qemu/scripts/tracetool/format, branch master</title>
<subtitle>QEMU development tree</subtitle>
<id>https://git.zx2c4.com/qemu/atom/scripts/tracetool/format?h=master</id>
<link rel='self' href='https://git.zx2c4.com/qemu/atom/scripts/tracetool/format?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/'/>
<updated>2023-10-17T13:20:53Z</updated>
<entry>
<title>tracetool: avoid invalid escape in Python string</title>
<updated>2023-10-17T13:20:53Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2023-10-16T06:22:56Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=e6d8e5e6e366ab4c9ed7d8ed1572f98c6ad6a38e'/>
<id>urn:sha1:e6d8e5e6e366ab4c9ed7d8ed1572f98c6ad6a38e</id>
<content type='text'>
This is an error in Python 3.12; fix it by using a raw string literal.

Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>trace: remove control-vcpu.h</title>
<updated>2023-06-01T15:05:05Z</updated>
<author>
<name>Alex Bennée</name>
<email>alex.bennee@linaro.org</email>
</author>
<published>2023-05-26T16:53:58Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=333df1c6c7a388ddccaaa041b4fa2ce565d1255e'/>
<id>urn:sha1:333df1c6c7a388ddccaaa041b4fa2ce565d1255e</id>
<content type='text'>
Now we no longer have vcpu controlled trace events we can excise the
code that allows us to query its status.

Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Reviewed-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Reviewed-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Signed-off-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Message-id: 20230526165401.574474-9-alex.bennee@linaro.org
Message-Id: &lt;20230524133952.3971948-8-alex.bennee@linaro.org&gt;
Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
</content>
</entry>
<entry>
<title>trace: remove vcpu_id from the TraceEvent structure</title>
<updated>2023-06-01T15:05:05Z</updated>
<author>
<name>Alex Bennée</name>
<email>alex.bennee@linaro.org</email>
</author>
<published>2023-05-26T16:53:53Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=710320137099b8d86cedb4f58de2455acd58cbde'/>
<id>urn:sha1:710320137099b8d86cedb4f58de2455acd58cbde</id>
<content type='text'>
This does involve temporarily stubbing out some helper functions
before we excise the rest of the code.

Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Reviewed-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Reviewed-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Signed-off-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Message-id: 20230526165401.574474-4-alex.bennee@linaro.org
Message-Id: &lt;20230524133952.3971948-4-alex.bennee@linaro.org&gt;
Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
</content>
</entry>
<entry>
<title>trace: fix compilation with lttng-ust &gt;= 2.13</title>
<updated>2022-04-01T11:06:07Z</updated>
<author>
<name>Marc-André Lureau</name>
<email>marcandre.lureau@redhat.com</email>
</author>
<published>2022-03-28T08:47:13Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/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:42Z</updated>
<author>
<name>Alex Bennée</name>
<email>alex.bennee@linaro.org</email>
</author>
<published>2022-02-04T20:43:29Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/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>tracetool: also strip %l and %ll from systemtap format strings</title>
<updated>2021-02-01T10:50:55Z</updated>
<author>
<name>Daniel P. Berrangé</name>
<email>berrange@redhat.com</email>
</author>
<published>2021-01-06T13:02:39Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/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:54Z</updated>
<author>
<name>Laurent Vivier</name>
<email>lvivier@redhat.com</email>
</author>
<published>2021-01-05T19:17:21Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/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>scripts/tracetool: silence SystemTap dtrace(1) long long warnings</title>
<updated>2020-11-11T13:10:38Z</updated>
<author>
<name>Stefan Hajnoczi</name>
<email>stefanha@redhat.com</email>
</author>
<published>2020-10-20T09:40:43Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=35e28cb0f210cae3d9c98113d519fe5a4bef5866'/>
<id>urn:sha1:35e28cb0f210cae3d9c98113d519fe5a4bef5866</id>
<content type='text'>
SystemTap's dtrace(1) prints the following warning when it encounters
long long arguments:

  Warning: /usr/bin/dtrace:trace/trace-dtrace-hw_virtio.dtrace:76: syntax error near:
  probe vhost_vdpa_dev_start

  Warning: Proceeding as if --no-pyparsing was given.

Use the uint64_t and int64_t types, respectively. This works with all
host CPU 32- and 64-bit data models (ILP32, LP64, and LLP64) that QEMU
supports.

Reported-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Reviewed-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Message-id: 20201020094043.159935-1-stefanha@redhat.com
Suggested-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
</content>
</entry>
<entry>
<title>scripts/tracetool: Fix dtrace generation for macOS</title>
<updated>2020-09-09T16:16:12Z</updated>
<author>
<name>Roman Bolshakov</name>
<email>r.bolshakov@yadro.com</email>
</author>
<published>2020-07-17T09:35:14Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=0807162e601c655e4f08bc736193255a1189d29d'/>
<id>urn:sha1:0807162e601c655e4f08bc736193255a1189d29d</id>
<content type='text'>
dtrace USDT is fully supported since OS X 10.6. There are a few
peculiarities compared to other dtrace flavors.

1. It doesn't accept empty files.
2. It doesn't recognize bool type but accepts C99 _Bool.
3. It converts int8_t * in probe points to char * in
   header files and introduces [-Wpointer-sign] warning.

Cc: Cameron Esfahani &lt;dirty@apple.com&gt;
Signed-off-by: Roman Bolshakov &lt;r.bolshakov@yadro.com&gt;
Reviewed-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Message-id: 20200717093517.73397-2-r.bolshakov@yadro.com
Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
</content>
</entry>
<entry>
<title>trace: switch position of headers to what Meson requires</title>
<updated>2020-08-21T10:18:24Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2020-02-04T11:20:10Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=243af0225ab37c642d73e4002b233af728119f72'/>
<id>urn:sha1:243af0225ab37c642d73e4002b233af728119f72</id>
<content type='text'>
Meson doesn't enjoy the same flexibility we have with Make in choosing
the include path.  In particular the tracing headers are using
$(build_root)/$(&lt;D).

In order to keep the include directives unchanged,
the simplest solution is to generate headers with patterns like
"trace/trace-audio.h" and place forwarding headers in the source tree
such that for example "audio/trace.h" includes "trace/trace-audio.h".

This patch is too ugly to be applied to the Makefiles now.  It's only
a way to separate the changes to the tracing header files from the
Meson rewrite of the tracing logic.

Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
</feed>
