Tracing patches
The following changes since commit bb9bf94b3e8926553290bc9a7cb84315af422086:
Merge remote-tracking branch 'remotes/ehabkost/tags/machine-next-pull-request' into staging (2018-12-11 19:18:58 +0000)
are available in the Git repository at:
git://github.com/stefanha/qemu.git tags/tracing-pull-request
for you to fetch changes up to 7ff5920717d413d8b7c3ba13d9a0805291b9e6ec:
trace: simple style changes (2018-12-12 10:04:59 +0000)
----------------------------------------------------------------
Pull request
Minor tracing improvements.
----------------------------------------------------------------
Fabiano Rosas (1):
tracetool: Include thread id information in log backend
Larry Dewey (1):
trace: simple style changes
trace/simple.c | 4 ++-- scripts/tracetool/backend/log.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
Signature · 1 line
2.19.2
[Qemu-devel] [PULL 1/2] tracetool: Include thread id information in log backend
From: Fabiano Rosas <[email protected]>
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.:
[email protected]:qemu_mutex_lock waiting on mutex 0x1103ee60 (/root/qemu/util/main-loop.c:236)
...
[email protected]:qemu_mutex_unlock released mutex 0x1103ee60 (/root/qemu/cpus.c:1238) [email protected]: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
--- scripts/tracetool/backend/log.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/tracetool/backend/log.py +1 -1
@@ -39,7 +39,7 @@ def generate_h(event, group): ' struct timeval _now;', ' gettimeofday(&_now, NULL);', ' qemu_log("%%d@%%zu.%%06zu:%(name)s " %(fmt)s "\\n",', - ' getpid(),', + ' qemu_get_thread_id(),', ' (size_t)_now.tv_sec, (size_t)_now.tv_usec', ' %(argnames)s);', ' }',
Signature · 1 line
2.19.2
[Qemu-devel] [PULL 2/2] trace: simple style changes
In reply to Stefan HajnocziFrom: Larry Dewey <[email protected]>
This changes two lines in simple.c that end with a comma, and replaces them with a semi-colon.
Message-id: [email protected]
--- trace/simple.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
trace/simple.c +2 -2
@@ -169,9 +169,9 @@ static gpointer writeout_thread(gpointer opaque)wait_for_trace_records_available ();if (g_atomic_int_get (&dropped_events)) { - dropped.rec.event =DROPPED_EVENT_ID , + dropped.rec.event =DROPPED_EVENT_ID ; dropped.rec.timestamp_ns =get_clock (); - dropped.rec.length =sizeof (TraceRecord) +sizeof (uint64_t ), + dropped.rec.length =sizeof (TraceRecord) +sizeof (uint64_t ); dropped.rec.pid = trace_pid; do { dropped_count = g_atomic_int_get(&dropped_events);
Signature · 1 line
2.19.2
Peter Maydell
AppliedQuoted 23 lines · Stefan Hajnoczi
The following changes since commit
bb9bf94b3e8926553290bc9a7cb84315af422086:Merge remote-tracking branch 'remotes/ehabkost/tags/machine-next-pull-request' into staging (2018-12-11 19:18:58 +0000)
are available in the Git repository at:
git://github.com/stefanha/qemu.gittags/tracing-pull-requestfor you to fetch changes up to
7ff5920717d413d8b7c3ba13d9a0805291b9e6ec:trace: simple style changes (2018-12-12 10:04:59 +0000)
----------------------------------------------------------------
Pull requestMinor tracing improvements.
----------------------------------------------------------------
Fabiano Rosas (1):
tracetool: Include thread id information in log backend
Quoted 6 lines
Larry Dewey (1):
trace: simple style changestrace/simple.c | 4 ++-- scripts/tracetool/backend/log.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/4.0
for any user-visible changes.
-- PMM