qemu-e2k/util
Greg Kurz 524fc73743 util/log: Ignore per-thread flag if global file already there
If QEMU is started with `-D qemu.log.%d` without any `-d` option,
doing `log all` in the monitor fails with:

Filename template with '%d' required for 'tid'

It is confusing since '%d' was actually passed.

This happens because QEMU caches the log file name with %d converted
to getpid() since `tid` wasn't required. This name isn't suitable
for a subsequent enablement of per-thread logs. There's little cause
to change the behavior as `-d tid` is mostly used at user-only startup.

Drop the per-thread from the requested flags in this case : `log all`
will thus enable everything except `tid` instead of failing. This is
preferable over forcing the user to enable each log item individually.

With this patch, `tid` is now truely immutable : it can only be set
or unset from the command line and never changed afterwards.

Fixes: 4e51069d67 ("util/log: Support per-thread log files")
Cc: richard.henderson@linaro.org
Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20221104120059.678470-3-groug@kaod.org
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2022-11-07 16:00:02 -05:00
..
aio-posix.c util/event-loop-base: Introduce options to set the thread pool size 2022-05-09 10:43:23 +01:00
aio-posix.h
aio-wait.c aio_wait_kick: add missing memory barrier 2022-06-24 17:07:06 +02:00
aio-win32.c util/aio-win32: Correct the event array size in aio_poll() 2022-11-06 09:48:26 +01:00
aiocb.c
async-teardown.c os-posix: asynchronous teardown for shutdown on Linux 2022-10-31 09:46:34 +01:00
async.c replay: notify vCPU when BH is scheduled 2022-06-06 09:26:53 +02:00
atomic64.c
base64.c
bitmap.c
bitops.c
block-helpers.c
block-helpers.h
buffer.c
bufferiszero.c
cacheflush.c util/cacheflush: Optimize flushing when ppc host has coherent icache 2022-06-21 09:28:41 -07:00
compatfd.c
coroutine-sigaltstack.c
coroutine-ucontext.c
coroutine-win32.c
crc32c.c
crc-ccitt.c
cutils.c cutils: Add missing dyld(3) include on macOS 2022-08-12 11:33:52 +01:00
dbus.c
drm.c
envlist.c
error-report.c
error.c
event_notifier-posix.c
event_notifier-win32.c
fdmon-epoll.c
fdmon-io_uring.c
fdmon-poll.c
fifo8.c
filemonitor-inotify.c
filemonitor-stub.c
getauxval.c
guest-random.c
hbitmap.c block: simplify handling of try to merge different sized bitmaps 2022-06-24 17:07:06 +02:00
hexdump.c
host-utils.c host-utils: Implemented signed 256-by-128 division 2022-06-20 08:38:58 -03:00
id.c
int128.c
iov.c util: make do_send_recv work with partial send/recv 2022-10-12 19:22:01 +04:00
iova-tree.c util: accept iova_tree_remove_parameter by value 2022-09-02 10:22:39 +08:00
keyval.c
lockcnt.c
log.c util/log: Ignore per-thread flag if global file already there 2022-11-07 16:00:02 -05:00
main-loop.c util/main-loop: Avoid adding the same HANDLE twice 2022-11-06 09:48:26 +01:00
memalign.c
memfd.c
meson.build * bug fixes 2022-11-03 10:54:37 -04:00
mmap-alloc.c util/mmap-alloc: Remove qemu_mempath_getpagesize() 2022-08-26 13:34:21 +02:00
module.c module: add Error arguments to module_load and module_load_qom 2022-11-06 09:48:50 +01:00
notify.c
nvdimm-utils.c
osdep.c tests/qtest: Use send/recv for socket communication 2022-10-28 11:17:12 +02:00
oslib-posix.c util: Make qemu_prealloc_mem() optionally consume a ThreadContext 2022-10-27 11:00:56 +02:00
oslib-win32.c util: Make qemu_prealloc_mem() optionally consume a ThreadContext 2022-10-27 11:00:56 +02:00
path.c
qdist.c
qemu-co-shared-resource.c
qemu-co-timeout.c util: add qemu-co-timeout 2022-06-29 10:56:12 +03:00
qemu-config.c s390x/s390-virtio-ccw: add zpcii-disable machine property 2022-09-26 17:23:47 +02:00
qemu-coroutine-io.c
qemu-coroutine-lock.c coroutine: add flag to re-queue at front of CoQueue 2022-10-26 14:56:42 -04:00
qemu-coroutine-sleep.c
qemu-coroutine.c coroutine: remove incorrect coroutine_fn annotations 2022-10-07 12:11:40 +02:00
qemu-option.c
qemu-print.c
qemu-progress.c
qemu-sockets.c -----BEGIN PGP SIGNATURE----- 2022-10-30 18:30:01 -04:00
qemu-thread-common.h
qemu-thread-posix.c util: Introduce qemu_thread_set_affinity() and qemu_thread_get_affinity() 2022-10-27 11:00:36 +02:00
qemu-thread-win32.c util: Introduce qemu_thread_set_affinity() and qemu_thread_get_affinity() 2022-10-27 11:00:36 +02:00
qemu-timer-common.c
qemu-timer.c qemu-timer: Skip empty timer lists before locking in qemu_clock_deadline_ns_all 2022-06-21 09:24:34 -07:00
qht.c
qsp.c
range.c
rcu.c
readline.c
selfmap.c
stats64.c
sys_membarrier.c
systemd.c
thread-context.c util: Add write-only "node-affinity" property for ThreadContext 2022-10-27 11:00:50 +02:00
thread-pool.c thread-pool: remove stopping variable 2022-05-25 21:26:26 +02:00
throttle.c
timed-average.c
trace-events
trace.h
transactions.c
unicode.c
uri.c
userfaultfd.c
uuid.c
vfio-helpers.c numa: call ->ram_block_removed() in ram_block_notifer_remove() 2022-10-26 14:56:42 -04:00
vhost-user-server.c
yank.c