qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Fabiano Rosas <farosas@linux.ibm.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] tracetool: Include thread id information in log backend
Date: Mon, 5 Nov 2018 09:18:31 +0000	[thread overview]
Message-ID: <20181105091831.GA10887@stefanha-x1.localdomain> (raw)
In-Reply-To: <20181004143009.24693-1-farosas@linux.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 1205 bytes --]

On Thu, Oct 04, 2018 at 11:30:09AM -0300, Fabiano Rosas wrote:
> Currently the log backend prints the process id of QEMU at the start
> of each output line, but since threads share the same PID there is no
> clear distinction between their outputs.
> 
> Having the thread id present in the log makes it easier to see when
> output comes from different threads. E.g.:
> 
> 12423@1538597569.672527:qemu_mutex_lock waiting on mutex 0x1103ee60 (/root/qemu/util/main-loop.c:236)
> ...
> 12430@1538597569.503928:qemu_mutex_unlock released mutex 0x1103ee60 (/root/qemu/cpus.c:1238)
> 12431@1538597569.503937:qemu_mutex_locked taken mutex 0x1103ee60 (/root/qemu/cpus.c:1257)
> ^here
> 
> In the above, 12423 is the main process id and 12430 & 12431 are the
> two vcpu threads.
> 
>  (qemu) info cpus
>  * CPU #0: thread_id=12430
>    CPU #1: thread_id=12431
> 
> Suggested-by: Murilo Opsfelder Araujo <muriloo@linux.ibm.com>
> Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com>
> ---
>  scripts/tracetool/backend/log.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks, applied to my tracing-next tree:
https://github.com/stefanha/qemu/commits/tracing-next

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

      reply	other threads:[~2018-11-05  9:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-04 14:30 [Qemu-devel] [PATCH] tracetool: Include thread id information in log backend Fabiano Rosas
2018-11-05  9:18 ` Stefan Hajnoczi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181105091831.GA10887@stefanha-x1.localdomain \
    --to=stefanha@redhat.com \
    --cc=farosas@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).