aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-12-13 17:50:45 +0000
committerPeter Maydell <peter.maydell@linaro.org>2018-12-13 17:50:45 +0000
commit2d894e48362ad2a576fca929dcca1787f43a8af6 (patch)
tree3bb18ec012f31f23069e2c9068c8ac701254dbae
parentc3ec0fa1a8e815ecfec9eabb9c20ee206c313e07 (diff)
parent7ff5920717d413d8b7c3ba13d9a0805291b9e6ec (diff)
downloadqemu-arm-2d894e48362ad2a576fca929dcca1787f43a8af6.tar.gz
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>
-rw-r--r--scripts/tracetool/backend/log.py2
-rw-r--r--trace/simple.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/scripts/tracetool/backend/log.py b/scripts/tracetool/backend/log.py
index 6751f41bc5..33c95af8e9 100644
--- a/scripts/tracetool/backend/log.py
+++ b/scripts/tracetool/backend/log.py
@@ -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);',
' }',
diff --git a/trace/simple.c b/trace/simple.c
index 701dec639c..ac904eca91 100644
--- a/trace/simple.c
+++ b/trace/simple.c
@@ -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);