@@ -75,6 +75,7 @@ struct QEMUTimer {
};
extern QEMUTimerListGroup main_loop_tlg;
+extern const char *timer_debug_log;
/*
* QEMUClockType
@@ -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
@@ -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
@@ -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);
}
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(+)