qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scripts/tracetool: silence SystemTap dtrace(1) long long warnings
@ 2020-10-20  9:40 Stefan Hajnoczi
  2020-10-20  9:45 ` Daniel P. Berrangé
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2020-10-20  9:40 UTC (permalink / raw)
  To: qemu-devel; +Cc: Daniel Berrange, Markus Armbruster, Stefan Hajnoczi

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 <armbru@redhat.com>
Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 scripts/tracetool/format/d.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/scripts/tracetool/format/d.py b/scripts/tracetool/format/d.py
index 353722f89c..ebfb714200 100644
--- a/scripts/tracetool/format/d.py
+++ b/scripts/tracetool/format/d.py
@@ -57,6 +57,12 @@ def generate(events, backend, group):
                 # Avoid it by changing probe type to signed char * beforehand.
                 if type_ == 'int8_t *':
                     type_ = 'signed char *'
+
+            # SystemTap dtrace(1) emits a warning when long long is used
+            type_ = type_.replace('unsigned long long', 'uint64_t')
+            type_ = type_.replace('signed long long', 'int64_t')
+            type_ = type_.replace('long long', 'int64_t')
+
             if name in RESERVED_WORDS:
                 name += '_'
             args.append(type_ + ' ' + name)
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] scripts/tracetool: silence SystemTap dtrace(1) long long warnings
  2020-10-20  9:40 [PATCH] scripts/tracetool: silence SystemTap dtrace(1) long long warnings Stefan Hajnoczi
@ 2020-10-20  9:45 ` Daniel P. Berrangé
  2020-10-20 10:06 ` Philippe Mathieu-Daudé
  2020-11-11 13:10 ` Stefan Hajnoczi
  2 siblings, 0 replies; 4+ messages in thread
From: Daniel P. Berrangé @ 2020-10-20  9:45 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: qemu-devel, Markus Armbruster

On Tue, Oct 20, 2020 at 10:40:43AM +0100, Stefan Hajnoczi wrote:
> 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 <armbru@redhat.com>
> Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  scripts/tracetool/format/d.py | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/scripts/tracetool/format/d.py b/scripts/tracetool/format/d.py
> index 353722f89c..ebfb714200 100644
> --- a/scripts/tracetool/format/d.py
> +++ b/scripts/tracetool/format/d.py
> @@ -57,6 +57,12 @@ def generate(events, backend, group):
>                  # Avoid it by changing probe type to signed char * beforehand.
>                  if type_ == 'int8_t *':
>                      type_ = 'signed char *'
> +
> +            # SystemTap dtrace(1) emits a warning when long long is used
> +            type_ = type_.replace('unsigned long long', 'uint64_t')
> +            type_ = type_.replace('signed long long', 'int64_t')
> +            type_ = type_.replace('long long', 'int64_t')
> +
>              if name in RESERVED_WORDS:
>                  name += '_'
>              args.append(type_ + ' ' + name)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] scripts/tracetool: silence SystemTap dtrace(1) long long warnings
  2020-10-20  9:40 [PATCH] scripts/tracetool: silence SystemTap dtrace(1) long long warnings Stefan Hajnoczi
  2020-10-20  9:45 ` Daniel P. Berrangé
@ 2020-10-20 10:06 ` Philippe Mathieu-Daudé
  2020-11-11 13:10 ` Stefan Hajnoczi
  2 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-10-20 10:06 UTC (permalink / raw)
  To: Stefan Hajnoczi, qemu-devel; +Cc: Daniel Berrange, Markus Armbruster

On 10/20/20 11:40 AM, Stefan Hajnoczi wrote:
> 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 <armbru@redhat.com>
> Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>   scripts/tracetool/format/d.py | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/scripts/tracetool/format/d.py b/scripts/tracetool/format/d.py
> index 353722f89c..ebfb714200 100644
> --- a/scripts/tracetool/format/d.py
> +++ b/scripts/tracetool/format/d.py
> @@ -57,6 +57,12 @@ def generate(events, backend, group):
>                   # Avoid it by changing probe type to signed char * beforehand.
>                   if type_ == 'int8_t *':
>                       type_ = 'signed char *'
> +
> +            # SystemTap dtrace(1) emits a warning when long long is used
> +            type_ = type_.replace('unsigned long long', 'uint64_t')
> +            type_ = type_.replace('signed long long', 'int64_t')
> +            type_ = type_.replace('long long', 'int64_t')
> +
>               if name in RESERVED_WORDS:
>                   name += '_'
>               args.append(type_ + ' ' + name)
> 

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] scripts/tracetool: silence SystemTap dtrace(1) long long warnings
  2020-10-20  9:40 [PATCH] scripts/tracetool: silence SystemTap dtrace(1) long long warnings Stefan Hajnoczi
  2020-10-20  9:45 ` Daniel P. Berrangé
  2020-10-20 10:06 ` Philippe Mathieu-Daudé
@ 2020-11-11 13:10 ` Stefan Hajnoczi
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2020-11-11 13:10 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: Daniel Berrange, qemu-devel, Markus Armbruster

[-- Attachment #1: Type: text/plain, Size: 872 bytes --]

On Tue, Oct 20, 2020 at 10:40:43AM +0100, Stefan Hajnoczi wrote:
> 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 <armbru@redhat.com>
> Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  scripts/tracetool/format/d.py | 6 ++++++
>  1 file changed, 6 insertions(+)

Thanks, applied to my tracing tree:
https://gitlab.com/stefanha/qemu/commits/tracing

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-11-11 13:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-20  9:40 [PATCH] scripts/tracetool: silence SystemTap dtrace(1) long long warnings Stefan Hajnoczi
2020-10-20  9:45 ` Daniel P. Berrangé
2020-10-20 10:06 ` Philippe Mathieu-Daudé
2020-11-11 13:10 ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).