Pull request

Minor tracing improvements.
 -----BEGIN PGP SIGNATURE-----
 
 iQEcBAABAgAGBQJcEN/CAAoJEJykq7OBq3PIgcYH/3Ied2sy1Gnhj4m6sTD2CB0y
 frYFxQWcLhze49son68NvTlSGQK0U2nSBnHYBJb8O3Dkc1RvBZ0nKWdvodOTrX4k
 G5h2UaFsvKaMcH8KMk+9/euBXR+EYJB/vwXMRsoaoZAXmyHd5hDjr/ChzTLBl555
 UYcTxKHEIyhnXWqlnTC0x7IvLJtpiW1RJ2erLzU6CFaeBFITDqlaIqCsKlU+wP77
 WFqF5hgG7Pm6RnnI8JFBuy3pJOyOY4Z3wwcpvoMzdEny1V4qRmf82gbEo5DSQE/K
 QTWJ+BcgUHxj2JYcgC68lcxrZ+PQjIgfQ0JJr7IXJDdhdWsE9QuIG/CBgPS1ERg=
 =vh4V
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging

Pull request

Minor tracing improvements.

# gpg: Signature made Wed 12 Dec 2018 10:15:30 GMT
# gpg:                using RSA key 9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8

* remotes/stefanha/tags/tracing-pull-request:
  trace: simple style changes
  tracetool: Include thread id information in log backend

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2018-12-13 17:50:45 +00:00
commit 2d894e4836
2 changed files with 3 additions and 3 deletions

View File

@ -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);',
' }',

View File

@ -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);