From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45299) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0UVO-0002GY-9m for qemu-devel@nongnu.org; Fri, 27 Jun 2014 07:39:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X0UVK-0003uT-3y for qemu-devel@nongnu.org; Fri, 27 Jun 2014 07:39:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24042) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0UVJ-0003uG-Rq for qemu-devel@nongnu.org; Fri, 27 Jun 2014 07:39:42 -0400 Date: Fri, 27 Jun 2014 13:39:32 +0200 From: Stefan Hajnoczi Message-ID: <20140627113932.GL12061@stefanha-thinkpad.muc.redhat.com> References: <1403376183-2774-1-git-send-email-yangzy.fnst@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="00hq2S6J2Jlg6EbK" Content-Disposition: inline In-Reply-To: <1403376183-2774-1-git-send-email-yangzy.fnst@cn.fujitsu.com> Subject: Re: [Qemu-devel] [PATCH v1] trace: add qemu_system_powerdown_request and qemu_system_shutdown_request trace events List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Yang Zhiyong Cc: qemu-devel@nongnu.org, aliguori@amazon.com --00hq2S6J2Jlg6EbK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jun 22, 2014 at 02:43:03AM +0800, Yang Zhiyong wrote: > We have the experience that the guest doesn't stop successfully=20 > though it was instructed to shut down. >=20 > 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. >=20 > Therefore, we need to affirm that QEMU received the shutdown =20 > request and raised ACPI irq from "virsh shutdown" command,=20 > virt-manger or stopping QEMU process to the VM . > So that we can affirm the problems was belonged to the Guset OS=20 > rather than the QEMU itself. >=20 > When we stop guests by "virsh shutdown" command or virt-manger,=20 > or stopping QEMU process, qemu_system_powerdown_request() or > qemu_system_shutdown_request() is called. Then the below functions=20 > in main_loop_should_exit() of Vl.c are called roughly in the=20 > following order. > =09 > if (qemu_powerdown_requested())=20 > qemu_system_powerdown() > monitor_protocol_event(QEVENT_POWERDOWN, NULL) > =09 > OR > =09 > if(qemu_shutdown_requested()}=20 > monitor_protocol_event(QEVENT_SHUTDOWN, NULL); >=20 > The tracepoint of monitor_protocol_event() already exists, but no > tracepoints are defined for qemu_system_powerdown_request() and=20 > qemu_system_shutdown_request(). So this patch adds two tracepoints for=20 > the two functions. We believe that it will become much easier to=20 > isolate the problem mentioned above by these tracepoints. >=20 >=20 > Signed-off-by: Yang Zhiyong >=20 > --- > trace-events | 2 ++ > vl.c | 2 ++ > 2 files changed, 4 insertions(+), 0 deletions(-) Thanks, applied to my tracing tree: https://github.com/stefanha/qemu/commits/tracing Stefan --00hq2S6J2Jlg6EbK Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJTrVf0AAoJEJykq7OBq3PIXCoH/2/bzgg88mooREi/F1qImtdz PF+HRP8/GEZK4Z2XsmV45CzEtQkFKLWCYQFSUNw7cbCfnZXvF4LbxUa5vFMdwsKi BOzsWnY6xe4P4jyV1LitN3OeolKHjQkFNOJFm/842S9lS0JhFqyEruSJZw9rPOtf CxundxiFGSrNKG18H8j7as+p1qbAQhnL7oMcw/ShJsQnMUoFaspTJWKixN0Tp3ZR PVd1+fg7IZuJ+U4G5sd6xXhqJiDfZKiDOXEG3YZnyEkc6u0YcIlnHYQHoimMKQcn wuQIVvgYkSgTgOgyn6Vm9zbFTdXGivhm/dFErUdXJ4LXnS6dSI1U2nD7VRbJYh8= =8iWK -----END PGP SIGNATURE----- --00hq2S6J2Jlg6EbK--