Re: [PATCH v6 26/27] util: add support for formatting thread info in messages
Markus Armbruster <[email protected]> Thu, 19 Feb 2026 11:14:54 +0100
| Newsgroups | org.nongnu.qemu-rust,org.nongnu.qemu-devel |
|---|---|
| Message-ID | <[email protected]> |
Daniel P. Berrangé <[email protected]> writes: > The message context is now extended to be able to include the > thread ID and thread name, after the program name. On Linux > the thread ID will match the process TID visible in /proc, > while on other platforms it will merely be an integer repr > of the system thread object address/ID. > > This changes the output for both error_report and qemu_log, > when running under the system emulators or the QEMU storage > daemon. Yes: $ qemu-system-x86_64 -object tls-creds-x509,id=t0 qemu-system-x86_64: (1116063:main): Missing 'dir' property value I do not like this change. The part in (parenthesis) is gobbledygook for non-developers. I feel it should be off by default. Making it on by default for log message (as shown below) is fine. > Other programs omit the thread information since > they are largely single threaded, though potentially it > would be useful to enable in all of them, given that the RCU > thread will always get spawned by a constructor function. > > Before: > > # qemu-system-x86_64 -object tls-creds-x509,id=t0,dir=fish -d 'trace:qcrypto*' > qemu-system-x86_64: qcrypto_tls_creds_x509_load TLS creds x509 load creds=0x560db818e080 dir=fish > qemu-system-x86_64: qcrypto_tls_creds_get_path TLS creds path creds=0x560db818e080 filename=ca-cert.pem path=<none> > qemu-system-x86_64: Unable to access credentials fish/ca-cert.pem: No such file or directory > > After: > > # qemu-system-x86_64 -object tls-creds-x509,id=t0,dir=fish -d 'trace:qcrypto*' > qemu-system-x86_64: (772366:main): qcrypto_tls_creds_x509_load TLS creds x509 load creds=0x560db818e080 dir=fish > qemu-system-x86_64: (772366:main): qcrypto_tls_creds_get_path TLS creds path creds=0x560db818e080 filename=ca-cert.pem path=<none> > qemu-system-x86_64: (772366:main): Unable to access credentials fish/ca-cert.pem: No such file or directory > > The '-msg thread-info=on|off' argument is introduced to allow this > new default output to be supressed if desired. > > Reviewed-by: Richard Henderson <[email protected]> > Signed-off-by: Daniel P. Berrangé <[email protected]>