[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 22/23] trace: skip qemu_set_log_filename if no "-D" option was pas
From: |
Paolo Bonzini |
Subject: |
[PULL 22/23] trace: skip qemu_set_log_filename if no "-D" option was passed |
Date: |
Sat, 6 Mar 2021 11:54:18 +0100 |
When the "simple" backend is not active but the "log" backend is,
both "-trace file=" and "-D" will result in a call to
qemu_set_log_filename. Unfortunately, QEMU was also calling
qemu_set_log_filename if "-D" was not passed, so the "-trace
file=" option had no effect and the tracepoints went back to
stderr.
Fortunately we can just skip qemu_set_log_filename in that case,
because the log backend will initialize itself just fine as soon
as qemu_set_log is called, also in qemu_process_early_options.
Cc: stefanha@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20210209145759.141231-3-pbonzini@redhat.com>
---
softmmu/vl.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/softmmu/vl.c b/softmmu/vl.c
index 2f4958db2a..ff488ea3e7 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -2364,7 +2364,9 @@ static void qemu_process_early_options(void)
#endif
/* Open the logfile at this point and set the log mask if necessary. */
- qemu_set_log_filename(log_file, &error_fatal);
+ if (log_file) {
+ qemu_set_log_filename(log_file, &error_fatal);
+ }
if (log_mask) {
int mask;
mask = qemu_str_to_log_mask(log_mask);
--
2.29.2
- [PULL 06/23] vl.c: do not execute trace_init_backends() before daemonizing, (continued)
- [PULL 06/23] vl.c: do not execute trace_init_backends() before daemonizing, Paolo Bonzini, 2021/03/06
- [PULL 07/23] accel: kvm: Fix memory waste under mismatch page size, Paolo Bonzini, 2021/03/06
- [PULL 10/23] elf_ops: correct loading of 32 bit PVH kernel, Paolo Bonzini, 2021/03/06
- [PULL 11/23] x86/pvh: extract only 4 bytes of start address for 32 bit kernels, Paolo Bonzini, 2021/03/06
- [PULL 13/23] scsi: Rename linux-specific SG_ERR codes to generic SCSI_HOST error codes, Paolo Bonzini, 2021/03/06
- [PULL 12/23] qemu-config: add error propagation to qemu_config_parse, Paolo Bonzini, 2021/03/06
- [PULL 15/23] scsi-generic: do not snoop the output of failed commands, Paolo Bonzini, 2021/03/06
- [PULL 16/23] scsi: inline sg_io_sense_from_errno() into the callers., Paolo Bonzini, 2021/03/06
- [PULL 20/23] meson: adjust timeouts for some slower tests, Paolo Bonzini, 2021/03/06
- [PULL 21/23] trace: fix "-trace file=...", Paolo Bonzini, 2021/03/06
- [PULL 22/23] trace: skip qemu_set_log_filename if no "-D" option was passed,
Paolo Bonzini <=
- [PULL 08/23] accel: kvm: Add aligment assert for kvm_log_clear_one_slot, Paolo Bonzini, 2021/03/06
- [PULL 14/23] scsi: Add mapping for generic SCSI_HOST status to sense codes, Paolo Bonzini, 2021/03/06
- [PULL 17/23] scsi: move host_status handling into SCSI drivers, Paolo Bonzini, 2021/03/06
- [PULL 18/23] qemu-option: do not suggest using the delay option, Paolo Bonzini, 2021/03/06
- [PULL 19/23] build-sys: invoke ninja with -d keepdepfile, Paolo Bonzini, 2021/03/06
- [PULL 23/23] meson: Stop if cfi is enabled with system slirp, Paolo Bonzini, 2021/03/06
- [PULL 09/23] lsilogic: Use PCIDevice::exit instead of DeviceState::unrealize, Paolo Bonzini, 2021/03/06
- Re: [PULL 00/23] Misc patches for 2021-03-06, no-reply, 2021/03/06
- Re: [PULL 00/23] Misc patches for 2021-03-06, Peter Maydell, 2021/03/08