* [PULL 0/5] Tracing patches
@ 2020-01-30 21:38 Stefan Hajnoczi
2020-01-30 21:38 ` [PULL 1/5] Makefile: Keep trace-events-subdirs ordered Stefan Hajnoczi
` (6 more replies)
0 siblings, 7 replies; 14+ messages in thread
From: Stefan Hajnoczi @ 2020-01-30 21:38 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, Gerd Hoffmann, Stefan Hajnoczi, Paolo Bonzini
The following changes since commit 928173659d6e5dc368284f73f90ea1d129e1f57d:
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20200130' into staging (2020-01-30 16:19:04 +0000)
are available in the Git repository at:
https://github.com/stefanha/qemu.git tags/tracing-pull-request
for you to fetch changes up to e144a605a614d22165000c69e8e1dc6986d45cd8:
qemu_set_log_filename: filename argument may be NULL (2020-01-30 21:33:50 +0000)
----------------------------------------------------------------
Pull request
----------------------------------------------------------------
Peter Maydell (3):
docs/devel/tracing.txt: Recommend only
trace_event_get_state_backends()
memory.c: Use trace_event_get_state_backends()
hw/display/qxl.c: Use trace_event_get_state_backends()
Philippe Mathieu-Daudé (1):
Makefile: Keep trace-events-subdirs ordered
Salvador Fandino (1):
qemu_set_log_filename: filename argument may be NULL
Makefile.objs | 4 ++--
docs/devel/tracing.txt | 12 +++++-------
hw/display/qxl.c | 2 +-
memory.c | 8 ++++----
trace/control.c | 4 +---
util/log.c | 28 ++++++++++++++++------------
vl.c | 5 +----
7 files changed, 30 insertions(+), 33 deletions(-)
--
2.24.1
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PULL 1/5] Makefile: Keep trace-events-subdirs ordered
2020-01-30 21:38 [PULL 0/5] Tracing patches Stefan Hajnoczi
@ 2020-01-30 21:38 ` Stefan Hajnoczi
2020-01-30 21:38 ` [PULL 2/5] docs/devel/tracing.txt: Recommend only trace_event_get_state_backends() Stefan Hajnoczi
` (5 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Stefan Hajnoczi @ 2020-01-30 21:38 UTC (permalink / raw)
To: qemu-devel
Cc: Damien Hedde, Peter Maydell, Gerd Hoffmann, Stefan Hajnoczi,
Paolo Bonzini, Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé <philmd@redhat.com>
Adding the same directory multiple times to trace-events-subdirs
might trigger build failures, in particular when using the LTTng
Userspace Tracer library as backend.
For example when using two times the hw/core/ directory:
$ ./configure --enable-trace-backends=ust && make
[...]
CC trace-ust-all.o
In file included from trace-ust-all.h:13,
from trace-ust-all.c:13:
trace-ust-all.h:35151:1: error: redefinition of ‘__tracepoint_cb_qemu___loader_write_rom’
35151 | TRACEPOINT_EVENT(
| ^~~~~~~~~~~~~~~~
trace-ust-all.h:31791:1: note: previous definition of ‘__tracepoint_cb_qemu___loader_write_rom’ was here
31791 | TRACEPOINT_EVENT(
| ^~~~~~~~~~~~~~~~
To ease review and reduce likelihood of merge failures (see [*]),
keep trace-events-subdirs ordered when possible, following eb7ccb3c0.
[*] https://www.mail-archive.com/qemu-devel@nongnu.org/msg671007.html
Duplicate trace-events-subdirs entries generates duplicated
symbols when using the LTTng Userspace Tracer library.
Reviewed-by: Damien Hedde <damien.hedde@greensocs.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20200116114339.30670-1-philmd@redhat.com
Message-Id: <20200116114339.30670-1-philmd@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
Makefile.objs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile.objs b/Makefile.objs
index f2da7241fc..26b9cff954 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -132,8 +132,8 @@ trace-events-subdirs += nbd
trace-events-subdirs += scsi
endif
ifeq ($(CONFIG_SOFTMMU),y)
-trace-events-subdirs += chardev
trace-events-subdirs += audio
+trace-events-subdirs += chardev
trace-events-subdirs += hw/9pfs
trace-events-subdirs += hw/acpi
trace-events-subdirs += hw/alpha
@@ -181,6 +181,7 @@ trace-events-subdirs += migration
trace-events-subdirs += net
trace-events-subdirs += ui
endif
+trace-events-subdirs += hw/core
trace-events-subdirs += hw/display
trace-events-subdirs += qapi
trace-events-subdirs += qom
@@ -193,7 +194,6 @@ trace-events-subdirs += target/riscv
trace-events-subdirs += target/s390x
trace-events-subdirs += target/sparc
trace-events-subdirs += util
-trace-events-subdirs += hw/core
trace-events-files = $(SRC_PATH)/trace-events $(trace-events-subdirs:%=$(SRC_PATH)/%/trace-events)
--
2.24.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PULL 2/5] docs/devel/tracing.txt: Recommend only trace_event_get_state_backends()
2020-01-30 21:38 [PULL 0/5] Tracing patches Stefan Hajnoczi
2020-01-30 21:38 ` [PULL 1/5] Makefile: Keep trace-events-subdirs ordered Stefan Hajnoczi
@ 2020-01-30 21:38 ` Stefan Hajnoczi
2020-01-30 21:38 ` [PULL 3/5] memory.c: Use trace_event_get_state_backends() Stefan Hajnoczi
` (4 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Stefan Hajnoczi @ 2020-01-30 21:38 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, Gerd Hoffmann, Stefan Hajnoczi, Paolo Bonzini
From: Peter Maydell <peter.maydell@linaro.org>
Instead of recommending checking the TRACE_FOO_ENABLED macro to
skip expensive computations needed only for tracing, recommend
only using trace_event_get_state_backends(). This works for both
compile-time and run-time disabling of events, and has no extra
performance impact if the event is compile-time disabled.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20200120151142.18954-2-peter.maydell@linaro.org
Message-Id: <20200120151142.18954-2-peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
docs/devel/tracing.txt | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/docs/devel/tracing.txt b/docs/devel/tracing.txt
index 8c0376fefa..cb5f685de9 100644
--- a/docs/devel/tracing.txt
+++ b/docs/devel/tracing.txt
@@ -342,8 +342,10 @@ edit the "trace-events-all" file).
In addition, there might be cases where relatively complex computations must be
performed to generate values that are only used as arguments for a trace
-function. In these cases you can use the macro 'TRACE_${EVENT_NAME}_ENABLED' to
-guard such computations and avoid its compilation when the event is disabled:
+function. In these cases you can use 'trace_event_get_state_backends()' to
+guard such computations, so they are skipped if the event has been either
+compile-time disabled or run-time disabled. If the event is compile-time
+disabled, this check will have no performance impact.
#include "trace.h" /* needed for trace event prototype */
@@ -356,7 +358,7 @@ guard such computations and avoid its compilation when the event is disabled:
align = getpagesize();
}
ptr = qemu_memalign(align, size);
- if (TRACE_QEMU_VMALLOC_ENABLED) { /* preprocessor macro */
+ if (trace_event_get_state_backends(TRACE_QEMU_VMALLOC)) {
void *complex;
/* some complex computations to produce the 'complex' value */
trace_qemu_vmalloc(size, ptr, complex);
@@ -364,10 +366,6 @@ guard such computations and avoid its compilation when the event is disabled:
return ptr;
}
-You can check both if the event has been disabled and is dynamically enabled at
-the same time using the 'trace_event_get_state_backends' routine (see header
-"trace/control.h" for more information).
-
=== "tcg" ===
Guest code generated by TCG can be traced by defining an event with the "tcg"
--
2.24.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PULL 3/5] memory.c: Use trace_event_get_state_backends()
2020-01-30 21:38 [PULL 0/5] Tracing patches Stefan Hajnoczi
2020-01-30 21:38 ` [PULL 1/5] Makefile: Keep trace-events-subdirs ordered Stefan Hajnoczi
2020-01-30 21:38 ` [PULL 2/5] docs/devel/tracing.txt: Recommend only trace_event_get_state_backends() Stefan Hajnoczi
@ 2020-01-30 21:38 ` Stefan Hajnoczi
2020-01-30 21:38 ` [PULL 4/5] hw/display/qxl.c: " Stefan Hajnoczi
` (3 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Stefan Hajnoczi @ 2020-01-30 21:38 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, Gerd Hoffmann, Stefan Hajnoczi, Paolo Bonzini
From: Peter Maydell <peter.maydell@linaro.org>
The preferred way to test whether a trace event is enabled is to
use trace_event_get_state_backends(), because this will give the
correct answer (allowing expensive computations to be skipped)
whether the trace event is compile-time or run-time disabled.
Convert the four old-style direct uses of TRACE_FOO_ENABLED in
memory.c.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20200120151142.18954-3-peter.maydell@linaro.org
Message-Id: <20200120151142.18954-3-peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
memory.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/memory.c b/memory.c
index 854798791e..aeaa8dcc9e 100644
--- a/memory.c
+++ b/memory.c
@@ -434,7 +434,7 @@ static MemTxResult memory_region_read_accessor(MemoryRegion *mr,
tmp = mr->ops->read(mr->opaque, addr, size);
if (mr->subpage) {
trace_memory_region_subpage_read(get_cpu_index(), mr, addr, tmp, size);
- } else if (TRACE_MEMORY_REGION_OPS_READ_ENABLED) {
+ } else if (trace_event_get_state_backends(TRACE_MEMORY_REGION_OPS_READ)) {
hwaddr abs_addr = memory_region_to_absolute_addr(mr, addr);
trace_memory_region_ops_read(get_cpu_index(), mr, abs_addr, tmp, size);
}
@@ -456,7 +456,7 @@ static MemTxResult memory_region_read_with_attrs_accessor(MemoryRegion *mr,
r = mr->ops->read_with_attrs(mr->opaque, addr, &tmp, size, attrs);
if (mr->subpage) {
trace_memory_region_subpage_read(get_cpu_index(), mr, addr, tmp, size);
- } else if (TRACE_MEMORY_REGION_OPS_READ_ENABLED) {
+ } else if (trace_event_get_state_backends(TRACE_MEMORY_REGION_OPS_READ)) {
hwaddr abs_addr = memory_region_to_absolute_addr(mr, addr);
trace_memory_region_ops_read(get_cpu_index(), mr, abs_addr, tmp, size);
}
@@ -476,7 +476,7 @@ static MemTxResult memory_region_write_accessor(MemoryRegion *mr,
if (mr->subpage) {
trace_memory_region_subpage_write(get_cpu_index(), mr, addr, tmp, size);
- } else if (TRACE_MEMORY_REGION_OPS_WRITE_ENABLED) {
+ } else if (trace_event_get_state_backends(TRACE_MEMORY_REGION_OPS_WRITE)) {
hwaddr abs_addr = memory_region_to_absolute_addr(mr, addr);
trace_memory_region_ops_write(get_cpu_index(), mr, abs_addr, tmp, size);
}
@@ -496,7 +496,7 @@ static MemTxResult memory_region_write_with_attrs_accessor(MemoryRegion *mr,
if (mr->subpage) {
trace_memory_region_subpage_write(get_cpu_index(), mr, addr, tmp, size);
- } else if (TRACE_MEMORY_REGION_OPS_WRITE_ENABLED) {
+ } else if (trace_event_get_state_backends(TRACE_MEMORY_REGION_OPS_WRITE)) {
hwaddr abs_addr = memory_region_to_absolute_addr(mr, addr);
trace_memory_region_ops_write(get_cpu_index(), mr, abs_addr, tmp, size);
}
--
2.24.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PULL 4/5] hw/display/qxl.c: Use trace_event_get_state_backends()
2020-01-30 21:38 [PULL 0/5] Tracing patches Stefan Hajnoczi
` (2 preceding siblings ...)
2020-01-30 21:38 ` [PULL 3/5] memory.c: Use trace_event_get_state_backends() Stefan Hajnoczi
@ 2020-01-30 21:38 ` Stefan Hajnoczi
2020-01-30 21:38 ` [PULL 5/5] qemu_set_log_filename: filename argument may be NULL Stefan Hajnoczi
` (2 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Stefan Hajnoczi @ 2020-01-30 21:38 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, Gerd Hoffmann, Stefan Hajnoczi, Paolo Bonzini
From: Peter Maydell <peter.maydell@linaro.org>
The preferred way to test whether a trace event is enabled is to
use trace_event_get_state_backends(), because this will give the
correct answer (allowing expensive computations to be skipped)
whether the trace event is compile-time or run-time disabled.
Convert the old-style direct use of TRACE_FOO_ENABLED.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20200120151142.18954-4-peter.maydell@linaro.org
Message-Id: <20200120151142.18954-4-peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
hw/display/qxl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index 944c02ce56..c33b1915a5 100644
--- a/hw/display/qxl.c
+++ b/hw/display/qxl.c
@@ -1764,7 +1764,7 @@ async_common:
qxl_set_mode(d, val, 0);
break;
case QXL_IO_LOG:
- if (TRACE_QXL_IO_LOG_ENABLED || d->guestdebug) {
+ if (trace_event_get_state_backends(TRACE_QXL_IO_LOG) || d->guestdebug) {
/* We cannot trust the guest to NUL terminate d->ram->log_buf */
char *log_buf = g_strndup((const char *)d->ram->log_buf,
sizeof(d->ram->log_buf));
--
2.24.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PULL 5/5] qemu_set_log_filename: filename argument may be NULL
2020-01-30 21:38 [PULL 0/5] Tracing patches Stefan Hajnoczi
` (3 preceding siblings ...)
2020-01-30 21:38 ` [PULL 4/5] hw/display/qxl.c: " Stefan Hajnoczi
@ 2020-01-30 21:38 ` Stefan Hajnoczi
2020-02-11 22:51 ` Richard Henderson
2020-01-31 13:57 ` [PULL 0/5] Tracing patches Peter Maydell
2020-01-31 19:05 ` Peter Maydell
6 siblings, 1 reply; 14+ messages in thread
From: Stefan Hajnoczi @ 2020-01-30 21:38 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Salvador Fandino, Gerd Hoffmann, Stefan Hajnoczi,
Paolo Bonzini
From: Salvador Fandino <salvador@qindel.com>
NULL is a valid log filename used to indicate we want to use stderr
but qemu_set_log_filename (which is called by bsd-user/main.c) was not
handling it correctly.
That also made redundant a couple of NULL checks in calling code which
have been removed.
Signed-off-by: Salvador Fandino <salvador@qindel.com>
Message-Id: <20200123193626.19956-1-salvador@qindel.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
trace/control.c | 4 +---
util/log.c | 28 ++++++++++++++++------------
vl.c | 5 +----
3 files changed, 18 insertions(+), 19 deletions(-)
diff --git a/trace/control.c b/trace/control.c
index 0fb8124160..6c775e68eb 100644
--- a/trace/control.c
+++ b/trace/control.c
@@ -229,9 +229,7 @@ void trace_init_file(const char *file)
/* If both the simple and the log backends are enabled, "--trace file"
* only applies to the simple backend; use "-D" for the log backend.
*/
- if (file) {
- qemu_set_log_filename(file, &error_fatal);
- }
+ qemu_set_log_filename(file, &error_fatal);
#else
if (file) {
fprintf(stderr, "error: --trace file=...: "
diff --git a/util/log.c b/util/log.c
index 867264da8d..47f2827397 100644
--- a/util/log.c
+++ b/util/log.c
@@ -148,25 +148,29 @@ void qemu_log_needs_buffers(void)
* Allow the user to include %d in their logfile which will be
* substituted with the current PID. This is useful for debugging many
* nested linux-user tasks but will result in lots of logs.
+ *
+ * filename may be NULL. In that case, log output is sent to stderr
*/
void qemu_set_log_filename(const char *filename, Error **errp)
{
- char *pidstr;
g_free(logfilename);
logfilename = NULL;
- pidstr = strstr(filename, "%");
- if (pidstr) {
- /* We only accept one %d, no other format strings */
- if (pidstr[1] != 'd' || strchr(pidstr + 2, '%')) {
- error_setg(errp, "Bad logfile format: %s", filename);
- return;
- } else {
- logfilename = g_strdup_printf(filename, getpid());
- }
- } else {
- logfilename = g_strdup(filename);
+ if (filename) {
+ char *pidstr = strstr(filename, "%");
+ if (pidstr) {
+ /* We only accept one %d, no other format strings */
+ if (pidstr[1] != 'd' || strchr(pidstr + 2, '%')) {
+ error_setg(errp, "Bad logfile format: %s", filename);
+ return;
+ } else {
+ logfilename = g_strdup_printf(filename, getpid());
+ }
+ } else {
+ logfilename = g_strdup(filename);
+ }
}
+
qemu_log_close();
qemu_set_log(qemu_loglevel);
}
diff --git a/vl.c b/vl.c
index 24951b51a9..7dcb0879c4 100644
--- a/vl.c
+++ b/vl.c
@@ -3903,10 +3903,7 @@ int main(int argc, char **argv, char **envp)
/* Open the logfile at this point and set the log mask if necessary.
*/
- if (log_file) {
- qemu_set_log_filename(log_file, &error_fatal);
- }
-
+ qemu_set_log_filename(log_file, &error_fatal);
if (log_mask) {
int mask;
mask = qemu_str_to_log_mask(log_mask);
--
2.24.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PULL 0/5] Tracing patches
2020-01-30 21:38 [PULL 0/5] Tracing patches Stefan Hajnoczi
` (4 preceding siblings ...)
2020-01-30 21:38 ` [PULL 5/5] qemu_set_log_filename: filename argument may be NULL Stefan Hajnoczi
@ 2020-01-31 13:57 ` Peter Maydell
2020-01-31 14:38 ` Philippe Mathieu-Daudé
2020-01-31 15:25 ` Alex Bennée
2020-01-31 19:05 ` Peter Maydell
6 siblings, 2 replies; 14+ messages in thread
From: Peter Maydell @ 2020-01-31 13:57 UTC (permalink / raw)
To: Stefan Hajnoczi
Cc: Paolo Bonzini, Alex Bennée, QEMU Developers, Gerd Hoffmann
On Thu, 30 Jan 2020 at 21:38, Stefan Hajnoczi <stefanha@redhat.com> wrote:
>
> The following changes since commit 928173659d6e5dc368284f73f90ea1d129e1f57d:
>
> Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20200130' into staging (2020-01-30 16:19:04 +0000)
>
> are available in the Git repository at:
>
> https://github.com/stefanha/qemu.git tags/tracing-pull-request
>
> for you to fetch changes up to e144a605a614d22165000c69e8e1dc6986d45cd8:
>
> qemu_set_log_filename: filename argument may be NULL (2020-01-30 21:33:50 +0000)
>
> ----------------------------------------------------------------
> Pull request
>
> ----------------------------------------------------------------
>
> Peter Maydell (3):
> docs/devel/tracing.txt: Recommend only
> trace_event_get_state_backends()
> memory.c: Use trace_event_get_state_backends()
> hw/display/qxl.c: Use trace_event_get_state_backends()
>
> Philippe Mathieu-Daudé (1):
> Makefile: Keep trace-events-subdirs ordered
>
> Salvador Fandino (1):
> qemu_set_log_filename: filename argument may be NULL
Here's a weird one -- with this pullreq applied I
see a new warning running check-tcg on the linux-user
static config build:
TEST linux-test on aarch64
TEST testthread on aarch64
TEST float_madds on aarch64
DIFF float_madds.out with
/home/petmay01/linaro/qemu-for-merges/tests/tcg/aarch64/float_ma
dds.ref
TEST fcvt on aarch64
warning: TCG temporary leaks before 0000000000400a0c
DIFF fcvt.out with
/home/petmay01/linaro/qemu-for-merges/tests/tcg/aarch64/fcvt.ref
TEST pauth-1 on aarch64
TEST pauth-2 on aarch64
but I'm not sure why any of the patches here would have
provoked that, unless they're now causing a log message
that would previously have been suppressed or directed
somewhere else to be emitted.
thanks
-- PMM
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PULL 0/5] Tracing patches
2020-01-31 13:57 ` [PULL 0/5] Tracing patches Peter Maydell
@ 2020-01-31 14:38 ` Philippe Mathieu-Daudé
2020-01-31 14:45 ` Philippe Mathieu-Daudé
2020-01-31 15:25 ` Alex Bennée
1 sibling, 1 reply; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-01-31 14:38 UTC (permalink / raw)
To: Peter Maydell, Stefan Hajnoczi
Cc: Paolo Bonzini, Alex Bennée, QEMU Developers, Gerd Hoffmann
On 1/31/20 2:57 PM, Peter Maydell wrote:
> On Thu, 30 Jan 2020 at 21:38, Stefan Hajnoczi <stefanha@redhat.com> wrote:
>>
>> The following changes since commit 928173659d6e5dc368284f73f90ea1d129e1f57d:
>>
>> Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20200130' into staging (2020-01-30 16:19:04 +0000)
>>
>> are available in the Git repository at:
>>
>> https://github.com/stefanha/qemu.git tags/tracing-pull-request
>>
>> for you to fetch changes up to e144a605a614d22165000c69e8e1dc6986d45cd8:
>>
>> qemu_set_log_filename: filename argument may be NULL (2020-01-30 21:33:50 +0000)
>>
>> ----------------------------------------------------------------
>> Pull request
>>
>> ----------------------------------------------------------------
>>
>> Peter Maydell (3):
>> docs/devel/tracing.txt: Recommend only
>> trace_event_get_state_backends()
>> memory.c: Use trace_event_get_state_backends()
>> hw/display/qxl.c: Use trace_event_get_state_backends()
>>
>> Philippe Mathieu-Daudé (1):
>> Makefile: Keep trace-events-subdirs ordered
>>
>> Salvador Fandino (1):
>> qemu_set_log_filename: filename argument may be NULL
>
> Here's a weird one -- with this pullreq applied I
> see a new warning running check-tcg on the linux-user
> static config build:
>
> TEST linux-test on aarch64
> TEST testthread on aarch64
> TEST float_madds on aarch64
> DIFF float_madds.out with
> /home/petmay01/linaro/qemu-for-merges/tests/tcg/aarch64/float_ma
> dds.ref
> TEST fcvt on aarch64
> warning: TCG temporary leaks before 0000000000400a0c
> DIFF fcvt.out with
> /home/petmay01/linaro/qemu-for-merges/tests/tcg/aarch64/fcvt.ref
> TEST pauth-1 on aarch64
> TEST pauth-2 on aarch64
>
> but I'm not sure why any of the patches here would have
> provoked that, unless they're now causing a log message
> that would previously have been suppressed or directed
> somewhere else to be emitted.
Looking at the last patch "qemu_set_log_filename: filename argument may
be NULL", maybe these were previously logged into a ./'(null)' logfile?
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PULL 0/5] Tracing patches
2020-01-31 14:38 ` Philippe Mathieu-Daudé
@ 2020-01-31 14:45 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-01-31 14:45 UTC (permalink / raw)
To: Peter Maydell, Stefan Hajnoczi
Cc: Paolo Bonzini, Alex Bennée, QEMU Developers, Gerd Hoffmann
On 1/31/20 3:38 PM, Philippe Mathieu-Daudé wrote:
> On 1/31/20 2:57 PM, Peter Maydell wrote:
>> On Thu, 30 Jan 2020 at 21:38, Stefan Hajnoczi <stefanha@redhat.com>
>> wrote:
>>>
>>> The following changes since commit
>>> 928173659d6e5dc368284f73f90ea1d129e1f57d:
>>>
>>> Merge remote-tracking branch
>>> 'remotes/pmaydell/tags/pull-target-arm-20200130' into staging
>>> (2020-01-30 16:19:04 +0000)
>>>
>>> are available in the Git repository at:
>>>
>>> https://github.com/stefanha/qemu.git tags/tracing-pull-request
>>>
>>> for you to fetch changes up to e144a605a614d22165000c69e8e1dc6986d45cd8:
>>>
>>> qemu_set_log_filename: filename argument may be NULL (2020-01-30
>>> 21:33:50 +0000)
>>>
>>> ----------------------------------------------------------------
>>> Pull request
>>>
>>> ----------------------------------------------------------------
>>>
>>> Peter Maydell (3):
>>> docs/devel/tracing.txt: Recommend only
>>> trace_event_get_state_backends()
>>> memory.c: Use trace_event_get_state_backends()
>>> hw/display/qxl.c: Use trace_event_get_state_backends()
>>>
>>> Philippe Mathieu-Daudé (1):
>>> Makefile: Keep trace-events-subdirs ordered
>>>
>>> Salvador Fandino (1):
>>> qemu_set_log_filename: filename argument may be NULL
>>
>> Here's a weird one -- with this pullreq applied I
>> see a new warning running check-tcg on the linux-user
>> static config build:
>>
>> TEST linux-test on aarch64
>> TEST testthread on aarch64
>> TEST float_madds on aarch64
>> DIFF float_madds.out with
>> /home/petmay01/linaro/qemu-for-merges/tests/tcg/aarch64/float_ma
>> dds.ref
>> TEST fcvt on aarch64
>> warning: TCG temporary leaks before 0000000000400a0c
>> DIFF fcvt.out with
>> /home/petmay01/linaro/qemu-for-merges/tests/tcg/aarch64/fcvt.ref
>> TEST pauth-1 on aarch64
>> TEST pauth-2 on aarch64
>>
>> but I'm not sure why any of the patches here would have
>> provoked that, unless they're now causing a log message
>> that would previously have been suppressed or directed
>> somewhere else to be emitted.
>
> Looking at the last patch "qemu_set_log_filename: filename argument may
> be NULL", maybe these were previously logged into a ./'(null)' logfile?
Forget that comment, I need some caffeine.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PULL 0/5] Tracing patches
2020-01-31 13:57 ` [PULL 0/5] Tracing patches Peter Maydell
2020-01-31 14:38 ` Philippe Mathieu-Daudé
@ 2020-01-31 15:25 ` Alex Bennée
1 sibling, 0 replies; 14+ messages in thread
From: Alex Bennée @ 2020-01-31 15:25 UTC (permalink / raw)
To: Peter Maydell
Cc: Paolo Bonzini, QEMU Developers, Stefan Hajnoczi, Gerd Hoffmann
Peter Maydell <peter.maydell@linaro.org> writes:
> On Thu, 30 Jan 2020 at 21:38, Stefan Hajnoczi <stefanha@redhat.com> wrote:
>>
>> The following changes since commit 928173659d6e5dc368284f73f90ea1d129e1f57d:
>>
>> Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20200130' into staging (2020-01-30 16:19:04 +0000)
>>
>> are available in the Git repository at:
>>
>> https://github.com/stefanha/qemu.git tags/tracing-pull-request
>>
>> for you to fetch changes up to e144a605a614d22165000c69e8e1dc6986d45cd8:
>>
>> qemu_set_log_filename: filename argument may be NULL (2020-01-30 21:33:50 +0000)
>>
>> ----------------------------------------------------------------
>> Pull request
>>
>> ----------------------------------------------------------------
>>
>> Peter Maydell (3):
>> docs/devel/tracing.txt: Recommend only
>> trace_event_get_state_backends()
>> memory.c: Use trace_event_get_state_backends()
>> hw/display/qxl.c: Use trace_event_get_state_backends()
>>
>> Philippe Mathieu-Daudé (1):
>> Makefile: Keep trace-events-subdirs ordered
>>
>> Salvador Fandino (1):
>> qemu_set_log_filename: filename argument may be NULL
>
> Here's a weird one -- with this pullreq applied I
> see a new warning running check-tcg on the linux-user
> static config build:
>
> TEST linux-test on aarch64
> TEST testthread on aarch64
> TEST float_madds on aarch64
> DIFF float_madds.out with
> /home/petmay01/linaro/qemu-for-merges/tests/tcg/aarch64/float_ma
> dds.ref
> TEST fcvt on aarch64
> warning: TCG temporary leaks before 0000000000400a0c
> DIFF fcvt.out with
> /home/petmay01/linaro/qemu-for-merges/tests/tcg/aarch64/fcvt.ref
> TEST pauth-1 on aarch64
> TEST pauth-2 on aarch64
>
> but I'm not sure why any of the patches here would have
> provoked that, unless they're now causing a log message
> that would previously have been suppressed or directed
> somewhere else to be emitted.
That must be it - before hand we wouldn't have called
qemu_set_log_filename which in turn doesn't call qemu_set_log.
Anyway I have replicated the warning.
>
> thanks
> -- PMM
--
Alex Bennée
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PULL 0/5] Tracing patches
2020-01-30 21:38 [PULL 0/5] Tracing patches Stefan Hajnoczi
` (5 preceding siblings ...)
2020-01-31 13:57 ` [PULL 0/5] Tracing patches Peter Maydell
@ 2020-01-31 19:05 ` Peter Maydell
6 siblings, 0 replies; 14+ messages in thread
From: Peter Maydell @ 2020-01-31 19:05 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: Paolo Bonzini, QEMU Developers, Gerd Hoffmann
On Thu, 30 Jan 2020 at 21:38, Stefan Hajnoczi <stefanha@redhat.com> wrote:
>
> The following changes since commit 928173659d6e5dc368284f73f90ea1d129e1f57d:
>
> Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20200130' into staging (2020-01-30 16:19:04 +0000)
>
> are available in the Git repository at:
>
> https://github.com/stefanha/qemu.git tags/tracing-pull-request
>
> for you to fetch changes up to e144a605a614d22165000c69e8e1dc6986d45cd8:
>
> qemu_set_log_filename: filename argument may be NULL (2020-01-30 21:33:50 +0000)
>
> ----------------------------------------------------------------
> Pull request
>
> ----------------------------------------------------------------
>
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/5.0
for any user-visible changes.
-- PMM
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PULL 5/5] qemu_set_log_filename: filename argument may be NULL
2020-01-30 21:38 ` [PULL 5/5] qemu_set_log_filename: filename argument may be NULL Stefan Hajnoczi
@ 2020-02-11 22:51 ` Richard Henderson
2020-02-12 10:45 ` Alex Bennée
0 siblings, 1 reply; 14+ messages in thread
From: Richard Henderson @ 2020-02-11 22:51 UTC (permalink / raw)
To: Stefan Hajnoczi, qemu-devel
Cc: Peter Maydell, Salvador Fandino, Gerd Hoffmann, Paolo Bonzini
On 1/30/20 1:38 PM, Stefan Hajnoczi wrote:
> From: Salvador Fandino <salvador@qindel.com>
>
> NULL is a valid log filename used to indicate we want to use stderr
> but qemu_set_log_filename (which is called by bsd-user/main.c) was not
> handling it correctly.
>
> That also made redundant a couple of NULL checks in calling code which
> have been removed.
>
> Signed-off-by: Salvador Fandino <salvador@qindel.com>
> Message-Id: <20200123193626.19956-1-salvador@qindel.com>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
> trace/control.c | 4 +---
> util/log.c | 28 ++++++++++++++++------------
> vl.c | 5 +----
> 3 files changed, 18 insertions(+), 19 deletions(-)
This patch has broken -D <filename> for *-linux-user.
After e144a605a, all logging goes to stderr.
> + if (filename) {
> + char *pidstr = strstr(filename, "%");
> + if (pidstr) {
Also, the indentation is off.
r~
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PULL 5/5] qemu_set_log_filename: filename argument may be NULL
2020-02-11 22:51 ` Richard Henderson
@ 2020-02-12 10:45 ` Alex Bennée
2020-02-12 21:41 ` Richard Henderson
0 siblings, 1 reply; 14+ messages in thread
From: Alex Bennée @ 2020-02-12 10:45 UTC (permalink / raw)
To: Richard Henderson
Cc: Peter Maydell, qemu-devel, Salvador Fandino, Gerd Hoffmann,
Stefan Hajnoczi, Paolo Bonzini
Richard Henderson <richard.henderson@linaro.org> writes:
> On 1/30/20 1:38 PM, Stefan Hajnoczi wrote:
>> From: Salvador Fandino <salvador@qindel.com>
>>
>> NULL is a valid log filename used to indicate we want to use stderr
>> but qemu_set_log_filename (which is called by bsd-user/main.c) was not
>> handling it correctly.
>>
>> That also made redundant a couple of NULL checks in calling code which
>> have been removed.
>>
>> Signed-off-by: Salvador Fandino <salvador@qindel.com>
>> Message-Id: <20200123193626.19956-1-salvador@qindel.com>
>> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
>> ---
>> trace/control.c | 4 +---
>> util/log.c | 28 ++++++++++++++++------------
>> vl.c | 5 +----
>> 3 files changed, 18 insertions(+), 19 deletions(-)
>
> This patch has broken -D <filename> for *-linux-user.
> After e144a605a, all logging goes to stderr.
I posted:
Subject: [PATCH] tracing: only allow -trace to override -D if set
Date: Tue, 11 Feb 2020 11:10:54 +0000
Message-Id: <20200211111054.27538-1-alex.bennee@linaro.org>
as a fix which partially reverted this.
>
>> + if (filename) {
>> + char *pidstr = strstr(filename, "%");
>> + if (pidstr) {
>
> Also, the indentation is off.
>
>
> r~
--
Alex Bennée
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PULL 5/5] qemu_set_log_filename: filename argument may be NULL
2020-02-12 10:45 ` Alex Bennée
@ 2020-02-12 21:41 ` Richard Henderson
0 siblings, 0 replies; 14+ messages in thread
From: Richard Henderson @ 2020-02-12 21:41 UTC (permalink / raw)
To: Alex Bennée
Cc: Peter Maydell, qemu-devel, Salvador Fandino, Gerd Hoffmann,
Stefan Hajnoczi, Paolo Bonzini
On 2/12/20 2:45 AM, Alex Bennée wrote:
>
> Richard Henderson <richard.henderson@linaro.org> writes:
>
>> On 1/30/20 1:38 PM, Stefan Hajnoczi wrote:
>>> From: Salvador Fandino <salvador@qindel.com>
>>>
>>> NULL is a valid log filename used to indicate we want to use stderr
>>> but qemu_set_log_filename (which is called by bsd-user/main.c) was not
>>> handling it correctly.
>>>
>>> That also made redundant a couple of NULL checks in calling code which
>>> have been removed.
>>>
>>> Signed-off-by: Salvador Fandino <salvador@qindel.com>
>>> Message-Id: <20200123193626.19956-1-salvador@qindel.com>
>>> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
>>> ---
>>> trace/control.c | 4 +---
>>> util/log.c | 28 ++++++++++++++++------------
>>> vl.c | 5 +----
>>> 3 files changed, 18 insertions(+), 19 deletions(-)
>>
>> This patch has broken -D <filename> for *-linux-user.
>> After e144a605a, all logging goes to stderr.
>
> I posted:
>
> Subject: [PATCH] tracing: only allow -trace to override -D if set
> Date: Tue, 11 Feb 2020 11:10:54 +0000
> Message-Id: <20200211111054.27538-1-alex.bennee@linaro.org>
>
> as a fix which partially reverted this.
Thanks, that fixes it for me.
r~
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2020-02-12 21:42 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-30 21:38 [PULL 0/5] Tracing patches Stefan Hajnoczi
2020-01-30 21:38 ` [PULL 1/5] Makefile: Keep trace-events-subdirs ordered Stefan Hajnoczi
2020-01-30 21:38 ` [PULL 2/5] docs/devel/tracing.txt: Recommend only trace_event_get_state_backends() Stefan Hajnoczi
2020-01-30 21:38 ` [PULL 3/5] memory.c: Use trace_event_get_state_backends() Stefan Hajnoczi
2020-01-30 21:38 ` [PULL 4/5] hw/display/qxl.c: " Stefan Hajnoczi
2020-01-30 21:38 ` [PULL 5/5] qemu_set_log_filename: filename argument may be NULL Stefan Hajnoczi
2020-02-11 22:51 ` Richard Henderson
2020-02-12 10:45 ` Alex Bennée
2020-02-12 21:41 ` Richard Henderson
2020-01-31 13:57 ` [PULL 0/5] Tracing patches Peter Maydell
2020-01-31 14:38 ` Philippe Mathieu-Daudé
2020-01-31 14:45 ` Philippe Mathieu-Daudé
2020-01-31 15:25 ` Alex Bennée
2020-01-31 19:05 ` Peter Maydell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.