From: Alex Bligh <alex@alex.org.uk>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
Anthony Liguori <aliguori@us.ibm.com>,
Alex Bligh <alex@alex.org.uk>,
Jan Kiszka <jan.kiszka@siemens.com>,
liu ping fan <qemulist@gmail.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>,
rth@twiddle.net
Subject: [Qemu-devel] [PATCHv1 2/4] Timers: add command line option -timer-debug-log
Date: Fri, 25 Oct 2013 23:30:32 +0100 [thread overview]
Message-ID: <1382740234-21345-3-git-send-email-alex@alex.org.uk> (raw)
In-Reply-To: <1382740234-21345-1-git-send-email-alex@alex.org.uk>
Add a command line option -timer-debug-log which takes the name
of a file to which periodic timer debugging information will be
written.
Signed-off-by: Alex Bligh <alex@alex.org.uk>
---
include/qemu/timer.h | 1 +
qemu-options.hx | 11 +++++++++++
qemu-timer.c | 1 +
vl.c | 3 +++
4 files changed, 16 insertions(+)
diff --git a/include/qemu/timer.h b/include/qemu/timer.h
index d3ab5b0..1f7c5e4 100644
--- a/include/qemu/timer.h
+++ b/include/qemu/timer.h
@@ -75,6 +75,7 @@ struct QEMUTimer {
};
extern QEMUTimerListGroup main_loop_tlg;
+extern const char *timer_debug_log;
/*
* QEMUClockType
diff --git a/qemu-options.hx b/qemu-options.hx
index 5dc8b75..605c1b9 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -3116,6 +3116,17 @@ STEXI
prepend a timestamp to each log message.(default:on)
ETEXI
+DEF("timer-debug-log", HAS_ARG, QEMU_OPTION_timer_debug_log,
+ "-timer-debug-log FILE\n"
+ " write timer debug log to FILE (default: don't write)",
+ QEMU_ARCH_ALL)
+STEXI
+@item -timer-debug-log @var{file}
+@findex -timer-debug-log
+Write timer debug output periodically to file @var{file}. By default,
+no timer debug logging is written.
+ETEXI
+
HXCOMM This is the last statement. Insert new options before this line!
STEXI
@end table
diff --git a/qemu-timer.c b/qemu-timer.c
index 0e358ac..84a8932 100644
--- a/qemu-timer.c
+++ b/qemu-timer.c
@@ -57,6 +57,7 @@ typedef struct QEMUClock {
QEMUTimerListGroup main_loop_tlg;
QEMUClock qemu_clocks[QEMU_CLOCK_MAX];
+const char *timer_debug_log;
/* A QEMUTimerList is a list of timers attached to a clock. More
* than one QEMUTimerList can be attached to each clock, for instance
diff --git a/vl.c b/vl.c
index b42ac67..4564207 100644
--- a/vl.c
+++ b/vl.c
@@ -3794,6 +3794,9 @@ int main(int argc, char **argv, char **envp)
}
configure_msg(opts);
break;
+ case QEMU_OPTION_timer_debug_log:
+ timer_debug_log = optarg;
+ break;
default:
os_parse_cmd_args(popt->index, optarg);
}
--
1.7.9.5
next prev parent reply other threads:[~2013-10-25 22:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-25 22:30 [Qemu-devel] [PATCHv1 0/4] Timers: add timer debugging through -timer-debug-log Alex Bligh
2013-10-25 22:30 ` [Qemu-devel] [PATCHv1 1/4] Timers: add debugging macros wrapping timer functions and debug structures Alex Bligh
2013-10-25 22:30 ` Alex Bligh [this message]
2013-10-25 22:30 ` [Qemu-devel] [PATCHv1 3/4] Timers: Instrument timer_mod Alex Bligh
2013-10-25 22:30 ` [Qemu-devel] [PATCHv1 4/4] Timers: produce timer-debug-log file Alex Bligh
2013-10-25 23:00 ` [Qemu-devel] [PATCHv1 0/4] Timers: add timer debugging through -timer-debug-log Paolo Bonzini
2013-10-26 5:52 ` Alex Bligh
2013-10-26 7:18 ` Paolo Bonzini
2013-10-26 8:24 ` Alex Bligh
2013-10-26 17:11 ` Paolo Bonzini
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=1382740234-21345-3-git-send-email-alex@alex.org.uk \
--to=alex@alex.org.uk \
--cc=aliguori@us.ibm.com \
--cc=jan.kiszka@siemens.com \
--cc=kwolf@redhat.com \
--cc=morita.kazutaka@lab.ntt.co.jp \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemulist@gmail.com \
--cc=rth@twiddle.net \
--cc=stefanha@redhat.com \
/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).