Tracing pull request
The following changes since commit 53a259da5697ec8a82463161e2e32ff942a08bc2:
Merge remote-tracking branch 'remotes/awilliam/tags/vfio-pci-for-qemu-20140630.0' into staging (2014-06-30 18:31:07 +0100)
are available in the git repository at:
git://github.com/stefanha/qemu.git tags/tracing-pull-request
for you to fetch changes up to bc78cff9757782501db15d39828e6af4186fe331:
trace: add qemu_system_powerdown_request and qemu_system_shutdown_request trace events (2014-07-01 10:56:13 +0200)
----------------------------------------------------------------
Tracing pull request
----------------------------------------------------------------
Yang Zhiyong (1):
trace: add qemu_system_powerdown_request and qemu_system_shutdown_request trace events
trace-events | 2 ++ vl.c | 2 ++ 2 files changed, 4 insertions(+)
Signature · 1 line
1.9.3
[Qemu-devel] [PULL for-2.1 1/1] trace: add qemu_system_powerdown_request and qemu_system_shutdown_request trace events
From: Yang Zhiyong <[email protected]>
We have the experience that the guest doesn't stop successfully though it was instructed to shut down.
The root cause may be not in QEMU mostly. However, QEMU is often suspected at the beginning just because the issue occurred in virtualization environment.
Therefore, we need to affirm that QEMU received the shutdown request and raised ACPI irq from "virsh shutdown" command, virt-manger or stopping QEMU process to the VM .
So that we can affirm the problems was belonged to the Guset OS rather than the QEMU itself.
When we stop guests by "virsh shutdown" command or virt-manger, or stopping QEMU process, qemu_system_powerdown_request() or qemu_system_shutdown_request() is called. Then the below functions in main_loop_should_exit() of Vl.c are called roughly in the following order.
if (qemu_powerdown_requested()) qemu_system_powerdown() monitor_protocol_event(QEVENT_POWERDOWN, NULL) OR if(qemu_shutdown_requested()} monitor_protocol_event(QEVENT_SHUTDOWN, NULL);
The tracepoint of monitor_protocol_event() already exists, but no tracepoints are defined for qemu_system_powerdown_request() and qemu_system_shutdown_request(). So this patch adds two tracepoints for the two functions. We believe that it will become much easier to isolate the problem mentioned above by these tracepoints.
--- trace-events | 2 ++ vl.c | 2 ++ 2 files changed, 4 insertions(+)
trace-events +2 -0
@@ -511,6 +511,8 @@ g_malloc(size_t size, void *ptr) "size %zu ptr %p" g_realloc(void *ptr, size_t size, void *newptr) "ptr %p size %zu newptr %p" g_free(void *ptr) "ptr %p" system_wakeup_request(int reason) "reason=%d" +qemu_system_shutdown_request(void) "" +qemu_system_powerdown_request(void) "" # block/qcow2.c qcow2_writev_start_req(void *co, int64_t sector, int nb_sectors) "co %p sector %" PRIx64 " nb_sectors %d"
vl.c +2 -0
@@ -1921,6 +1921,7 @@ void qemu_system_killed(int signal, pid_t pid)void qemu_system_shutdown_request (void ) { +trace_qemu_system_shutdown_request (); shutdown_requested =1 ;qemu_notify_event (); }
@@ -1933,6 +1934,7 @@ static void qemu_system_powerdown(void)void qemu_system_powerdown_request (void ) { +trace_qemu_system_powerdown_request (); powerdown_requested =1 ;qemu_notify_event (); }
Signature · 1 line
1.9.3
Peter Maydell
AppliedQuoted 7 lines · Stefan Hajnoczi
The following changes since commit
53a259da5697ec8a82463161e2e32ff942a08bc2:Merge remote-tracking branch 'remotes/awilliam/tags/vfio-pci-for-qemu-20140630.0' into staging (2014-06-30 18:31:07 +0100)
are available in the git repository at:
Quoted 9 lines
git://github.com/stefanha/qemu.gittags/tracing-pull-requestfor you to fetch changes up to
bc78cff9757782501db15d39828e6af4186fe331:trace: add
qemu_system_powerdown_requestandqemu_system_shutdown_requesttrace events (2014-07-01 10:56:13 +0200)----------------------------------------------------------------
Tracing pull request
Applied, thanks.
-- PMM