[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] 6745c8: trace: Send "-d trace:help" output to
From: |
Peter Maydell |
Subject: |
[Qemu-commits] [qemu/qemu] 6745c8: trace: Send "-d trace:help" output to stdout |
Date: |
Tue, 05 Jan 2021 08:26:36 -0800 |
Branch: refs/heads/master
Home: https://github.com/qemu/qemu
Commit: 6745c8a01f759b64d3c4cd1e0a69bb793cead268
https://github.com/qemu/qemu/commit/6745c8a01f759b64d3c4cd1e0a69bb793cead268
Author: Doug Evans <dje@google.com>
Date: 2021-01-04 (Mon, 04 Jan 2021)
Changed paths:
M trace/control.c
M trace/control.h
Log Message:
-----------
trace: Send "-d trace:help" output to stdout
... for consistency with "-d help".
Signed-off-by: Doug Evans <dje@google.com>
Message-id: 20201125215245.3514695-1-dje@google.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Commit: c05012a365c2d7d42d205b1efa895bf2144bab88
https://github.com/qemu/qemu/commit/c05012a365c2d7d42d205b1efa895bf2144bab88
Author: Stefan Hajnoczi <stefanha@redhat.com>
Date: 2021-01-04 (Mon, 04 Jan 2021)
Changed paths:
M docs/devel/tracing.txt
M meson.build
M scripts/tracetool.py
M scripts/tracetool/__init__.py
M trace/meson.build
Log Message:
-----------
tracetool: add output filename command-line argument
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 <stefanha@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20200827142915.108730-2-stefanha@redhat.com>
Commit: 294170c1ddda454f2d8de65a4a26346fb2a7f715
https://github.com/qemu/qemu/commit/294170c1ddda454f2d8de65a4a26346fb2a7f715
Author: Stefan Hajnoczi <stefanha@redhat.com>
Date: 2021-01-04 (Mon, 04 Jan 2021)
Changed paths:
M scripts/tracetool/__init__.py
Log Message:
-----------
tracetool: add out_lineno and out_next_lineno to out()
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 <stefanha@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20200827142915.108730-3-stefanha@redhat.com>
Commit: 4e66c9ef643b5f6bc01de33eac6fa0335e4c0753
https://github.com/qemu/qemu/commit/4e66c9ef643b5f6bc01de33eac6fa0335e4c0753
Author: Stefan Hajnoczi <stefanha@redhat.com>
Date: 2021-01-04 (Mon, 04 Jan 2021)
Changed paths:
M scripts/tracetool/__init__.py
Log Message:
-----------
tracetool: add input filename and line number to Event
Store the input filename and line number in Event.
A later patch will use this to improve error messages.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20200827142915.108730-4-stefanha@redhat.com>
Commit: 7fb48c0ee1bbf5cc4c905e900b054096250e9f39
https://github.com/qemu/qemu/commit/7fb48c0ee1bbf5cc4c905e900b054096250e9f39
Author: Stefan Hajnoczi <stefanha@redhat.com>
Date: 2021-01-04 (Mon, 04 Jan 2021)
Changed paths:
M scripts/tracetool/backend/ftrace.py
M scripts/tracetool/backend/log.py
M scripts/tracetool/backend/syslog.py
Log Message:
-----------
tracetool: show trace-events filename/lineno in fmt string errors
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 <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20200827142915.108730-5-stefanha@redhat.com>
Commit: 74a0a6fcecb9e31bc60875b57c69db537ad385d1
https://github.com/qemu/qemu/commit/74a0a6fcecb9e31bc60875b57c69db537ad385d1
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2021-01-05 (Tue, 05 Jan 2021)
Changed paths:
M docs/devel/tracing.txt
M meson.build
M scripts/tracetool.py
M scripts/tracetool/__init__.py
M scripts/tracetool/backend/ftrace.py
M scripts/tracetool/backend/log.py
M scripts/tracetool/backend/syslog.py
M trace/control.c
M trace/control.h
M trace/meson.build
Log Message:
-----------
Merge remote-tracking branch
'remotes/stefanha-gitlab/tags/tracing-pull-request' into staging
Pull request
Show trace-events filename/lineno in fmt string errors and send -d trace:help
output to stdout for consistency.
# gpg: Signature made Mon 04 Jan 2021 14:26:58 GMT
# gpg: using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [full]
# gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" [full]
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8
* remotes/stefanha-gitlab/tags/tracing-pull-request:
tracetool: show trace-events filename/lineno in fmt string errors
tracetool: add input filename and line number to Event
tracetool: add out_lineno and out_next_lineno to out()
tracetool: add output filename command-line argument
trace: Send "-d trace:help" output to stdout
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Compare: https://github.com/qemu/qemu/compare/e551455f1e7a...74a0a6fcecb9